Learn Operating Systems
Operating systems appear in nearly every computer science exam and many interviews. These quizzes cover processes and threads, scheduling, synchronisation, deadlock and virtual memory.
What you will practise
- Processes versus threads
- CPU scheduling trade-offs
- Deadlock and race conditions
- Virtual memory and paging
Operating Systems lesson
A short introduction to the ideas behind the quizzes, before you start practising.
An operating system manages the CPU, memory and devices so many programs can share one machine safely. Most exam questions come from a handful of ideas: processes and threads, scheduling, synchronisation and virtual memory.
Key concepts
Processes and threads
A process is a running program with its own memory. Threads are lightweight units of execution inside a process that share its memory, which makes them fast to coordinate but easy to get wrong.
Scheduling and context switches
The scheduler decides which process runs next. Switching between them (a context switch) means saving one process’s CPU state and loading another’s, which costs time, so schedulers balance responsiveness against that overhead.
Race conditions and deadlock
When threads touch shared data without coordination, results depend on timing (a race condition); a mutex around the critical section fixes it. When threads wait on each other forever, that is deadlock, which needs mutual exclusion, hold and wait, no preemption and circular wait all at once.
Virtual memory and paging
Virtual memory gives each process its own address space, mapped to physical RAM in pages. A page that is not in RAM triggers a page fault, and the OS loads it from disk.
Common mistakes
- Confusing a process (own memory) with a thread (shared memory inside a process).
- Assuming a page fault is always a crash; it is a normal event that the OS handles.
- Listing time slicing as a deadlock condition; the four conditions are mutual exclusion, hold and wait, no preemption and circular wait.
- Forgetting that very short time quanta add context-switch overhead.
Quick recap
- Processes are isolated; threads in the same process share memory.
- A context switch saves and restores CPU state, and it has a cost.
- Break any one of the four deadlock conditions and deadlock cannot happen.
- Virtual memory uses paging, and page faults are handled by the OS.
Ready to test this? Take the Operating Systems Fundamentals quiz →
Roadmap
Work through the levels in order, or jump to where you are.
Basic
Core concepts
- Processes and threads
- Context switching
- Virtual memory
- Paging
Intermediate
Concurrency and scheduling
- Deadlock
- Race conditions
- Round-robin scheduling
Quiz for this level coming soon.
Operating Systems quizzes
FAQ
Is this specific to Linux or Windows?
No. The quizzes cover general operating system concepts taught in university courses, not one particular product.
Do I need to know how to code?
Basic programming knowledge helps with the concurrency questions, but no particular language is required.