DSA Tracker

DSA Tracker

Operating Systems interview practice

The 40 questions, ranked by how many of the surveyed prep sources list each one.

Operating Systems Interview Questions (All 40 Reference)

Printable cheat sheet →
#1 (os-001)•medium•Asked in 12 surveyed sources

What is thrashing in an operating system, and how does it degrade system performance?

Interview one-liner: Thrashing occurs when an operating system spends significantly more time swapping virtual memory pages than executing useful process instructions.

#2 (os-002)•easy•Asked in 11 surveyed sources

What are the core differences between a process and a thread?

Interview one-liner: A process is an isolated program instance with its own address space, while a thread is a lightweight execution unit sharing memory inside that process.

#3 (os-003)•medium•Asked in 11 surveyed sources

Under a demand paging scheme in virtual memory, when is a page brought from disk into physical RAM?

Interview one-liner: In demand paging, a page is loaded into physical memory only when a running process references an address on that page and triggers a page fault.

#4 (os-004)•medium•Asked in 11 surveyed sources

What is a deadlock in an operating system, and what basic situation causes it?

Interview one-liner: A deadlock is a permanent stall where each process in a set holds a resource and waits for another resource held by another process in that set.

#5 (os-005)•easy•Asked in 10 surveyed sources

What fundamental capability does virtual memory provide to modern computing systems?

Interview one-liner: Virtual memory creates an illusion of a large contiguous address space, allowing programs larger than physical RAM to execute reliably.

#6 (os-006)•medium•Asked in 10 surveyed sources

How do operating system CPU scheduling algorithms differ across preemptive and non-preemptive strategies?

Interview one-liner: CPU scheduling chooses which ready process gets the CPU next, balancing throughput, turnaround time, and latency using preemptive or non-preemptive policies.

#7 (os-007)•medium•Asked in 10 surveyed sources

Explain the concepts of process starvation and aging in operating system scheduling.

Interview one-liner: Starvation occurs when a runnable process is indefinitely postponed by higher-priority tasks, and aging prevents this by steadily raising its priority over time.

#8 (os-008)•easy•Asked in 9 surveyed sources

What is an operating system, and what are its primary resource management responsibilities?

Interview one-liner: An operating system is system software that manages hardware resources and provides a secure, abstracted platform for user applications to execute.

#9 (os-009)•easy•Asked in 9 surveyed sources

Which data structure does the operating system kernel use to track the state, resources, and execution context of a process?

Interview one-liner: A process is a program in active execution, represented in kernel memory by a Process Control Block containing its complete runtime context.

#10 (os-010)•easy•Asked in 9 surveyed sources

Describe the standard states a process transitions through during its execution lifecycle.

Interview one-liner: A process moves through New, Ready, Running, Waiting, and Terminated states as the OS allocates CPU time and manages I/O events.

#11 (os-011)•easy•Asked in 9 surveyed sources

According to standard operating system definitions, what is the defining characteristic of the kernel?

Interview one-liner: The kernel is the one program running at all times on the computer, executing in privileged mode to manage system resources.

#12 (os-012)•medium•Asked in 9 surveyed sources

What occurs during a CPU context switch, and why is context switching considered pure overhead?

Interview one-liner: A context switch saves the CPU register state of a running process and restores another, introducing pure overhead because no user code executes.

#13 (os-013)•medium•Asked in 9 surveyed sources

List and explain the four Coffman conditions necessary for a deadlock to occur.

Interview one-liner: Deadlock requires four simultaneous Coffman conditions: mutual exclusion, hold and wait, no preemption, and circular wait.

#14 (os-014)•easy•Asked in 9 surveyed sources

What is the difference between a logical address and a physical address in operating systems?

Interview one-liner: A logical address is generated by the CPU during program execution, whereas a physical address identifies an actual hardware location in physical RAM.

#15 (os-015)•easy•Asked in 9 surveyed sources

Compare internal fragmentation and external fragmentation in operating system memory management.

Interview one-liner: Internal fragmentation is wasted space inside an allocated memory partition, while external fragmentation is scattered free memory outside allocated blocks.

#16 (os-016)•easy•Asked in 8 surveyed sources

From an architectural perspective, what are the two primary purposes of a modern computer operating system?

Interview one-liner: The dual purpose of an operating system is to multiplex hardware resources efficiently and to provide clean, secure abstractions for application programs.

#17 (os-017)•easy•Asked in 8 surveyed sources

Which type of operating system is strictly required for environments where missing a processing deadline causes mission-critical system failure?

Interview one-liner: A hard real-time OS is needed when a missed deadline is catastrophic, because it guarantees bounded, deterministic response times.

#18 (os-018)•easy•Asked in 8 surveyed sources

Which resources are private to an individual thread and NOT shared with other threads in the same process?

Interview one-liner: A thread is a lightweight execution stream within a process, sharing code, data, and open files while keeping its own stack and registers.

#19 (os-019)•medium•Asked in 8 surveyed sources

What are the core architectural differences between paging and segmentation in memory management?

Interview one-liner: Paging splits memory into fixed-size hardware blocks eliminating external fragmentation, whereas segmentation divides memory into variable-size logical units reflecting program structure.

#20 (os-020)•medium•Asked in 8 surveyed sources

What is Belady's anomaly in operating systems, and which page replacement algorithm demonstrates it?

Interview one-liner: Belady's anomaly is the counter-intuitive behavior where increasing physical page frames increases total page faults under FIFO page replacement.

#21 (os-021)•medium•Asked in 8 surveyed sources

