Two cores, each with its own cache, sharing one variable x in RAM.
Click the buttons and watch each cache's MESI state change. The key moment:
when one core writes, the other core's copy is invalidated —
it goes stale and must be re-fetched.
Try this sequence: Core 1 reads (→ E) · Core 2 reads (→ both S) · Core 1 writes (→ Core 1 M, Core 2 I) · Core 2 reads (a coherence miss: Core 1 writes back, then both go S).