The main write options
Write-through (aka store-through)
- On a write hit, write both in cache and in memory
- On a write miss, the most frequent option is write-around
- Pro: consistent view of memory (better for I/O); no ECC required for cache
- Con: more memory traffic (can be alleviated with write buffers)
Write-back (aka copy-back)
- On a write hit, write only in cache (requires dirty bit)
- On a write miss, most often write-allocate (fetch on miss) but variations are possible
- Pro-con reverse of write through