|
|
|
|
|
|
|
Figure 8.36
Distributed directory updates. At the end of the write
transaction, the cache 1 pointer will be set to 3 and the directory
will be set to 1. |
|
|
|
|
|
|
|
|
As expected, update protocols maintain consistency by updating, rather than invalidating, caches that share lines that are being written into. When the updates are complete, the caches are consistent. In the centralized directory (CD-UP), a write accesses the directory. The directory sends a count number to the writer, indicating the number of users of the line. Processors that already have copies of the line are notified that the line is being updated (processors 3 and 1 in Figure 8.35). This update signal is accompanied by the write data which has been forwarded now to the directory and the memory. When the processor updates its cache, an acknowledgement is sent to the writing cache. When acknowledgements match the count number, the update is complete. |
|
|
|
|
|
|
|
|
For the distributed directory case (DD-UP), the new data must be forwarded to the directory and then the writing processor becomes the head of the list. As in the invalidate case, the update signal, together with the new data, is forwarded down the list. When the last cache receives the data, it updates its line and acknowledges this update to the cache that instigated the write (Figure 8.36). At this point, the write is complete and all processors have a consistent version of the line. |
|
|
|
|
|
|
|
|
As with the invalidate case, the principal difference between the two update protocols is the amount of time required to create a consistent memory view. In the central directory case, the write may be forwarded in parallel to all using caches, as implementation allows. The situation is less attractive in the distributed directory update case (DD-UP), since the linked lists tend to be significantly longer than in the invalidate case. Invalidates necessarily shorten the length of the list; without invalidates, the length of shared data lists can be significant. The other side of that coin, however, is that the linked list has captured users of the line over a longer period; hence, requests for new copies of the line are reduced compared to invalidate protocols. |
|
|
|
|
|
|
|
|
There is no clear winner among the protocol strategies. Each protocol has an advantage, either implementation-wise or traffic-wise, and various protocols appear attractive under differing implementation parameters. |
|
|
|
|
|