Operating systems for placements: interview questions by topic
Operating systems is one of the core CS subjects that product and service companies test in placement interviews, alongside DBMS, computer networks and OOP. Candidates are rarely asked to write an operating system; they are asked to explain how one manages processes, memory and storage, and to work out small problems of the kind that appear in written tests: a scheduling table, a page reference string, a banker's algorithm state or a queue of disk requests.
Interviewers look for definitions that hold up under a follow-up question: what a process owns and what threads share, why a race condition happens and how a semaphore prevents it, which four conditions a deadlock needs, how an address is translated through a page table, and what the operating system does on a page fault. Numerical questions test whether you can apply an algorithm step by step without skipping a case.
The pages below take one topic each, with answers and worked examples whose figures were recomputed independently, and one question exactly as the diagnostic asks it. The diagnostic draws from every operating-systems topic in the bank and names the ones to read first.
Operating Systems topics, one page each
8 of the 8 Operating Systems topics in the bank have a page so far; the diagnostic draws from all 8.
- Process vs thread interview questions
OS processes and threads for interviews: what a process is, process vs thread, the PCB, user and kernel threads, IPC, fork and exec.
- CPU scheduling interview questions
CPU scheduling for interviews: scheduling criteria, preemptive vs non-preemptive, waiting time worked out, round robin, SJF and MLFQ.
- Process synchronization interview questions
Process synchronization for interviews: race conditions, critical sections, mutex vs semaphore, wait and signal, producer-consumer, spinlocks.
- Deadlock interview questions
Deadlocks for interviews: what a deadlock is, the four necessary conditions, prevention, avoidance with the banker's algorithm, detection, starvation.
- Memory management interview questions
OS memory management for interviews: paging, address translation worked out, paging vs segmentation, fragmentation, TLB and multi-level tables.
- Virtual memory interview questions
Virtual memory for interviews: why it exists, what a page fault does, demand paging, FIFO, LRU and optimal replacement, clock, copy-on-write.
- File system interview questions
OS file systems for interviews: what a file system does, contiguous, linked and indexed allocation, inodes, free space, journaling, opening files.
- Disk scheduling interview questions
Disk scheduling for interviews: seek time and rotational latency, FCFS and SSTF, SCAN and LOOK, a worked head-movement example, SSDs and RAID.
One question, exactly as the diagnostic asks it
From the Operating Systems bank — 30 questions across 8 topics. The answer is marked because this one is public; in a sitting you choose first, then see why each option is right or wrong.
Which of these is NOT one of the four conditions that must all hold for a deadlock to occur?
- 1A resource can be held by only one process at a time
- 2A process holds some resources while waiting for others
- 3Processes wait for one another in a closed cycle
- 4Resources can be taken away from the processes holding themcorrect
A deadlock needs mutual exclusion (a resource is held by one process at a time), hold and wait (processes hold some resources while waiting for others), no preemption (resources cannot be forcibly taken back) and circular wait (a cycle of processes each waiting for the next). Resources that can be taken away is the opposite of no preemption, so it is not a condition; in fact, allowing preemption is one way to prevent deadlock. The other three options are conditions.
Measure it
Reading the answers tells you what’s true. A diagnostic tells you what you get wrong.
10 Operating Systems questions across its topics, easy to hard, about fifteen minutes. You get a readiness figure with the arithmetic shown, the topics you missed named, and a practice set sized for today. Free: 1 diagnostic a month and 15 problems a day. No card.