Multicore & Synchronization

In MESI, when core 1 tries to read a line that core 0 holds in the Modified (M) state, what generally happens?

  1. ACore 0 writes the latest value back to main memory (possibly also forwarding it to core 1), and both lines become Shared (S)
  2. BCore 1 reads the stale value from memory, and core 0 stays in M
  3. CCore 1's read waits until core 0 eventually evicts the line
Show answer and explanation

Answer: A. Core 0 writes the latest value back to main memory (possibly also forwarding it to core 1), and both lines become Shared (S)

Core 0 sees core 1's read request and, knowing it holds the latest value, writes it back to main memory, sometimes also forwarding it directly to core 1. Afterward both cores hold the same contents, so both lines become S. Because S means the line matches main memory, the write-back is required. The key is never letting core 1 read the stale value from memory. Forwarding directly delivers the value faster than going through main memory. Sharing the line without writing it back is what the Owned (O) state of MOESI allows.

  • A. Correct. The latest value becomes shared.
  • B. That would break coherence.
  • C. It is handled immediately, not on eviction.