Understanding the clock algorithm for page replacement
This is an easy conceptual question on operating-systems memory management, frequently asked at firms like Quant where systems knowledge matters. It tests whether you understand a practical page-replacement policy and can explain how it balances simplicity with reasonable performance.
The clock algorithm is one of the most common approximate-LRU (least-recently-used) strategies used by operating systems to decide which memory page to evict when the physical frame pool is full. The question asks you to explain the core mechanism: how the algorithm uses a circular buffer, a reference bit or use flag, and a clock hand pointer to identify candidate pages for removal.
- Page replacement policies and their trade-offs
- Reference bits and use tracking
- Circular scan and eviction fairness
- Difference between optimal, LRU, and approximate-LRU algorithms