Memory Hierarchy

Why must cache designs be compared by average memory access time rather than miss rate alone?

  1. AMiss rate cannot be measured, while average memory access time is easy to measure
  2. BA lower miss rate may come with a longer hit time and a slower average
  3. CAverage memory access time depends only on the miss rate, not the hit time
Show answer and explanation

Answer: B. A lower miss rate may come with a longer hit time and a slower average

More associativity or capacity lowers the miss rate but can lengthen the hit time. Comparing a 1-cycle hit with a 5% miss rate against a 2-cycle hit with a 4% miss rate, at a 20-cycle miss penalty, gives 1 + 0.05 × 20 = 2.0 versus 2 + 0.04 × 20 = 2.8, so the lower miss rate is slower. Average memory access time depends on hit time, miss rate and miss penalty together. Miss rates can be measured with performance counters and similar tools.

  • A. Miss rates can be measured with performance counters and the like.
  • B. Correct. A better miss rate can be offset by a worse hit time.
  • C. The average depends on hit time, miss rate and miss penalty.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. Running two programs alternately on the same core can make each slower than running alone. What is the best explanation from a cache perspective?
  2. Which is the best example of temporal locality?
  3. Scanning the 2D C array a[i][j] with j in the inner loop, as above, tends to be faster than with i in the inner loop. Why?
  4. For a direct-mapped cache with 32-bit addresses, 32 KB capacity and 64-byte lines, how many tag bits are there?
  5. How many sets does a 4-way set-associative cache with 32-bit addresses, 32 KB capacity and 64-byte lines have?