Operating system technical interview questions and answers help students and job seekers understand core computing concepts that are essential for technical interviews. The operating system acts as a bridge between hardware and software, making it one of the fundamental subjects tested in campus placement interviews. Recruiters frequently ask questions about process management, memory allocation, deadlocks, scheduling algorithms, threads, file systems, and OS architecture. These OS interview questions appear repeatedly in companies like TCS, Wipro, Infosys, Cognizant, Capgemini, and Accenture. This guide explains the most commonly asked OS interview questions with easy-to-understand answers, practical examples, and simple definitions. Whether you are preparing for your first job, a technical round, or a written placement test, understanding OS concepts will help you perform confidently. You can also practice mock questions or download PDFs to strengthen your preparation.
Showing 10 of 137 questions
121. Define Demand Paging, Page fault interrupt, and Trashing?
Demand Paging: Demand paging is the paging policy that a page is not read into memory until it is requested, that is, until there is a page fault on the page.
Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a page that is not in memory.The present bit in the page table entry will be found to be off by the virtual memory hardware and it will signal an interrupt.
Trashing: The problem of many page faults occurring in a short time, called “page thrashing,”
122. What is fragmentation? Different types of fragmentation?
Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.
External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced.Total memory space exists to satisfy a request, but it is not contiguous
Internal Fragmentatio
123. What are Dynamic Loading, Dynamic Linking and Overlays?
Dynamic Loading:
->Routine is not loaded until it is called
->Better memory-space utilization; unused routine is never loaded.
->Useful when large amounts of code are needed to handle infrequently occurring cases.
->No special support from the operating system is required implemented through program design.
Dynamic Linking:
->Linking postponed until execution time.
->Small piece of code, stub, used to locate the appropriate memory-resident library routine.
->Stub replaces itself with the
124. What is Memory-Management Unit (MMU)?
Hardware device that maps virtual to physical address.
In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.
->The user program deals with logical addresses; it never sees the real physical addresses
125. Binding of Instructions and Data to Memory?
Address binding of instructions and data to memory addresses can happen at three different stages
Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes.
Load time: Must generate relocatable code if memory location is not known at compile time.
Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g.,
126. Difference between Logical and Physical Address Space?
->The concept of a logical address space that is bound to a separate physical address space is central to proper memory management.
Logical address generated by the CPU; also referred to as virtual address.
Physical address address seen by the m
127. Recovery from Deadlock?
Process Termination:
->Abort all deadlocked processes.
->Abort one process at a time until the deadlock cycle is eliminated.
->In which order should we choose to abort?
Priority of the process.
How long process has computed, and how much longer to completion.
Resources the process has used.
Resources process needs to complete.
How many processes will need to be terminated?
Is process interactive or batch?
Resource Preemption:
->Selecting a victim minimize cost.
->Rollback return
128. What is a Safe State and its use in deadlock avoidance?
When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state
->System is in safe state if there exists a safe sequence of all processes.
->Sequence is safe if for each Pi, the resources that Pi can still request can be satisfied by
currently available resources + resources held by all the Pj, with j
If Pi resource needs are not immediately available, then Pi can wait until all Pj have finished.
When Pj is finished, Pi can obtain
129. What are the Methods for Handling Deadlocks?
->Ensure that the system will never enter a deadlock state.
->Allow the system to enter a deadlock state and then recover.
->Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems, including
UNIX.
130. Different types of Real-Time Scheduling?
Hard real-time systems required to complete a critical task within a guaranteed amount of time.
Soft real-time computing requires that critical processes receive priority over less fortunate ones.