Skip to content

Operating Systems -- Practice Problems

Operating Systems — Practice Problems

10 MCQ questions covering CPU scheduling, synchronization, deadlock, memory management, paging, and virtual memory. Select an option to check your answer and view the explanation.

Intuition

An air traffic controller for your CPU: The OS is like an air traffic controller, it decides which plane (process) gets which runway (CPU time), manages the fuel supply (memory), and prevents mid-air collisions (race conditions). Without it, everything crashes.

Why it matters: Understanding OS concepts explains why your computer slows down with too many tabs open, why virtual memory exists, and how processes communicate. It’s the foundation for systems programming, DevOps, and security.

The key insight: Virtual memory gives each process the illusion of unlimited RAM by swapping pages to disk, but when the working set exceeds physical memory, thrashing turns your computer into a very expensive paperweight.


Process Scheduling and Synchronization

Memory Management and Virtual Memory

Common Mistakes

Confusing processes with threads: Processes have their own memory space. Threads share memory within a process. Don’t use them interchangeably.

Assuming more frames always reduces page faults: Belady’s anomaly shows that with FIFO, more frames can increase page faults. LRU and Optimal don’t have this problem.

Mixing up virtual memory with virtual machines: Virtual memory is an OS technique for using disk as extended RAM. Virtual machines are emulated computers running on hardware. They’re different concepts.

Cross-References

  • Operating Systems: Process management, synchronisation, and deadlocks.
  • Operating Systems Flashcards: Interactive flashcards covering OS concepts.