Home Knowledge Base Cache Coherence Protocols

Cache Coherence Protocols are the hardware mechanisms that maintain a consistent view of shared memory across multiple processor caches — ensuring that when one core writes to a memory location, all other cores see the updated value rather than stale cached copies, which is the fundamental requirement for correct shared-memory parallel programming and the source of significant performance overhead in multi-core and multi-socket systems.

The Coherence Problem

Without coherence, Core 0 could write X=5 to its L1 cache while Core 1 still reads the old value X=0 from its L1 cache — violating program semantics. Coherence protocols ensure that the memory system behaves as if there is a single shared memory, even though data is physically replicated across multiple private caches.

MESI Protocol (Baseline)

Each cache line is in one of four states:

MOESI Extension

Adds Owned (O) state: This cache has a modified copy AND other caches have Shared copies. The Owned cache is responsible for supplying data on requests (not memory). Avoids writing dirty data back to memory when sharing — reduces memory bandwidth. Used by AMD processors.

Coherence Implementation

Performance Impact

Cache Coherence is the invisible hardware protocol that makes shared-memory programming possible — maintaining the illusion of a single coherent memory while physically distributing data across dozens of private caches, at a performance cost that programmers must understand to write efficient parallel software.

cache coherence protocolmesi moesi protocolsnooping directory coherencecache invalidationshared memory coherence

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.