Multicore & Synchronization
In the MESI protocol, what does it mean when a cache line is in the Modified (M) state?
- AOnly this core holds the line, and its contents differ from main memory (it must be written back)
- BSeveral cores hold the same contents, which also match main memory
- 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.