0% found this document useful (0 votes)
118 views8 pages

BCS303 Operating Systems Overview

The document contains a comprehensive set of viva questions and answers related to Operating Systems, covering fundamental concepts such as the definition, purpose, types, and components of operating systems. It also addresses important topics like process management, memory management techniques, scheduling algorithms, deadlock handling, and inter-process communication. Additionally, it includes definitions and explanations of key terms and concepts essential for understanding operating systems.

Uploaded by

Jashwanth R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views8 pages

BCS303 Operating Systems Overview

The document contains a comprehensive set of viva questions and answers related to Operating Systems, covering fundamental concepts such as the definition, purpose, types, and components of operating systems. It also addresses important topics like process management, memory management techniques, scheduling algorithms, deadlock handling, and inter-process communication. Additionally, it includes definitions and explanations of key terms and concepts essential for understanding operating systems.

Uploaded by

Jashwanth R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Operating Systems BCS303

Viva Questions
1. What is an Operating System?
The operating system is a software program that manages computer hardware. It also provides
basis for application programs and act as an intermediary between the computer user and the
computer hardware.
2. What is the purpose of Operating System?
• It is designed to make sure that a computer system performs well by managing its
computational activities.
• It provides an environment for the development and execution of programs.
3. What are different types of OS?
• Batched operating systems
• Distributed operating systems
• Timesharing operating systems
• Multi-programmed operating systems
• Real-time operating systems
4. What is Kernel?
Kernel is the core and most important part of a computer operating system which provides
basic services for all parts of the OS.
5. What do you mean by Process?
A Process is a program in Execution.
6. What are the different states of Process?
A list of different states of process:

o New Process

o Running Process

o Waiting Process

o Ready Process

o Terminated Process

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 1


Operating Systems BCS303

7. What is the use of Paging in OS?


Paging is used to solve the external fragmentation problem in operating system. This technique
ensures that the data you need is available as quickly as possible.
8. What is the concept of Demand Paging?
Demand paging specifies that if an area of memory is not currently being used, it is swapped to
disk to make room for an application's need.
9. What is Virtual Memory?
Virtual memory is a very useful memory management technique which enables processes to
execute outside of memory. This technique is especially used when an executing program
cannot fit in the physical memory.
10. Explain Thrashing.
Thrashing is a phenomenon in virtual memory scheme when the processor spends most of its
time in swapping pages, rather than executing instructions.
11. What is Deadlock?
Deadlock is a specific situation or condition where two processes are waiting for each other to
complete so that they can start. But this situation causes hang for both of them.
12. Define the following
a) Turnaround time- Time duration between job submitted and its completion
b) Waiting time – Time spent on a ready queue for its execution of a process.
c) Burst time – Time required for a process for its execution.
d) Arrival time -Time at which the process enters the ready queue.
13. What are the various states of process?
The 5 states of the process are
• New
• Ready
• Running
• Waiting
• Halted

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 2


Operating Systems BCS303

14. What is the difference between preemptive and non-preemptive scheduling?


Preemptive- When a CPU executing a process, the process execution can’t be forcibly
terminated/stopped.
Non-Preemptive- When a CPU executing a process, the process execution can be
terminated/stopped or volunteer termination is allowed.
15. What is round robin scheduling (RR)?
Round Robin is a CPU scheduling mechanism whose cycles around assigning each task a specific
time slot. It is the First come First Serve CPU Scheduling method prior Pre-emptive Process
Scheduling approach. The Round Robin CPU algorithm frequently emphasizes the Time-Sharing
method.
16. What are the four necessary and sufficient conditions behind Deadlock?
These are the 4 conditions:
1) Mutual Exclusion Condition: It specifies that the resources involved are non-sharable.
2) Hold and Wait Condition: It specifies that there must be a process that is holding a resource
already allocated to it while waiting for additional resource that are currently being held by
other processes.
3) No-Preemptive Condition: Resources cannot be taken away while they are being used by
processes.
4) Circular Wait Condition: It is an explanation of the second condition. It specifies that the
processes in the system form a circular list or a chain where each process in the chain is waiting
for a resource held by next process in the chain.
17. What is Bankers Algorithm?
Banker's algorithm is used to avoid deadlock. It is the one of deadlock-avoidance method. It is
named as Banker's algorithm on the banking system where bank never allocates available cash
in such a manner that it can no longer satisfy the requirements of all of its customers.
18. What is the difference between Logical Address Space and Physical Address Space?
Logical address space specifies the address that is generated by CPU. On the other hand physical
address space specifies the address that is seen by the memory unit.

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 3


Operating Systems BCS303

19. What is Semaphore?


Semaphore is a protected variable or abstract data type that is used to lock the resource being
used. The value of the semaphore indicates the status of a common resource.
There are two types of semaphore:

o Binary semaphores

