Memory Hierarchy

In a multilevel cache with an L2 below the L1, what is the L2's main role?

  1. ATo eliminate L1 misses altogether by having a faster hit time than the L1
  2. BLarger and slower than L1, it reduces the L1 miss penalty
  3. CTo always hold all of the program's data in place of main memory
Show answer and explanation

Answer: B. Larger and slower than L1, it reduces the L1 miss penalty

L1 is built small for speed, so some misses are inevitable. L2 is larger with a longer hit time but still much faster than main memory, so it catches most L1 misses and cuts the L1 miss penalty well below a trip to memory. It is not faster than L1 and cannot eliminate L1 misses. Its capacity is far smaller than main memory, so it cannot hold all data.

  • A. L2 is slower than L1 and cannot eliminate L1 misses.
  • B. Correct. It absorbs most L1 misses, reducing the miss penalty.
  • C. Its capacity is far smaller than main memory, so not all data fits.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. Which describes an inclusive cache, where a lower level (such as L2) contains everything in the upper level (L1)?
  2. What changes when a cache is switched from direct-mapped to set-associative?
  3. In an 8-way set-associative cache, how many tags are compared in parallel on each access?
  4. In a cache with 64-byte lines and 64 sets, which set holds the data at address 0x1234?
  5. For code that writes to the same line many times, why is a write-back cache more advantageous than write-through?