Deadlock is a circumstance in NoC where a group of packets are unable to make any progress because they are holding and waiting on another in a cyclic manner to release buffer [3].
Occurrence of deadlock in an NoC has the potential to halt the complete system eventually.
The deadlock avoidance in NoC has been drawing attention of researchers for a few decades [1, 2, 11–14, 29]. In this section we discuss the important works on deadlock avoidance in NoC context and figure out the possible research gap.
2.4.1 Up*/Down* and Turn Model Approach
Up*/Down* and Turn model are two deadlock avoidance approaches where certain restric- tion are imposed on movement of packets. For avoiding deadlock in any topology, the Up*/Down* routing approach uses spanning tree corresponding to the given network [10].
Due to the absence of cycle in a spanning tree, deadlock due to cyclic dependency between channels are eliminated. No additional resources are used for avoiding deadlock in this approach. A deadlock free dynamic reconfiguration network based on Up*/Down* routing is presented in [93]. Routing paths are highly restricted and most of the packets use non minimal paths in Up*/Down* routing approach [94].
Turn model theory [1, 9] is used for detecting cyclic dependency and designing dead- lock free routing algorithms by avoiding those cycles. No additional resources are used for avoiding deadlock in this approach. In case of Torus NoC, it is not possible to create a minimal routing algorithm without using VCs [95]. According to Turn model, a packet is allowed to use a wraparound channels only at its first hop [1]. Thus, the scope of using wraparound channel is limited in this approach. In our work, we propose a design approach for routing algorithm for Torus NoC that uses wraparound channels efficiently. Another approach based on Turn model concept is presented in EbDa [14]. The author claims it to be scalable for arbitrarily large dimension. It partitions channels into disjoint sets without containing any cyclic dependency. Transitions between the partitions are allowed with a defined order. EbDa method is applicable for Torus NoC with help of VC for breaking the cyclic dependency across a ring.
2.4.2 FirstHop Routing for Avoiding Deadlock in Torus NoC
Torus NoC needs special care as the topology is more vulnerable towards deadlock due to the inherent cyclic paths via wraparound channels [95]. It is not so obvious to predict deadlock accurately in Torus NoC using the available Turns presented in Turn model [1] . For formation of dependency cycle between packets in a deadlock situation, one necessary criteria to fulfil is that the destination for each packet in that dependency cycle are at
least two routers away from the source router. Because, if source and destination are only single hop away, i.e., next to each other, all such packets will get delivered eventually after being transmitted from the source routers as there is no chance for dependency with a third party. Based on the same principle, the FirstHop routing approach is proposed to break the dependency at certain point. In FirstHop approach, wraparound channels are allowed to use only from the boundary router. Since packets from rest of the routers cannot move to boundary for using a wraparound channel, the resource dependency is discontinued. Other approaches of avoiding deadlock in Torus includes the use VCs.
2.4.3 Dally’s Approach with Virtual Channel
Dally et al. [2, 96] propose a theorem that a routing algorithm is deadlock free if there is no cycle in the channel dependency graph. A Torus routing chip is developed by using [96]. In their next work [2], constructing deadlock free routing algorithm for an arbitrary communication network using VCs are shown. The cycles in the channel dependency graph are removed by splitting physical channels into group of VCs [2]. For eliminating the cycles, VCs are ordered and routing algorithm is restricted to route packets in decreasing order of VCs. In date line approach [3], two classes of VCs are used. A packet is forced to use another VC class after crossing the date line. Date line is just a marking on a row and a column. Crossing that row or column, a separate VC class need to be used. Thus it prevents from forming a cyclic resource dependency.
2.4.4 Duato’s Approach with Escape Path and Virtual Channel
Duato et al. [11, 27] present an approach of designing deadlock free adaptive routing using VCs. An approach of constructing adaptive routing function allowing cyclic dependencies between channels, provided that there are alternative paths without cyclic dependencies for forwarding a packet towards destination are presented [13, 27]. Xiang et al. [97] proposed an adaptive routing algorithm on Torus NoC using VCs and additional buffer in the input port. In their proposed algorithm, two VCs are required. One set of channels are used by
a known deadlock free routing in a Mesh sub-network. The other set of channels are used for making the algorithm adaptive.
2.4.5 Bubble Flow Control with Dedicated Buffer
Bubble flow control is a flow control technique used for avoiding deadlock in Torus NoC [28,29,92,98–100]. Packet injection or changing direction of a packet is only allowed if there are at least two empty buffer slots in the direction required by the packet. Therefore, at least one empty buffer slot always remains free in the ring. That free buffer acts as bubble guaranteeing that at least one packet is able to progress. Flit bubble flow control [30]
works on the same principle. It maintains one free flit size buffer slot inside a ring to avoid deadlock. Forwarding a flit does not reduce overall free buffer in a ring since it leaves it previously occupied free slot. Only injection of packet into ring reduces free buffer amount.
Injecting a packet or changing direction is allowed if the receiver’s input port has one more free slot remains after receiving the packet.
2.4.6 Other Approaches
A survey on different approaches for designing routing algorithms is presented in [95]. In that work, deadlock avoidance approaches like dropping packets, numbering network resources for resource allocation in a specific order, putting restrictions on changes of routing directions for packets are presented. This work claims that for a k-ary n-cube topology with k >4, it is impossible to construct a minimal deadlock free routing algorithm without using extra channels [95]. In [17], cyclic dependency is broken by applying in place swapping of packets between adjacent router. No extra buffer is used in this approach. Applying in place swap process periodically is one overhead in this approach and the router micro-architecture needs to be upgraded accordingly for this in place swap operation.
2.4.7 Challenges and Objectives
The inherent cyclic path in each row and column of a Torus NoC makes the topology deadlock prone. VCs or extra buffers need to used for developing a deadlock free routing algorithm in Torus NoC. Though, Up*/Down* routing approach avoid deadlock without using additional resources [10], routing paths are mostly non minimal or lengthy [94]. In FirstHop routing, a packet is allowed to use the wraparound channel only at its first hop so that cyclic path is discontinued for avoiding deadlock in Torus NoC [1]. Therefore, the leverage of wraparound channels are not utilised for most of the packets. To the best of our knowledge, there is no other approach available for avoiding deadlock in Torus NoC without additional buffer or virtual channels (VC). The objective identified from this back- ground study is to work on a deadlock avoidance approach for Torus NoC without using any additional buffer or VC and at the same time increase utility of wraparound channels.
Detecting confirmed deadlock with an exact deadlock scenario is a challenging task due to the huge state space of NoC [41]. Popular NoC simulator like Booksim [24] and Gem5 [25]
report a warning message for possible deadlock scenarios based on a predefined threshold value. It is very helpful to get the exact deadlock scenario after a deadlock is detected.
This deadlock scenario would be helpful is formulating deadlock avoidance. A formal model of NoC considering detailed NoC components would be helpful to detect confirmed deadlock along with deadlock scenarios. One objective of this thesis is to develop a deadlock detection framework using formal model of NoC considering NoC component in detail.