Memory Hierarchy

With an L1 hit time of 1 ns and miss rate of 5%, an L2 hit time of 10 ns and local miss rate of 20%, and main memory access time of 100 ns, what is the average memory access time?

  1. A2.0 ns
  2. B2.5 ns
  3. C6.0 ns
Show answer and explanation

Answer: B. 2.5 ns

The L1 miss penalty is the L2 average access time, 10 + 0.2 × 100 = 30 ns. The average memory access time is therefore 1 + 0.05 × 30 = 1 + 1.5 = 2.5 ns. 2.0 ns forgets the 10 ns L2 hit time, computing 1 + 0.05 × (0.2 × 100). 6.0 ns multiplies the 100 ns memory time directly by the L1 miss rate, ignoring the L2.

  • A. 2.0 ns forgets to add the L2 hit time.
  • B. Correct. 1 + 0.05 × (10 + 0.2 × 100) = 2.5 ns.
  • C. 6.0 ns ignores the L2 and multiplies by the memory time.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. In a direct-mapped cache, elements of two arrays map to the same cache location and evict each other on every alternating access. How is this miss classified?
  2. Which method is effective at reducing the cache misses that occur when a program accesses data for the first time?
  3. Which misses are not reduced even by making a cache fully associative?
  4. What is the effect of increasing a cache's line size?
  5. What is the main purpose of a write buffer in a write-through cache?