Multicore & Synchronization
In MESI, when core 1 tries to read a line that core 0 holds in the Modified (M) state, what generally happens?
- ACore 0 writes back or forwards the latest value to core 1, and both lines become Shared (S)
- BCore 1 reads the stale value from memory, and core 0 stays in M
- CCore 1's read waits until core 0 eventually evicts the line
Show answer and explanation
Answer: A. Core 0 writes back or forwards the latest value 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 memory or forwards it directly to core 1. Afterward both cores hold the same contents, so both lines become S. The key is never letting core 1 read the stale value from memory. Forwarding directly delivers the value faster than going through main memory.
- A. Correct. The latest value becomes shared.
- B. That would break coherence.
- C. It is handled immediately, not on eviction.