Memory can legally lag a write-back cache. The error is returning its old value when the line's history requires the newer one. Review The Data-Value Invariant rather than using agreement with memory as the reference.
In each independent case below, X started at 0 and C0's last store wrote 5. No later store occurred. The rows are snapshots, not a sequence.
Case | C0 state / value | C1 state / value | H directory | Memory | Newest data |
|---|---|---|---|---|---|
MESI, dirty exclusive | M / 5 | I / - | exclusive(C0) | 0 | C0: 5 |
MOESI, dirty shared | O / 5 | S / 5 | O: C0, sharers {C1} | 0 | C0 and C1: 5 |
Pending transfer, Data at H | I / - | IM^D / - | exclusive(C0), pend GetM C1 | 0 | H buffer: 5 |
Incorrect refill | I / - | M / 0 | exclusive(C1) | 0 | none: the newest value 5 was lost |
MSI, settled sharing | S / 5 | S / 5 | S{C0,C1} | 5 | C0, C1 and memory: 5 |
Case | Verdict |
|---|---|
MESI, dirty exclusive | Legal: memory stale, C0 is responsible |
MOESI, dirty shared | Legal: memory stale, C0 (O) is responsible |
Pending transfer, Data at H | Legal while pending: H must grant 5, not memory's 0 |
Incorrect refill | Bug: C1 was granted memory's stale 0 |
MSI, settled sharing | Legal: memory current |
The pending-transfer row has no usable cache copy, but it is not U. H holds the newest data and has not finished the transfer. Replacing its pending record with U would let a new request read 0 from memory. A pending entry must therefore remember both the permission work and where the newest data is.
In the incorrect-refill row SWMR still holds: C1 is the only writable cache. Correct permissions cannot excuse installing 0 after losing 5. Conversely, comparing a cache's 5 with memory's 0 would wrongly reject the legal exclusive row. A checker must compare each value returned against the order of stores, not against memory.
U means no cache holds X and no work is pending, so memory is current. Here H's buffer holds 5, memory holds 0 and the transfer is outstanding. Recording U would lose the newest value.