# Operating Systems Interview Questions

> Processes and threads, CPU scheduling, synchronization, deadlocks, paging, virtual memory, and page replacement.

Canonical: https://www.internhack.in/learn/interview/operating-systems-interview
Last updated: 2026-11-28

Processes and threads, CPU scheduling, synchronization, deadlocks, paging, virtual memory, and page replacement.

## 30 questions in this section

- [What is an Operating System and what are its main functions?](https://www.internhack.in/learn/interview/operating-systems-interview/os-what-is-an-operating-system) (Beginner)
- [Explain kernel mode vs user mode and how system calls work](https://www.internhack.in/learn/interview/operating-systems-interview/os-kernel-mode-user-mode-system-calls) (Beginner)
- [Monolithic kernel vs microkernel: differences and trade-offs](https://www.internhack.in/learn/interview/operating-systems-interview/os-monolithic-vs-microkernel) (Intermediate)
- [Program vs process: what is the difference?](https://www.internhack.in/learn/interview/operating-systems-interview/os-process-vs-program) (Beginner)
- [Process states, state transitions and the Process Control Block](https://www.internhack.in/learn/interview/operating-systems-interview/os-process-states-and-pcb) (Beginner)
- [Process vs thread: key differences](https://www.internhack.in/learn/interview/operating-systems-interview/os-process-vs-thread) (Beginner)
- [User-level threads vs kernel-level threads and threading models](https://www.internhack.in/learn/interview/operating-systems-interview/os-user-level-vs-kernel-level-threads) (Advanced)
- [What is a context switch and why is it expensive?](https://www.internhack.in/learn/interview/operating-systems-interview/os-context-switch-cost) (Intermediate)
- [fork() and exec(): predict the output](https://www.internhack.in/learn/interview/operating-systems-interview/os-fork-exec-output-questions) (Intermediate)
- [Zombie and orphan processes](https://www.internhack.in/learn/interview/operating-systems-interview/os-zombie-and-orphan-processes) (Intermediate)
- [Inter-process communication: pipes, shared memory and message queues](https://www.internhack.in/learn/interview/operating-systems-interview/os-ipc-pipes-shared-memory-message-queues) (Intermediate)
- [CPU scheduling algorithms: FCFS, SJF, SRTF, Round Robin, Priority](https://www.internhack.in/learn/interview/operating-systems-interview/os-cpu-scheduling-algorithms) (Beginner)
- [Worked example: Gantt charts and average waiting time for FCFS, SJF, SRTF and RR](https://www.internhack.in/learn/interview/operating-systems-interview/os-scheduling-gantt-chart-worked-example) (Intermediate)
- [Starvation, priority inversion and aging in scheduling](https://www.internhack.in/learn/interview/operating-systems-interview/os-starvation-and-aging) (Beginner)
- [Race conditions and the critical section problem](https://www.internhack.in/learn/interview/operating-systems-interview/os-race-condition-and-critical-section) (Beginner)
- [Mutex vs semaphore (binary and counting)](https://www.internhack.in/learn/interview/operating-systems-interview/os-mutex-vs-semaphore) (Intermediate)
- [The producer-consumer (bounded buffer) problem](https://www.internhack.in/learn/interview/operating-systems-interview/os-producer-consumer-problem) (Intermediate)
- [Readers-writers and dining philosophers problems](https://www.internhack.in/learn/interview/operating-systems-interview/os-readers-writers-and-dining-philosophers) (Advanced)
- [Spinlocks, test-and-set and when to spin versus sleep](https://www.internhack.in/learn/interview/operating-systems-interview/os-spinlocks-and-atomic-instructions) (Advanced)
- [Deadlock: four necessary conditions and prevention strategies](https://www.internhack.in/learn/interview/operating-systems-interview/os-deadlock-conditions-and-prevention) (Intermediate)
- [Banker's algorithm: safe state and worked example](https://www.internhack.in/learn/interview/operating-systems-interview/os-bankers-algorithm-worked-example) (Advanced)
- [Deadlock detection and recovery](https://www.internhack.in/learn/interview/operating-systems-interview/os-deadlock-detection-and-recovery) (Advanced)
- [Paging, page tables and the TLB](https://www.internhack.in/learn/interview/operating-systems-interview/os-paging-page-tables-and-tlb) (Intermediate)
- [Segmentation vs paging and segmented paging](https://www.internhack.in/learn/interview/operating-systems-interview/os-segmentation-vs-paging) (Intermediate)
- [Internal vs external fragmentation and how to reduce them](https://www.internhack.in/learn/interview/operating-systems-interview/os-internal-vs-external-fragmentation) (Beginner)
- [Virtual memory, demand paging and page faults](https://www.internhack.in/learn/interview/operating-systems-interview/os-virtual-memory-and-demand-paging) (Intermediate)
- [Page replacement: FIFO, LRU and Optimal with a worked example](https://www.internhack.in/learn/interview/operating-systems-interview/os-page-replacement-fifo-lru-optimal) (Advanced)
- [Thrashing and Belady's anomaly](https://www.internhack.in/learn/interview/operating-systems-interview/os-thrashing-and-beladys-anomaly) (Advanced)
- [File systems, inodes and directory structure](https://www.internhack.in/learn/interview/operating-systems-interview/os-file-systems-and-inodes) (Intermediate)
- [Disk scheduling: FCFS, SSTF, SCAN and C-SCAN](https://www.internhack.in/learn/interview/operating-systems-interview/os-disk-scheduling-algorithms) (Beginner)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
