Operating System Viva Questions
Operating System Viva Questions
The operating system is a software program that facilitates computer hardware to communicate
and operate with the computer software. It is the most important part of a computer system
without it computer is just like a box.
3) 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.
User Processes
New Process
Running Process
Waiting Process
Ready Process
Terminated Process
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.
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.
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.
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 are the four necessary and sufficient conditions behind the deadlock?
3. No-Preemptive Condition
A thread is a basic unit of CPU utilization. It consists of a thread ID, program counter, register
set and a stack.
13) What is FCFS?
FCFS stands for First Come, First Served. It is a type of scheduling algorithm. In this scheme,
if a process requests the CPU first, it is allocated to the CPU first. Its implementation is
managed by a FIFO queue.
SMP stands for Symmetric Multiprocessing. It is the most common type of multiple processor
system. In SMP, each processor runs an identical copy of the operating system, and these
copies communicate with one another when required.
Deadlock is a specific situation or condition where two processes are waiting for each other to
complete so that they can start.
17) 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.
Internal fragmentation: It is occurred when we deal with the systems that have fixed size
allocation units.
External fragmentation: It is occurred when we deal with systems that have variable-size
allocation units.
20) What is spooling?
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.
Binary semaphores
Counting semaphores
Binary semaphore takes only 0 and 1 as value and used to implement mutual exclusion and
synchronize concurrent processes.
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.
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.
27) Do the Batch Operating System interact with Computer for processing the needs of jobs or
processes required?
No, this is not that kind of Operating Systems which tries to interact with the computer. But,
this job is taken up by the Operator present in the Batch 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
29) What are the functions which are present in the File Management System Call?
A data structure called a Process Control Block houses details about the processes connected to
it. The term "process control block" can also refer to a "task control block," "process table
entry," etc.
Thread Process
Threads are executed within the Processes are executed in the different
same process memory spaces
Threads are not independent of each Processes are independent of each other
other
32) 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.
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.
Wait or P Function ()
Signal or V Function ()
38) What is a Critical Section Problem?
The section of a program known as the Critical Section attempts to access shared resources.
Deadlock Prevention
Deadlock Avoidance
Deadlock Ignorance
Logical and physical memory addresses, both of which are distinct, are the two types of
memory addresses that are employed in the paging process. The logical address is the address
that the CPU creates for each page in the secondary memory, but the physical address is the
actual location of the frame where each page will be allocated. We now require a technique
known as address translation carried out by the page table in order to translate this logical
address into a physical address.
Whenever logical address is created by the Central Processing Unit (CPU), the page number is
stored in the Translational Look Aside Buffer. Along, with the page number, the frame number
is also stored.
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.
46) What are the Disk Scheduling Algorithms used in Operating Systems?
1. One Input or Output request may be fulfilled by the disk controller at a time, even if
several Input or Output requests could come in from other processes. Other Input or
Output requests must thus be scheduled and made to wait in the waiting queue.
2. The movement of the disk arm might increase if two or more requests are placed far
apart from one another.
3. Since hard disks are among the slower components of the computer system, they must be
accessible quickly.