Interview Q&A / Operating Systems
Operating Systems interview questions
Processes, threads, scheduling, memory and deadlocks, in plain words.
Prefer rapid revision? Practise Operating Systems short interview answers →
- What is virtual memory, and how does paging work?
Virtual memory gives every process its own private address space that looks large and continuous, while the OS maps it onto real RAM in fixed-size blocks called pages (often 4 KB). A page table translates each virtual page to a physical frame, and pages not in RAM can be kept on disk and loaded on demand through a page fault.
IntermediateIn-depth4 min read - What is thrashing in an operating system, and how can it be prevented?
Thrashing is when a system spends most of its time moving pages between RAM and disk instead of running programs, because the running processes together need more memory than is available. It is prevented by giving each process enough frames for its working set, controlling page-fault rate, and reducing the number of running processes.
AdvancedIn-depth4 min read