|
Final
Strategies in Caches:
- Cache
write is more complicated than cache read because even if
you
have a hit, you have to decide if and when you write it back
to main
memory. This is of utmost importance in multiprocessor systems.
-
Two main strategies are used:
-1. Write-through
a)All writes are passed to main memory immediately
b)If there is a hit, the cache is updated to hold new value
c)Processor slows down to main memory speed during write
-2. Write-back
a)Write operation updates the cache, but not main memory
b)Cache remembers that it is different from main memory via
a
dirty bit
c)It is written back to main memory only when the cache line
is
used by new data
|
| |
|