Cache Block Replacement Policies

Block Replacement Algorithms

Since the cache will fill up, it is necessary to have a strategy for replacing data in cache

Write Policies for Caches

Reads and Writes in a Cache

Write-Through Caches

Update both the cache and main memory for each write

Write-Back Caches

The memory is not updated until the cache block needs to be replaced

Write Miss

What if the memory address we want to write to is not loaded into cache?

Allocate on Write

This strategy loads the newly written data into the cache

Write Around

The write operation goes directly to main memory without affecting the cache