< previous page page_539 next page >

Page 539
Protocols may be classified in a number of different ways. Probably the most important distinction among protocols is the way they distribute information about writes to memory to the other processors in this system. There are two basic approaches here (Figure 8.17):
Snoopy: A write is broadcast to all processors in the system [21]. Broadcast protocols are usually reserved for shared bus multiprocessors. All the processors share memory through a common memory bus. The broadcast protocols are generally referred to as snoopy protocols, as all of the processors on the bus must monitor the bus for write transactions and take appropriate action if a monitored write is to a line contained in the processor's cache.
Directory-based: The alternative to broadcast protocol is termed networked or directory-based protocols [48]. In these protocols, a write transaction is forwarded to only those processors that are known to possess a copy of the newly altered cache line.
These directory-based cache coherency protocols maintain the state information of the cache lines at a single (central or distributed) location called the directory. The requesting cache queries the directory for the owners and any caches who are sharing the same cache lines. Only the caches that are stated in the directory need to be sent the invalidate signal (or write updates). Because there is no need for buses to connect all caches, in contrast to snoopy protocols, directory-based cache coherency protocols can potentially scale better.
Clearly, snoopy protocols are simpler, in that information containing the ownership or use of lines does not have to be kept within the system. On the other hand, the snoopy protocols create a good deal of additional bus or network traffic, as the messages are broadcast to all processors regardless of whether or not the processors have a copy of the newly written line.
In directory-based protocols, information about the use of lines (the addresses of the users) is contained in a directory. As the number of cache lines in this system increases, and as the number of processor nodes in the system increase, the size of the systems directory for maintaining coherence and identifying users of cache lines becomes very large. So, optimization of the size of the directory is an important problem.
Regardless of whether we have a snoopy or a directory-based protocol, the local processor must take some action when an altered line is recognized. There are two types of actions: invalidate and update.
Invalidate: This class of protocol invalidates all copies in other caches before making changes to the data in a particular cache line. For snoopy protocols, the initiating cache usually generates an invalidate signal on the bus. Other caches that possess the same cache line receive the invalidate signal from the bus and proceed to invalidate their copies.
Update: The update class of protocol updates the lines in the caches sharing the line. For snoopy protocols, writes are broadcast on the bus, and caches sharing the same line snoop on the bus for the data and proceed to update the contents, and possibly the state, of their cache line.

 
< previous page page_539 next page >