Multicore & Synchronization

Which correctly lists the four states of the MESI cache coherence protocol?

  1. AMemory, Execute, Store, Index
  2. BModified, Exclusive, Shared, Invalid
  3. CMiss, Evict, Swap, Idle
Show answer and explanation

Answer: B. Modified, Exclusive, Shared, Invalid

In MESI, each cache line is in one of four states: Modified (changed and held only by this core), Exclusive (unchanged and held only by this core), Shared (several cores hold the same contents) or Invalid. The state changes whenever the core reads or writes, or learns of other cores' reads and writes, which prevents copies of the same address from disagreeing.

MESI protocol state transitions Local write Remote write Remote write Local read (others have it) Remote write Local read (no others) Local write (invalidate others) Remote read (write back) Local write (no bus msg) Remote read M I S E Local core read/write Snooped read/write by others M: Modified, only here E: Clean, only here S: Clean, shared I: Invalid
MESI protocol state transitions · View in diagrams
  • A. These are not cache line states.
  • B. Correct. Every line is in one of these four states.
  • C. These are not cache line states.