Memory Hierarchy

In a typical computer's memory hierarchy, which property holds more strongly for upper levels (closer to the CPU)?

  1. AFaster, but smaller in capacity and more expensive per bit
  2. BSlower, but larger in capacity and cheaper per bit
  3. CFaster, larger and cheaper per bit
Show answer and explanation

Answer: A. Faster, but smaller in capacity and more expensive per bit

Storage closer to the CPU, such as registers and L1 cache, is faster but uses area-hungry circuits such as SRAM, so it costs more per bit and has less capacity. Lower levels are slower but cheaper and larger, continuing to DRAM main memory and then storage such as SSDs. If fast, large and cheap memory existed there would be no need for a hierarchy; since it does not, the hierarchy exploits locality to keep needed data in small, fast memory.

  • A. Correct. Upper levels are faster but smaller and costlier per bit.
  • B. This describes lower levels, farther from the CPU.
  • C. A hierarchy is needed precisely because fast, large and cheap memory does not exist.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. Why must cache designs be compared by average memory access time rather than miss rate alone?
  2. Running two programs alternately on the same core can make each slower than running alone. What is the best explanation from a cache perspective?
  3. Which is the best example of temporal locality?
  4. 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?
  5. For a direct-mapped cache with 32-bit addresses, 32 KB capacity and 64-byte lines, how many tag bits are there?