← ⚡ Cache Memory
Subtopic 8 of 9

3.8Miss types (3 C's)

The idea

Every cache miss has a reason: compulsory (first touch), capacity (cache too small) or conflict (too many blocks mapped to one set).

Think of it like this: Why your desk is cluttered: you never saw the book before; you have too many books for the desk; or all your books are stuck on the same corner.

Why it exists

Knowing the cause tells you the cure: bigger cache for capacity, more ways for conflict, prefetching for compulsory.

How it works

  1. First access to a block: compulsory.
  2. Would a fully associative cache of the same size also have missed? Then it is capacity.
  3. If the fully associative one would have hit, it is a conflict miss.
  4. Fully associative caches have no conflict misses.

Worked example: Direct-mapped, 4 lines

Re-reading block 0 after block 4 evicted it, while the cache still has free lines elsewhere, is a conflict miss.

Now play with it

  • →Step through; each MISS in the Result box now names its type.
  • →Change Ways to "fully assoc." and watch conflict misses vanish.
Tag 5 bits
Set 2 bits
Offset 3 bits

4 lines · 4 set(s) × 1 way(s) · cache = 32 bytes

Access0 / 10
Last address-
Block → set-
Result-
Hits0
Hit ratio-
SetWay 0
0·
1·
2·
3·

Check yourself

A block was evicted and later re-fetched, although a fully associative cache of the same size would still have held it. Miss type?

Remember: Compulsory = first time, capacity = too small, conflict = bad mapping.
Exam notes (the dense version)

Compulsory (first access), Capacity (cache too small), Conflict (set/line contention; none in fully associative).

Previous year questions: Cache Memory (22)

PYQs are grouped by topic, so this is the full set for Cache Memory; try the ones that match this subtopic. Open all 22 on the topic page.