Memory Hierarchy
What is the effect of increasing a cache's line size?
- ACompulsory misses increase and the miss penalty decreases
- BThe miss rate keeps falling monotonically for every program
- CSpatial locality is better exploited, but the miss penalty grows
Show answer and explanation
Answer: C. Spatial locality is better exploited, but the miss penalty grows
Larger lines bring in more neighboring data per miss, so workloads with spatial locality see fewer compulsory misses. On the other hand, each miss transfers more data, increasing the miss penalty, and at the same capacity there are fewer lines, raising conflict misses and loads of unused data. Lines that are too large therefore increase the miss rate rather than lowering it indefinitely. Saying compulsory misses increase gets it backwards.
- A. Compulsory misses actually decrease, and the miss penalty increases.
- B. Lines that are too large reduce the line count and raise the miss rate.
- C. Correct. Locality is exploited, but the miss penalty rises.