Memory Hierarchy

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?

  1. ACompulsory miss
  2. BCapacity miss
  3. CConflict miss
Show answer and explanation

Answer: C. Conflict miss

Misses where two pieces of data fight over the same set and evict each other, even though the cache as a whole has room, are conflict misses. Raising associativity so a set can hold both, or offsetting one array so it maps to different sets, reduces them. Capacity misses arise because the working set exceeds the whole cache and persist even with full associativity. Compulsory misses happen on first access and do not describe repeated accesses.

  • A. Compulsory misses occur only on the first access.
  • B. Capacity misses occur when the whole cache is too small.
  • C. Correct. It is a conflict miss from competing for the same set.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. Which method is effective at reducing the cache misses that occur when a program accesses data for the first time?
  2. Which misses are not reduced even by making a cache fully associative?
  3. What is the effect of increasing a cache's line size?
  4. What is the main purpose of a write buffer in a write-through cache?
  5. In a write-back cache, what is the role of the dirty bit attached to each line?