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
- First access to a block: compulsory.
- Would a fully associative cache of the same size also have missed? Then it is capacity.
- If the fully associative one would have hit, it is a conflict miss.
- 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.
4 lines · 4 set(s) × 1 way(s) · cache = 32 bytes
| Set | Way 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?
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.