Temporal and Spatial Locality Revisited: Replacement/Eviction Policies and Block Sizes
Caches can increase the amount of benefit they derive from temporal locality by implementing an intelligent replacement policy (also called, conversely, an eviction policy). A replacement policy dictates which of the blocks currently in the cache will be replaced by any new block that gets fetched in. (Or, another way of putting it is that an eviction policy dictates which of the blocks currently in the cache will be evicted in order to make room for any new blocks that are fetched in.)
Types of Replacement/Eviction Policies
One way to implement a replacement policy would be to pick a block at random to be replaced. Other possible replacement policies would be ...