Feasibility
2.2 Communication Deadlock Freedom
2.2.3 Deadlock Freedom
at nk, an agreement:
Tke - Tl! J
=
Ae - As m mTo see that the defined set of local clocks is indeed compatible, observe that we only have to establish its validity when our packet, Pm, is being forwarded to the next node along its trajectory during a protocol cycle; otherwise, the count recorded by the packet simply tracks the local time of its resident node. During the actual transfer of Pm from one node to another, the sender signals the beginning of the transfer with a V0 event, thus incrementing N(V0 ) . The coherency constraints dictate that N(R0 )
=
N(Rf), \/c EC at the sender side at this point; hence, the sender and all its neighbors must have identical clock values. When the receiver signals the completion of transfer with its own R0 event, Pm is already at the receiver side. Therefore, both the receiver's local clock value and the count recorded by Pm are incremented, preserving the agreement between packet count and the local clock value. Compatibility of local clocks follows by induction.As a result of the compatibility of the defined set of local clocks, the recorded count values are not only consistent with the local clocks, but also consistent with each other.
Specifically, let AA
=
Am - An be the difference in the recorded count values of packets Pm and Pn upon a rendezvous: The value ..6.A will remain identical upon all future rendezvous of the same packets Pm and Pn• In other words, we are justified in defining the value Am as being the age of the packet Pm· The existence of a well-defined age for packets in a coherent network allows us to define meaningful dynamic priorities that are essential in establishing packet-delivery guarantees. Furthermore, the basic protocol cycle provides a natural partition of continuous physical time into a sequence of discrete epochs upon which local routing decisions are made.1. Packets must always be forwarded to neighbors with their header flits transmitted first. In particular, voluntary misrouting of any internally buffered packet must start from the header flit of the selected packet.
2. Once the flit stream of a packet has been assigned a particular outgoing channel, the assignment must be maintained for the remaining cycles until the entire packet has been transmitted.
These constraints exist because all of the necessary routing information of a packet is encapsulated in the packet header. Interrupting a packet flit stream mid-transfer would render the latter part of the packet undeliverable. For a communication network that follows the coherent protocol, assurance of freedom from communication deadlock glob- ally over the network is equivalent to assurance of progressive protocol execution locally at each node. The notion of progressive protocol execution can be quantified in terms of the total number of completed protocol cycles. In other words, assurance of commu- nication deadlock freedom is translated into assurance of eventual increase in the total number of completed cycles over every node of the network. In particular, it is sufficient to show that each node can independently complete each transfer cycle and initiate a new one, without violating the stated constraints. To see this, take any snapshot of the network and observe that nodes having the minimum number of completed cycles will eventually increase their numbers, and, hence, the global minimum, provided the above constraints can always be satisfied. This in turn implies that the number of completed cycles in every node must also eventually increase. We now show that as long as we have an equal number of input and output channels per node, a condition that is satisfied readily by our bidirectional channel assumption, we can always satisfy the stated logical requirements, and, hence, assure freedom from communication deadlock.
Theorem 2.1 Let M denote a coherent multicomputer network where each node has an equal number of input and output channels. If M employs voluntary misrouting to prevent potential buffer overflow, then it is free from deadlock.
Proof. We need to show that buffer overflow can always be prevented by misrouting without violating the cut-through switching integrity constraints. We proceed with a counting argument: Let d denote the number of channels at a node. During a protocol
I!
Figure 2.4: Deadlock-Free Routing under the No-Blocking Convention
cycle, there may be as many as n* ::; d new data flits arriving at the input channels. A fraction of these, 0::; n1
:S
n*, are new header flits; the remaining n*-n' are payload flits of arriving packets. Of these pay load flits, a fraction of them, 0 ::; n":S
n * -n', belong to packets that have already been assigned output channels, and the remaining n*-n1-n11 flits belong to waiting packets that are buffered inside the node. Therefore, the node has at least a total of n'+(n*-n'-n") header flits that are eligible for immediate routing.Hence, in the following cycle, a node can find at least n'+(n*-n'-n")+n"
=
n* flits that can be transmitted or misrouted without violating the cut-through switching integrity constraints. This assures that no buffer overflow will occur. The node can always complete its protocol cycle and initiate the next protocol cycle; hence, the network isfree from deadlock. ■
Since the validity of the above proof does not depend on a node's storage capacity, deadlock freedom is established independent of the amount of available buffer space.
The simple criterion of having an equal number of input and output channels is sufficient to assure deadlock freedom for a coherent network. Figure 2.4 depicts a possible scenario when there is no internal storage for a node with four channels. Any packet that arrives is immediately shuttled away through one of the output channels. In practice, additional
buffers are needed in order to inject packets into the network, and to improve the network performance. The reader may have noticed from the above proof that although deadlock freedom is guaranteed as long as the number of input channels is equal to the number of output channels, there is some real danger of an inability to deliver packets. This fact will be discussed in much greater detail in the following section.