For higher performance in a multiprocessor system, each processor will usually have its own cache. Cache coherence refers to the problem of keeping the data in these caches consistent. The main problem is dealing with writes by a processor.

There are two general strategies for dealing with writes to a cache:

Write-through caches are simpler, and they automatically deal with the cache coherence problem, but they increase bus traffic significantly. Write-back caches are more common where higher performance is desired. The MSI cache coherence protocol is one of the simpler write-back protocols.

Write-Back Cache States Diagram

write-back cache states and transitions

A write-back cache can be described by the diagram to the right, which shows the states and transitions for a block in the cache. The transition labels have the form "event/action". The event can be viewed as the trigger for the transition. The only actions mention here are bus actions. Transitions from a state to itself with no bus actions are omitted.

The following abbreviations are used for events:

The following abbreviations are used for bus actions:

Development of a new idea is easier if you can make an incremental change from a well-established idea. This involves adapting the older idea to new requirements. The development is easier if you have heuristic principles that keep you away from excessive complexity. For developing a multiprocessor write-back cache here are two useful principles:

In order to maintain the invariant, each cache must snoop on the bus - it must listen to bus transactions that are performed by other caches.

write-back cache states and transitions

MSI Protocol State Diagram

MSI coherence protocol states and transitions

We arrive at the MSI cache coherence protocol from the simple write-back cache by making the following changes, shown in red in the diagrams below: