Core 3 misses on a line. The latest value is not in memory: core 12 wrote it a moment ago and holds it Modified. Core 3's request goes to the line's home, which looks it up, sees core 12 owns it, and sends the request on. Core 12 sends the data to core 3. Three messages in sequence, each crossing the chip. On a large chip, this path, not memory, is often the slowest way to get data.
Who is responsible for each line, and how does a request reach them?
The obvious answer is that memory is responsible: requests go to memory and memory answers. That fails as soon as a cache holds the line dirty: memory's copy is stale, and answering from it breaks the data-value rule (lesson 13.1). Some agent must always know it holds the latest data and must answer for it. That agent is the owner, and it can be memory or any cache.
Exactly one owner per line at a time: the agent that supplies data on a request and is responsible for eventually writing dirty data back.
Memory owns lines that no cache holds dirty (in protocols with F, a designated clean sharer may answer instead).
A cache owns a line it holds in M (or O in MOESI): it must answer for it.
Ownership moves with writes and with requests: a write makes the writer the owner; a read of an M line either moves ownership back to memory (writeback, M to S) or keeps it in the cache (M to O).
Forwarding: in a directory protocol, the home sends a request on to the owner, which replies directly to the requester.
Path | Hops on the critical path | When |
|---|---|---|
Memory owns it | 2: requester to home, home (with memory) to requester | Line not dirty in any cache |
Forward to owner | 3: requester to home, home to owner, owner to requester | Line dirty in another cache |
Snoop broadcast | 2: requester to all, owner to requester | Small snooping systems |
Four-hop (no direct reply) | 4: owner replies to the home, home replies to requester | Simpler protocols; slower |
Protocols work hard to keep shared misses at two or three hops: direct owner-to-requester replies, forwarding states (O, F) so a cache rather than distant memory can answer, and placing homes near their likely users.
Protocol | Ownership and forwarding |
|---|---|
MOESI | Owned: a cache keeps ownership of dirty shared data and answers requests for it (fact T23) |
MESIF | Forward: one clean sharer is designated to answer, so memory need not and other sharers stay quiet (fact T23) |
AMBA CHI | The home node receives requests and can have the snooped owner send data directly to the requester (fact A23) |
A protocol design (illustrative) let an owner evict a dirty line (sending a writeback to the home) at the same moment the home forwarded it a request. The forward found no line; the owner, having given up ownership, ignored it, and the requester waited for ever. The fix was a defined race rule: the owner keeps the data until its writeback is acknowledged and answers any forward that arrives meanwhile. Races between writebacks and forwards are a classic source of coherence deadlocks.
Memory: no cache holds it dirty, so memory supplies it (unless a protocol designates a forwarder, as MESIF's F state does).
It removes a hop from the critical path: three hops instead of four.
Every line has exactly one owner, memory or a cache, which supplies data and is responsible for dirty data.
Directory protocols forward requests to the owner, which replies directly: a three-hop miss.
Ownership races (writeback against forward) must have defined rules; hops set shared-miss latency.