Memory Hierarchy

What is the effect of increasing a cache's line size?

  1. ACompulsory misses increase and the miss penalty decreases
  2. BThe miss rate keeps falling monotonically for every program
  3. 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.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. What is the main purpose of a write buffer in a write-through cache?
  2. In a write-back cache, what is the role of the dirty bit attached to each line?
  3. Which policy, on a write miss, writes directly to the lower level without loading the line into the cache?
  4. A fully associative cache holding 2 lines with LRU replacement starts empty. If blocks are referenced in the order A, B, A, C, B, A, how many misses occur?
  5. For which access pattern is hardware prefetching especially effective?