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 back or forwards the latest value 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 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.
Practice this topic Back to topic

More Multicore & Synchronization questions

  1. Which describes the snooping approach to cache coherence?
  2. Why do systems with many cores use directory-based coherence instead of snooping?
  3. Coherence protocols can be invalidation-based or update-based. Why do most CPUs use invalidation?
  4. Which describes false sharing in a multithreaded program?
  5. False sharing occurs with an array of per-thread counters such as "long cnt[8];". What is the most suitable fix?