A Summary (Cont.)
What Happens on a Write?
The two methods, write through and write back, were mentioned before:
- Write through:
Includes the following advantages:
- Misses are simpler and cheaper because they never require a block to be written back to the memory.
- It is easier to implement than write-back.
- Write back:
Includes the following advantages:
- Individual words can be written by the processor at the rate that the cache, rather than the memory, can accept them.
- Multiple writes within a block require only one write to the memory.
- When blocks are written back, the system can make use of a high-bandwidth transfer, since the entire block is written.
In virtual memory systems, only a write-back policy is practical because of the long latency of a write to the memory.
The Three Cs
The three Cs model is a cache model in which all cache misses are classified into one of the three categories:
- Compulsory/cold-start miss,
which is caused by the first access to a block that has never been in the cache.
- Capacity miss,
which occurs because the cache, even with full associativity, cannot contain all the blocks needed to satisfy the request.
- Conflict/collision miss,
which occurs in a set-associative or direct-mapped cache when multiple blocks compete for the same set and that are eliminated in a fully associative cache of the same size.