Questions: Cache Replacement Policies

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A program accesses memory blocks in a strict cyclic pattern: A, B, C, D, E, A, B, C, D, E, ... and the cache holds 4 blocks. LRU is used. What happens?

ALRU performs well because it keeps the most recently used blocks ready
BLRU suffers near-constant misses because it evicts the block that will be needed next in the cycle
CLRU and FIFO produce identical miss rates on cyclic patterns
DLRU automatically detects cyclic patterns and switches to a larger effective cache
Question 2 Multiple Choice

Why do real processors use pseudo-LRU instead of exact LRU for highly associative caches?

APseudo-LRU produces fewer misses than exact LRU in all workloads
BExact LRU requires tracking the full access order of all blocks in a set, demanding too much hardware state and logic
CFIFO is preferred over both LRU variants in modern cache designs
DPseudo-LRU is mandated by the x86 architecture specification
Question 3 True / False

Random replacement is a naive fallback strategy that is typically outperformed by LRU and FIFO in practice.

TTrue
FFalse
Question 4 True / False

FIFO can exhibit more cache misses when cache size is increased — a phenomenon called Belady's anomaly.

TTrue
FFalse
Question 5 Short Answer

Why can random replacement sometimes outperform LRU, and what does this reveal about replacement policy design?

Think about your answer, then reveal below.