Write-once (cache coherence)


In cache coherency protocol literature, Write-Once was the first MESI protocol defined. It has the optimization of executing write-through on the first write and a write-back on all subsequent writes, reducing the overall bus traffic in consecutive writes to the computer memory. It was first described by James R. Goodman in . Cache coherence protocols are an important issue in Symmetric multiprocessing systems, where each CPU maintains a cache of the memory.

States

In this protocol, each block in the local cache is in one of these four states:
These states have exactly the same meanings as the four states of the MESI protocol, but this is a simplified form of it that avoids the Read for Ownership operation. Instead, all invalidation is done by writes to main memory.
For any given pair of caches, the permitted states of a given cache line are as follows :
I V R D
I
V
R
D

Transitions

The protocol follows some transition rules for each event:
This is a variant of the MESI protocol, but there is no explicit read-for-ownership or broadcast invalidate operation to bring a line into cache in the Exclusive state without performing a main memory write. Instead, the first write to a Valid cache line performs a write through to memory, which implicitly invalidates other caches. After that, the line is in the Reserved state, and further writes can be done without reference to main memory, leaving the cache line in the Dirty state.