The MESI protocol (known also as Illinois protocol) is a widely used cache coherency and memory coherence protocol, which was later introduced by Intel in the Pentium processor to "support the more efficient write-back cache in addition to the write-through cache previously used by the Intel 486 processor" [1].
Every cache line is marked with one of the four following states (coded in two additional bits):
M - Modified: The cache line is present only in the current cache, and is dirty; it has been modified from the value in main memory. The cache is required to write the data back to main memory at some time in the future, before permitting any other read of the (no longer valid) main memory state.
E - Exclusive: The cache line is present only in the current cache, but is clean; it matches main memory.
S - Shared: Indicates that this cache line may be stored in other caches of the machine.
I - Invalid: Indicates that this cache line is invalid.
A cache may satisfy a read from any state except Invalid. An Invalid line must be fetched (to the Shared or Exclusive states) to satisfy a read.
A write may only be performed if the cache line is in the Modified or Exclusive state. If it is in the Shared state, all other cached copies must be invalidated first. This is typically done by a broadcast operation known as Read For Ownership (RFO).
A cache may discard a non-Modified line at any time, changing to the Invalid state. A Modified line must be written back first.