Multicore & Synchronization

In the MESI protocol, what happens when a core writes to a line it holds in the Exclusive (E) state?

  1. AIt sends invalidation requests to all other cores before writing
  2. BIt cannot write, so it writes to main memory and reads the line back
  3. 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.
Practice this topic Back to topic

More Multicore & Synchronization questions

  1. In an invalidation-based coherence protocol, what happens when a core writes to a line in the Shared (S) state?
  2. In MESI, when core 1 tries to read a line that core 0 holds in the Modified (M) state, what generally happens?
  3. Which describes the snooping approach to cache coherence?
  4. Why do systems with many cores use directory-based coherence instead of snooping?
  5. Coherence protocols can be invalidation-based or update-based. Why do most CPUs use invalidation?