Multicore & Synchronization

In the MESI protocol, what does it mean when a cache line is in the Modified (M) state?

  1. AOnly this core holds the line, and its contents differ from main memory (it must be written back)
  2. BSeveral cores hold the same contents, which also match main memory
  3. CThe line's contents are unusable and must be fetched again to read
Show answer and explanation

Answer: A. Only this core holds the line, and its contents differ from main memory (it must be written back)

The M state means this core has written the line and alone holds the latest value. Main memory is stale, so when the line is evicted or another core wants to read it, the latest value must be written back or supplied directly. A line in M can be written again any number of times without notifying other cores, so repeated writes by the same core are fast.

  • A. Correct. It is written back to memory when evicted.
  • B. That is the Shared (S) state.
  • C. That is the Invalid (I) state.
Practice this topic Back to topic

More Multicore & Synchronization questions

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