Multicore & Synchronization
In the MESI protocol, what happens when a core writes to a line it holds in the Exclusive (E) state?
- AIt sends invalidation requests to all other cores before writing
- BIt cannot write, so it writes to main memory and reads the line back
- CNo other core needs to be notified, and the line simply becomes M
Show answer and explanation
Answer: C. No other core needs to be notified, and the line simply becomes M
The E state means only this core holds the line and its contents match main memory. Since there are known to be no other copies, the core can move to M on a write without sending invalidations. The benefit of having E is saving that communication in the common pattern of reading and then writing data used by a single core. Writing from S, by contrast, requires invalidating other copies.
- A. In E there are no other copies, so no notice is needed.
- B. It can write directly.
- C. Correct. The core knows it is the only holder.