i
i
i
i
i
i
i
i
7.5. BROADCAST PROTOCOL WITH POINT-TO-POINT INTERCONNECT 249
beyond what an ordered network can provide. It requires nodes to be fully ordered with respect
to one another, with an ordering that is statically fixed, any time messages involved in transaction
are sent. An example of a network that satisfies such a requirement is a ring. Each link in a ring
connects two routers in a single direction (if the link is unidirectional), and together the routers and
links form a closed loop. In a ring, messages sent from nodes will travel through the same path that
is statically fixed, thereby satisfying the requirement.
A ring provides several benefits compared to a more general interconnect topology. Each router
in a ring can have a simple design, because it only has to choose whether to forward a message to
the next link or not, hence it can be implemented with low routing latency and modest amount of
buffering. However, a ring’s network distance increases linearly with the number of nodes, hence
a ring becomes less attractive as the size of the system grows. In this section, we will look at an
example of a cache coherence protocol that uses distributed sequencing exploiting the property of a
ring interconnect.
In a ring protocol, the data supplier is typically assigned the role of a sequencer for transactions
affecting the block. All requests are placed on the ring and travel through the ring until they go the
entire circle back to the requestors. Let us define transaction window as the time between when a
node places a request on the ring until its response has returned to the node. In some cases, a request
can be responded by just one node, such as when a read request is satisfied by a node that caches the
block supplying the block. In some cases, a request must be responded by all nodes, such as when
an upgrade request needs to involve all nodes invalidating their copy of the block.
One important property that needs to be guaranteed in a ring is that the data supplier supplies re-
sponds with a message (containing data) in the same order of requests arriving at the data supplier.
Such a property is important in ensuring that there is one order of transactions being processed that
is seen consistently by all nodes. For example, if there are two requests arriving at the supplier, the
request that reaches the supplier earlier will also be responded earlier than the other request. This
ensures that a requesting node, if its request reaches the supplier earlier than anybody else, will see
a response earlier than anybody else. It also ensures that a requesting node, if its request reaches the
supplier later than another requesting node, will see the other requesting node’s response before its
own response. The latter is a condition where a ring collision between two requests is detected.
More precisely, if during the transaction window a node receives a response to a request other
than its own, it has detected a collision with that other request. On the other hand, if no other
responses are received in the transaction window, no collision has been detected. Absence of col-
lision, the request has been satisfied as if it were the only request in the system. A collision may
be benign if it involves two overlapping read transactions. A benign collision can be allowed to
occur without causing a coherence problem, since they only involve a block with a single value. A
collision between two write transactions or between a write and a read transaction is not benign, as
it has a potential to cause coherence problems, because they involve multiple data values. Due to
this distinction, a benign collision may be ignored, but a non-benign collision cannot be ignored. A
non-benign collision may be dealt with by canceling both transactions involved in the collision, or
canceling one of the transactions by prioritizing one over the others.
Let us look at an illustration of how a basic ring coherence protocol works. Figure 7.14 shows
four nodes being connected in a ring. Part (a) of the figure shows simultaneously, node A and B send
a read request for the same data block. The message is shown in the following format: command
type (Rd, RdX, or Upgr) dot the requestor, comma, then the response in parentheses. The response