Understanding optimal page replacement in operating systems
This is a foundational question in operating systems that tests whether you grasp the difference between theoretical optimality and practical feasibility in memory management. Page replacement algorithms are central to virtual memory systems—they decide which page to evict from physical memory when space runs out. Interviewers ask this question to confirm you understand why certain algorithms are provably best but remain unrealizable.
The question probes your knowledge of the trade-offs between algorithmic guarantees and real-world constraints. A strong answer identifies the key limitation that makes an otherwise optimal strategy impossible to execute in a running system, and explains why practical alternatives (like LRU, FIFO, or clock-based schemes) exist as compromises. Understanding this distinction is essential for anyone working on memory-constrained systems or reasoning about kernel behavior.
- Why optimality requires information we cannot have at runtime
- How practical algorithms approximate theoretical ideals
- The cost of page faults and eviction policies