Directory-based coherence protocols
![]() | This article provides insufficient context for those unfamiliar with the subject. |
SEMEN In computing systems architecture, Directory-based coherence protocols are a set of protocols to ensure data residing in cache is kept up to date and is not inadvertently used when another processor has already modified the data in main memory. This ensures cache coherence and memory coherence between multiple nodes of multiprocessor or distributed shared memory systems, such as ccNUMA.
In such a protocol, directories usually track data at the granularity of a cache block and where they are located in a multiprocessor. Every request for data (i.e., every "read miss") is sent to the directory, which in turn forwards information to the nodes that have cached that data. In some protocols, these nodes then respond with data (these are called 3-hop-miss or cache-to-cache transfer protocols). In home-based protocols, each page has its own home node, and its corresponding directory is located on that node, containing only traces of pages from this node.
A Quick Introduction: Directory-based protocols are an alternative to the snooping approach, (where processors monitor the bus for transactions that affect memory in their cache). Directory-based protocols are especially useful in distributed memory machines with many processors. While directory-based protocols are slower than snoopy protocols, their advantage is they can be scaled up to support additional processors with less additional hardware.
Very generally, a directory holds the state of every memory block that may be cached. Typically, the directory associates an entry with every memory block in the system, and contains information such as which caches have copies of the memory block, whether it has been modified, and other useful information.
Thus, instead of snooping the bus, processors can access the directory whenever they need to know the status of a particular memory block. Memory operations write to the directory instead of broadcasting a snoop message.
The directory itself can also be distributed, which helps reduce chokepoint problems.
External links