o Counting semaphores
20. What is Belady’s Anomaly?
Belady's Anomaly is also called FIFO anomaly. Usually, on increasing the number of frames
allocated to a process virtual memory, the process execution is faster, because fewer page
faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when
more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page
reference patterns
21. What is Starvation in Operating Systems?
Starvation is Resource management problem. In this problem, a waiting process does not get
the resources it needs for a long time because the resources are being allocated to other
processes.
22. What is Aging in Operating Systems?
Aging is a technique used to avoid the starvation in resource scheduling system.
23. What is a System Call in Operating Systems?
Programs can communicate with the operating system by making a system call. When a
computer application requests anything from the kernel of the operating system, it performs a
system call. System call uses Application Programming Interfaces (API)to deliver operating
system services to user programs.
24. What are the functions which are present in the File Management System Call?
The Functions present in File Management System Calls are:
1. Create
2. Open
3. Read
4. Close

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 4


Operating Systems BCS303

5. Delete

25. What are the differences between Thread and Process.


Thread Process
Threads are executed within the same Processes are executed in the different memory
process spaces
Threads are not independent of each other Processes are independent of each other

26. What is Process Scheduling In Operating Systems?


The task of the process manager that deals with removing the active process from the CPU
and choosing a different process based on a certain strategy is known as process scheduling.
27. What is Context Switching?
Context switching is a technique or approach that the operating system use to move a process
from one state to another so that it can carry out its intended function using system CPUs.
28. What is Process Synchronization in Operating Systems?
Process synchronization, often known as synchronization, is the method an operating system
uses to manage processes that share the same memory space. By limiting the number of
processes that may modify the shared memory at once via hardware or variables, it helps
ensure the consistency of the data.
29. What are the Classical Problems of Process Synchronization?
The Classical Problems of Process Synchronization are:

1. Bound Buffer Problem or Consumer Producer Problem

2. Dining Philosopher's Problem

3. Readers and writers Problem

4. Sleeping Barber Problem


30. What is Peterson’s solution?
Peterson's solution to the critical section issue is a traditional one. The critical section problem
makes sure no two processes or jobsalter or modify the value of a resource at the same time.
31. What is a Critical Section Problem?
The section of a program known as the Critical Section attempts to access shared resources.

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 5


Operating Systems BCS303

The operating system has trouble authorizing and preventing processes from entering the
crucial part because more than one process cannot operate in the critical area at once.
32. What are the methods of Handling Deadlocks?
The methods of handling deadlock are:

1. Deadlock Prevention

2. Deadlock Detection and Recovery

3. Deadlock Avoidance

4. Deadlock Ignorance

33. How can we avoid Deadlock?


We can avoid Deadlock by using Banker's Algorithm.
34. What is paging in Operating Systems?
Paging is a storage mechanism. Paging is used to retrieve processes from secondary memory
to primary memory.
The main memory is divided into small blocks called pages. Now, each of the pages contains
the process which is retrieved into main memory and it is stored in one frame of memory.
It is very important to have pages and frames which are of equal sizes which are very useful
for mapping and complete utilization of memory.
35. In which Page Replacement Algorithm does Belady's Anomaly occur?
In First in First out Page Replacement Algorithm Belady's Anomaly occurs.
36. What is Disk Scheduling in Operating Systems?
Operating systems use disk scheduling to plan when Input or Output requests for the disk
will arrive. Input or Output scheduling is another name for disk scheduling.
37. What do you know about Semaphore?
Semaphores are basically the mechanisms that tell a process that a current process is done and
the next can enter for execution. Mostly used with the critical section of the code to synchronize
resource access and avoid deadlocks. It can be considered as a generalized mutex.
38. What is the purpose of system calls?
System calls allow user-level processes to request services of the operating system.
39. What are privileged instructions?
Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 6
Operating Systems BCS303

Some of the machine instructions that may cause harm to a system are designated as privileged
instructions. The hardware allows the privileged instructions to be executed only in monitor
mode
40. Define race condition.
When several process access and manipulate same data concurrently, then the outcome of the
execution depends on particular order in which the access takes place is called race condition.
To avoid race condition, only one process at a time can manipulate the shared variable.
41. Define swapping.
A process needs to be in memory to be executed. However, a process can be swapped
temporarily out of memory to a backing tore and then brought bac+ into memory for continued
execution. This process is called swapping.
42. What is a file?
A file is a named collection of related information that is recorded on secondary storage. A file
contains either programs or data. A file has certain structure based on its type.
File attributes-Name, identifier, type, size, location, protection, time, date etc.
File operations- creation, reading, writing, repositioning, deleting, truncating, appending.
File types - executable, object, library, source code etc.
43. What are the drawbacks of contiguous allocation of disk space?
The disadvantages area.
Suffers from external fragmentation
Suffers from internal fragmentation
Difficulty in finding space for a new file
File cannot be extended.
Size of the file is to be declared in advance
44. What are the advantages of Linked allocation?
The advantages are
External fragmentation
Size of the file does not need to be declared.
45. Explain IPC.
• It is called as the inter process communication.

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 7


Operating Systems BCS303

• The scheme requires that processes share a common buffer pool and code for implementing
the buffer.
• It allows processes to communicate and to synchronize their actions.
• Example:chat program used on the world wide web.
• It is useful in distributed computer systems where communicating processes reside on
different computers connected with a network.

Rekha S, Asst. Professor, Dept. of AI & DS, DBIT 8

You might also like