Memory Hierarchy
In contrast to LRU, which evicts the least recently used block, optimal replacement (OPT) evicts the block that will not be used for the longest time. Which statement about OPT is correct?
- AIt is the most common replacement policy, widely used in real caches
- BIt cannot be built but gives a lower bound on misses
- CIt produces exactly the same number of misses as LRU for every access sequence
Show answer and explanation
Answer: B. It cannot be built but gives a lower bound on misses
Optimal replacement (Bélády's OPT) assumes the future access order is known and evicts the block whose next use is furthest away, giving the theoretical minimum number of misses. Real hardware cannot see the future, so it cannot be implemented; instead it is applied to recorded access traces to evaluate how close policies such as LRU come to optimal. It evicts different blocks than LRU, so miss counts generally differ.
- A. It requires knowing the future, so real caches cannot use it.
- B. Correct. It cannot be built but provides a lower bound on misses.
- C. It evicts different blocks, so miss counts generally differ.