Abstract
- Once the Cache Server is full, any requests to add items to the cache server might cause existing items to be removed
- Can be handled gracefully with Eviction Policy
CPU Cache
In both set-associative and fully associative caches, an eviction policy is necessary to determine which cache line to replace when a new line needs to be loaded. This is because multiple memory addresses can map to the same set of cache lines. In contrast, a direct-mapped cache has a one-to-one mapping between memory addresses and cache lines. Therefore, when a new line needs to be loaded, the existing line at that specific location is simply replaced.
Eviction Policy
- Strategies to handle Cache Eviction
- One common strategy is LRU which takes advantage of Temporal Locality
Other common policies
First in first out (FIFO)
- Removes the oldest items first.
Least frequently used (LFU)
- Removes the least often accessed items.