tags:- cache
- computer-architecture
- hardware
- optimization
- cpu
Update Policies
These describe what to do after an operation has been done on certain memory. If we were to write the output only to main mem, then cache would be incorrect.
For write hits:
Write through: Each time you write to main memory, also write to cache.
Write back: Write to cache only. Write to main memory only when the cache line is to be discarded/replaced.
For write misses:
Write around: If you can't find the cache entry, then just write to main memory and do nothing else.
Write allocate: Do write around and then load the block of memory into cache.