which block should be replaced in a cache miss?
block replacement strategies
on cache miss, hardware must select a block to be replaced.
direct mapping; only one block checked for hit, and only one block can be
replaced.
with set associative and fully associative, there may be many
blocks to choose from.
2 strategies for selecting block to replace:
- random (evict at random), or use pseudorandom block selector for easier
debugging
- LRU (least recently used).
LFU (least frequently used) is not generally one of the methods of block
selection.