Which RAID configuration stripes data across multiple disks with distributed parity to provide both fault tolerance and high read throughput?

Interview one-liner: RAID combines multiple physical disk drives into a single logical storage array to provide redundancy, enhanced performance, or both.

#22 (os-022)•medium•Asked in 8 surveyed sources

How does a counting semaphore behave when a process invokes the wait() (or P) operation versus the signal() (or V) operation?

Interview one-liner: A semaphore is a synchronization variable accessed only through atomic wait() and signal() operations to manage concurrent access to shared resources.

#23 (os-023)•easy•Asked in 8 surveyed sources

What is the defining distinction between Hard Real-Time and Soft Real-Time operating systems?

Interview one-liner: In a hard real-time system, missing a deadline results in total system failure, while a soft real-time system tolerates occasional delays with reduced quality.

#24 (os-024)•medium•Asked in 7 surveyed sources

What is the primary role of Dijkstra's Banker's Algorithm in operating system resource management?

Interview one-liner: The Banker's algorithm is a deadlock avoidance algorithm that grants resource requests only if the resulting allocation leaves the system in a guaranteed safe state.

#25 (os-025)•easy•Asked in 7 surveyed sources

What does Spooling (Simultaneous Peripheral Operations On-Line) accomplish in an operating system?

Interview one-liner: Spooling buffers data for slow peripheral devices on high-speed disk storage, allowing the CPU to complete processing without blocking.

#26 (os-026)•medium•Asked in 7 surveyed sources

What defines a zombie process in Unix-like operating systems, and how is it properly eliminated?

Interview one-liner: A zombie process has finished executing but retains an entry in the process table until its parent reads its exit status code.

#27 (os-027)•medium•Asked in 7 surveyed sources

What is Inter-Process Communication (IPC), and what are the primary mechanisms operating systems provide for it?

Interview one-liner: Inter-Process Communication provides mechanisms like shared memory, message queues, pipes, and sockets for isolated processes to exchange data and coordinate execution.

#28 (os-028)•medium•Asked in 7 surveyed sources

Contrast the architectural designs of a monolithic kernel and a microkernel.

Interview one-liner: Monolithic kernels run all OS services in privileged kernel space for raw speed, while microkernels move most services to user space for modularity and fault isolation.

#29 (os-029)•easy•Asked in 6 surveyed sources

Explain the fundamental differences between a program and a process in computer systems.

Interview one-liner: A program is a passive executable file stored on disk, whereas a process is an active program instance currently executing in memory with dedicated resources.

#30 (os-030)•easy•Asked in 6 surveyed sources

What fundamental rule dictates the difference between preemptive and non-preemptive CPU scheduling?

Interview one-liner: In preemptive scheduling the OS can forcibly reclaim the CPU from a running process, whereas in non-preemptive scheduling the process controls the CPU until it yields.

#31 (os-031)•medium•Asked in 6 surveyed sources

In Round Robin (RR) CPU scheduling, what is the impact of choosing an excessively large versus an excessively small time quantum?

Interview one-liner: Round Robin assigns each ready process a fixed time slice in circular order, balancing fairness against context switching overhead.

#32 (os-032)•easy•Asked in 6 surveyed sources

What are the four primary benefits of multithreaded programming in modern software systems?

Interview one-liner: Multithreading improves application responsiveness, enables lightweight resource sharing, lowers context switching overhead, and scales across multiple CPU cores.

#33 (os-033)•medium•Asked in 6 surveyed sources

What fundamental memory management problem does paging solve, and how does it accomplish this?

Interview one-liner: Paging eliminates external fragmentation by allowing physical memory to be allocated to processes non-contiguously in fixed-size frames.

#34 (os-034)•easy•Asked in 6 surveyed sources

Under what specific condition does external fragmentation occur in primary memory?

Interview one-liner: External memory fragmentation occurs when total free memory is sufficient to satisfy a request, but the memory is split into non-contiguous blocks.

#35 (os-035)•medium•Asked in 6 surveyed sources

Which page replacement algorithm is provably optimal by replacing the page that will not be used for the longest period of time, serving as a theoretical benchmark?

Interview one-liner: Optimal page replacement evicts the page unreferenced for the longest future time, while LRU uses past references to approximate this ideal.

#36 (os-036)•easy•Asked in 6 surveyed sources

What is a system call in an operating system, and how does user software invoke one?

Interview one-liner: A system call provides the essential programmatic interface allowing user-space programs to safely request privileged services from the operating system kernel.

#37 (os-037)•easy•Asked in 6 surveyed sources

In network operating systems and inter-process communication, what two core elements define a network socket endpoint?

Interview one-liner: A socket is an endpoint for bidirectional network communication uniquely identified by the combination of an IP address and a port number.

#38 (os-038)•medium•Asked in 5 surveyed sources

What is a primary functional distinction between a mutex and a binary semaphore?

Interview one-liner: A mutex is a locking mechanism owned solely by the thread that locked it, whereas a semaphore is a signaling mechanism without ownership.

#39 (os-039)•medium•Asked in 5 surveyed sources

What constitutes a critical section in concurrent programming, and what fundamental requirement must a solution satisfy?

Interview one-liner: A critical section is a code block accessing shared mutable data that must execute with mutual exclusion to prevent race conditions.

#40 (os-040)•easy•Asked in 5 surveyed sources

Why do modern processors and operating systems implement dual-mode operation with user mode and kernel mode?

Interview one-liner: Dual-mode operation protects the system by restricting privileged CPU instructions and direct hardware access exclusively to kernel mode.

More interview rounds