Top 3 Operating systems Interview Questions
Browse 3 real-world technical and behavioral interview questions about Operating systems. Review scenarios, edge cases, and architectural best practices.
State the four conditions for deadlock, then show me how you would stop a real program from deadlocking.
Deadlock needs all four Coffman conditions at once: mutual exclusion, hold and wait, no preemption and circular wait. Breaking any one prevents it, and the practical choice is usually circular wait, by making every thread take locks in one global order.
Process versus thread: what is the difference? Give me one real example and one mistake people make about it.
A process is a running program with its own address space and OS resources; a thread runs inside a process with its own stack and registers but shares its memory and files. In a process vs thread answer, the trap is calling sharing a free win: it makes threads cheap and makes one thread's bug everyone's.
What is virtual memory, and what happens when a process touches a page that is not resident?
Virtual memory gives each process a private address space and lets the MMU map virtual pages to physical frames. A page fault traps to the kernel; a minor fault maps memory cheaply, while a major fault waits for storage and can dominate performance. It also connects PAGING to the point an interviewer is testing.