A cache-coherent system keeps processors from using conflicting cached copies of the same shared-memory location. When one processor writes an update, other caches listen for the bus message and either apply the update or invalidate the affected cache line. Invalidated data is fetched again from memory when needed, ensuring a later read can obtain the updated value. Write-back with invalidation is one cache-coherence protocol; modern architectures combine multiple protocols. Scaling this coordination across many cores can become costly, creating a potential coherency wall. section 3.1
An updated shared variable
Imagine thread 1 updates a shared variable while thread 2 retains an older copy in another CPU cache. A coherence mechanism broadcasts the memory update; thread 2’s cache either updates its copy or discards the cache line and reloads the value later. section 3.1
Trace how a shared-variable update moves through processor caches and memory. section 3.1

