Write-Through, Write-Back, and Write Allocation
Follow stores through a cache and separate when lower levels are updated from what happens on an initial write miss.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A dirty line represents deferred propagation
A write-through cache forwards each store toward the next level, often through a buffer that can combine writes. A write-back cache can retain new values in the cached line and mark it dirty. Before that line is discarded, modified contents must be supplied to the next level or other designated recipient. Repeated updates to one line can then require only one eventual transfer.
A write miss has its own allocation choice
With write allocation, a store can obtain a whole line and then update part of it. With a suitable no-allocation policy, data can be written onward without installing that line at this level. A write-only streaming workload and a repeatedly updated table can favor different choices. Cache-line locality makes the extra transfers visible. Cache coherence adds cooperation among caches that can hold related copies.[1][2]