Memory Hierarchy
What changes when a cache is switched from direct-mapped to set-associative?
- AConflict misses decrease, but tag comparison and way selection tend to lengthen hit time
- BConflict misses increase, but simpler circuits shorten hit time
- CNeither miss rate nor hit time changes at all, regardless of associativity
Show answer and explanation
Answer: A. Conflict misses decrease, but tag comparison and way selection tend to lengthen hit time
A set-associative cache has several ways per set, so multiple blocks mapping to the same set can coexist, reducing conflict misses compared with a direct-mapped cache. The cost is circuitry that compares several tags in parallel and selects the matching way, which tends to increase hit time and power. More conflict misses and simpler circuits describe the direct-mapped side. Both miss rate and hit time change with associativity.
- A. Correct. Conflict misses drop, but hit time tends to increase.
- B. This is reversed and describes a direct-mapped cache.
- C. Miss rate and hit time both change with associativity.