© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock.

Slides:



Advertisements
Similar presentations
Prof. Natalie Enright Jerger
Advertisements

Presentation of Designing Efficient Irregular Networks for Heterogeneous Systems-on-Chip by Christian Neeb and Norbert Wehn and Workload Driven Synthesis.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Fundamentals of Computer Networks ECE 478/578 Lecture #13: Packet Switching (2) Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Advanced Networking Wickus Nienaber Daniel Beech.
What is Flow Control ? Flow Control determines how a network resources, such as channel bandwidth, buffer capacity and control state are allocated to packet.
ECE 8813a (1) Non-minimal Routing Non-minimal routing  Wormhole degrades performance while VCT has less secondary effects  Fault tolerance is the main.
7.5 Deadlock Avoidance The algorithm is simply to ensure that the system will always remain in safe state. Therefore, if a process requests a resource.
Starvation and Deadlock
Miguel Gorgues, Dong Xiang, Jose Flich, Zhigang Yu and Jose Duato Uni. Politecnica de Valencia, Spain School of Software, Tsinghua University, China, Achieving.
What's inside a router? We have yet to consider the switching function of a router - the actual transfer of datagrams from a router's incoming links to.
High Performance Router Architectures for Network- based Computing By Dr. Timothy Mark Pinkston University of South California Computer Engineering Division.
1 Lecture 12: Interconnection Networks Topics: dimension/arity, routing, deadlock, flow control.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
CS 258 Parallel Computer Architecture Lecture 5 Routing February 6, 2008 Prof John D. Kubiatowicz
TCOM 501: Networking Theory & Fundamentals
Interconnection Networks: Deadlock and Livelock Feb. 26 th, 2007 Prof. Chung-Kuan Cheng Transcribed by: Mohammad Al-Fares.
1 Lecture 24: Interconnection Networks Topics: topologies, routing, deadlocks, flow control Final exam reminders:  Plan well – attempt every question.
1 Lecture 24: Interconnection Networks Topics: topologies, routing, deadlocks, flow control.
2015/7/2Deadlock-free Packet Switching1 Introduction to Distributed Algorithm Part One: Protocols Chapter 5- Deadlock-free Packet Switching Teacher: Chun-Yuan.
1 Indirect Adaptive Routing on Large Scale Interconnection Networks Nan Jiang, William J. Dally Computer System Laboratory Stanford University John Kim.
1 Lecture 25: Interconnection Networks Topics: communication latency, centralized and decentralized switches, routing, deadlocks (Appendix E) Review session,
Distributed process management: Distributed deadlock
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Routing Algorithms.
Dragonfly Topology and Routing
Switching, routing, and flow control in interconnection networks.
1 The Turn Model for Adaptive Routing. 2 Summary Introduction to Direct Networks. Deadlocks in Wormhole Routing. System Model. Partially Adaptive Routing.
Routing algorithms Routing algorithms establish the path followed by each message or packet. Routing algorithms for wormhole routing are also valid for.
Distributed Routing Algorithms. In a message passing distributed system, message passing is the only means of interprocessor communication. Unicast, Multicast,
Networks-on-Chips (NoCs) Basics
Dynamic Networks CS 213, LECTURE 15 L.N. Bhuyan CS258 S99.
Deadlock CEG 4131 Computer Architecture III Miodrag Bolic.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
ECE669 L21: Routing April 15, 2004 ECE 669 Parallel Computer Architecture Lecture 21 Routing.
CSC 311 CHAPTER TEN CONNECTING NETWORKS. CSC 311 We have looked at several different network topologies Why do we have different types of networks? Why.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Switch Microarchitecture Basics.
NC2 (No.4) 1 Undeliverable packets & solutions Deadlock: packets are unable to progress –Prevention, avoidance, recovery Livelock: packets cannot reach.
1 Lecture 15: Interconnection Routing Topics: deadlock, flow control.
BZUPAGES.COM Presentation On SWITCHING TECHNIQUE Presented To; Sir Taimoor Presented By; Beenish Jahangir 07_04 Uzma Noreen 07_08 Tayyaba Jahangir 07_33.
CHAPTER 8: DEADLOCKS System Model Deadlock Characterization
NC2 (No6) 1 Maximally Adaptive Routing Maximize adaptivity for a double-x routing based on turn model. Virtual network 0 Virtual network 1 Maximally adaptive.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock: Part II.
Lecture 12 Handling Deadlock – Prevention, avoidance and detection.
A formal proof of a necessary and sufficient condition for deadlock-free adaptive networks Interactive Theorem Proving Freek Verbeek & Julien.
2/14/2016  A. Orda, A. Segall, 1 Queueing Networks M nodes external arrival rate (Poisson) service rate in each node (exponential) upon service completion.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Networks: Routing, Deadlock, Flow Control, Switch Design, Case Studies Alvin R. Lebeck CPS 220.
1 Lecture 24: Interconnection Networks Topics: communication latency, centralized and decentralized switches, routing, deadlocks (Appendix F)
1 Lecture 14: Interconnection Networks Topics: dimension vs. arity, deadlock.
1 Chapter 11 Global Properties (Distributed Termination)
Effective bandwidth with link pipelining Pipeline the flight and transmission of packets over the links Overlap the sending overhead with the transport.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock: Part II - Recovery.
1 Lecture 22: Interconnection Networks Topics: Routing, deadlock, flow control, virtual channels.
Deadlock CSE451 Andrew Whitaker. Review: What Can Go Wrong With Threads? Safety hazards  “Program does the wrong thing” Liveness hazards  “Program never.
Deadlock.
Interconnection Networks: Flow Control
Azeddien M. Sllame, Amani Hasan Abdelkader
Mechanics of Flow Control
Switching, routing, and flow control in interconnection networks
Deadlock, Illustrated.
Lecture 14: Interconnection Networks
On-time Network On-chip
CEG 4131 Computer Architecture III Miodrag Bolic
Lecture: Interconnection Networks
Networks: Routing and Design
Lecture 25: Interconnection Networks
Switching, routing, and flow control in interconnection networks
EE382C Lecture 9 Deadlock 4/26/11 EE 382C - S11- Lecture 9.
Multiprocessors and Multi-computers
Presentation transcript:

© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock

ECE 8813a (2) Reading Assignment Chapter 3

ECE 8813a (3) Overview: The Problem Guaranteeing message deliveryGuaranteeing message delivery  Fundamentally an issue of finite resources (buffers) and the manner in which they are allocated oHow are distributed structural hazards handled? Waiting for resources can lead to  Deadlock: configuration of messages that cannot make progress  Livelock: messages that never reach the destination  Starvation: messages that never received requested resources oEven though the requested resource does periodically become available

ECE 8813a (4) Ensuring Packet Delivery Deadlock  Prevention  Avoidance  Recovery Livelock  Minimal paths  Restricted non-minimal paths  Probabilistic Starvation  Resource allocation

ECE 8813a (5) Focus We are primarily concerned with deadlock  Starvation is addressed via “fair” sharing  Livelock is addressed (at the moment) by constraining messages to minimal paths Relationship between resources, traffic and conditions  Some conditions can produce others oDeadlocked configuration  livelock for other messages

ECE 8813a (6) Deadlocked Configuration of Messages Routing in a 2D mesh What can we infer from this figure?  Routing  Dependencies or Wait-for relationships

ECE 8813a (7) Some Definitions Routing function – R – delivers a set of channels  Memoryless, coherent, and connected  Note we define the domain as Selection function – picks a channel  Determines performance properties

ECE 8813a (8) Router and Network Model Arbitrary topology Fair access to routing and arbitration unit Edge buffers  Theory can be extended to central buffers (we will not) Wait for any channel in a set For wormhole routing, allocated channel must be empty  See Appendix A for detailed list of assumptions Consumption Assumption sisi cici didi Blocked packets wait for first available channel Fair access to channel bandwidth

ECE 8813a (9) Concepts and Definitions No assumptions about the paths delivered by R  Expect that minimal paths are always included in R Coherent routing function  If a routing function supplies a path, it also supplies all sub-paths of the path Configuration  Assignment of packets to a set of queues/buffers Connected routing function S D Channels delivered by a routing function

ECE 8813a (10) Message Configurations Canonical message configurations  All messages deadlocked Legal, and reachable message configurations  A legal configuration must be possible with the routing function oE.g., non-minimal paths  Since routing functions are memoryless, all legal configurations are reachable

ECE 8813a (11) Deadlock A canonical, deadlocked, reachable, legal configuration is one which no message can advance  SAF and VCT oAll packets are in transit oAll adjacent buffers are full  Wormhole oMessages are in transit oHeader flits and data flits cannot advance since all adjacent buffers are full Framework for proving deadlock freedom

ECE 8813a (12) Channel Dependencies When a packet holds a channel and requests another channel, there is a direct dependency between them Channel dependency graph D = G(C,E) For deterministic routing: single dependency at each node For adaptive routing: all requested channels produce dependencies, and dependency graph may contain cycles dependency SAF & VCT dependency Wormhole dependency Header flit Data flit

ECE 8813a (13) Some Observations Deadlock is not synonymous with the occurrence of cyclic dependencies  Note the goal of guaranteeing message delivery  Are there exits from cycles? The set of dependencies that actually occur (wait-for) are a subset of the statically determined dependencies that can occur as determined by the routing function

ECE 8813a (14) Breaking Cycles in Rings/Torii n0n1 n3n2 n0n1 n3n2 c0c0 c1c1 c2c2 c3c3 c 10 c 11 c 02 c 12 c 01 c 03 c 13 c 00 The configuration to the left can deadlock Add (virtual) channels  We can make the channel dependency graph acyclic via routing restrictions (via the routing function) Routing function is c 0i when j i

ECE 8813a (15) Breaking Cycles in Rings/Torii (cont.) Channels c 00 and c 13 are unused Routing function breaks cycles in the channel dependency graph n0n1 n3n2 c 10 c 11 c 02 c 12 c 01 c 03 c 00 c 10 c 11 c 12 c 01 c 02 c 03 c 13

ECE 8813a (16) Extension to Adaptive Routing n0n1 n3n2 c 10 c 11 c 02 c 12 c 01 c 03 c 00 c 10 c 11 c 12 c 01 c 02 c 03 Note the acyclic subgraph Routing function: is c 0i and c 1i when j >i How can we formalize this? c 00 Additional dependencies due to adaptive routing

ECE 8813a (17) Key Idea Informally: The deterministic routing sub-function is used to provide an escape path for an adaptive routing protocol  Packets are guaranteed to escape cyclic dependencies Formally the escape path is defined by a connected routing sub-function defined over a subset of channels  Routing sub-function supplies only escape channels  In practice, this concept only used as a proof mechanism  R 1 (x,y) R(x,y) for all x, y and C 1 is the set of channels supplied by R 1

ECE 8813a (18) Theorems Theorem: A connected routing function R for an interconnection network I is deadlock free iff there exists a routing sub-function R 1 that is connected and has no cycles in its extended channel dependency graph Holds for both adaptive and deterministic routing functions  In the case of the latter, R = R1 and the extended channel dependency graph = channel dependency graph  Dally & Seitz 1987 for deterministic routing  Duato 1996 for adaptive routing

ECE 8813a (19) Properties Use of escape channels by a message is not unidirectional  If a message enters the escape network it can move back to the adaptive network Do not need to wait on a specific channel  Can wait on any channel including escape channels - the latter guaranteed to show up eventually if allocation is fair Application: start with a deterministic routing function and add channels to be used for adaptive routing Additional restriction required for wormhole (coherent) while this holds for SAF and VCTs

ECE 8813a (20) Robustness of the Model No assumptions are made about paths  At least one minimal path is necessary for performance The use of NxN routing functions are practical  What are the alternatives? No assumptions about packet generation rate, packet length and destinations (other than connectivity) For wormhole, only one message can occupy a buffer  Buffers at both ends are single buffer  Thus head flits always block occupying the head of the queue

ECE 8813a (21) Revisit Some Properties Canonical legal configuration Which legal configurations are reachable from an empty network for a given routing function? What is the importance of a legal configuration?  Can model a legal configuration as one that occurred by packet injection at the blocked node (VCT/SAF) or the packet with the tail node (wormhole)

ECE 8813a (22) Deadlock Avoidance in SAF &VCT Networks Routing sub-function R 1 is c Ai when j i A closer look at escape channel dependencies  c A1 is an escape channel for n0 but not n3  c H2 is an escape channel for n3 Extended channel dependency graph must be acyclic n0n1 n3n2 c H0 c H1 c A2 c H2 c A1 c A3 c A0 c H0 c H1 c H2 c A1 c A2 c A3 direct dependency direct cross dependency escape channel for n0 Direct cross dependency

ECE 8813a (23) Example: Constructing Deadlock Free Routing Algorithms R is deadlock free if R1 is deadlock free Making the North-last algorithm fully adaptive  Add an extra adaptive channel in the North Direction  The extra channel has no turn restrictions N1N2 Extra virtual channel in the north direction

ECE 8813a (24) Some More Observations Can have one escape network for all packets or multiple escape networks Construct dependency graph on escape channels Deadlock freedom: no cycles in the extended channel dependency graph of R 1  Must consider all direct and indirect dependencies oThere still remain dependencies we have not yet considered!

ECE 8813a (25) Indirect Channel Dependencies Direct and indirect dependencies between escape channels Channel c i is an escape channel for some destination Now we can focus all of our attention on the escape channels  Add other channels for adaptive routing  Define the extended channel dependency graph for escape channels oCapture the use of all channels  for adaptive routing request Network cici ckck

ECE 8813a (26) Deadlock Avoidance in Wormhole Networks Routing function R is c Ai or c Bi c Hi when j >I Routing sub-function R 1 is c Ai when j i Note the addition of indirect dependencies for Wormhole switching  Cross and direct dependencies between escape channels transmitted through adaptive channels n0n1n2 n5n4n3 c A0 c B0 c H0 c A1 c B1 c H1 indirect dependency

ECE 8813a (27) Deadlock Avoidance in Wormhole Networks (cont.) Routing function R is c Ai or c Bi c Hi when j >I Routing sub-function R 1 is c Ai when j i Note the addition of indirect dependencies for Wormhole switching  Cross and direct dependencies between escape channels transmitted through adaptive channels n0n1n2 n5n4n3 c A0 c B0 c H0 indirect cross dependency c A1 c B1 c H1

ECE 8813a (28) Deadlock Avoidance in Wormhole Networks (cont.) Routing function: is c Ai and c Hi when j >i Routing sub-function R 1 is c Ai when j i c H0 c H1 c H2 c A1 c A2 c A3 direct dependency direct cross dependency indirect dependency n0n1 n3n2 c H0 c H1 c A2 c H2 c A1 c A3 c A0

ECE 8813a (29) Example: Fully Adaptive Routing Each physical channel has a fully adaptive channel a, and DOR channel b Look at the channels supplied by R at node S S D Adaptive channel supplied by R Deterministic channel supplied by R 1

ECE 8813a (30) Extensions to Irregular Networks Create an appropriate routing sub-function Example:  Identify a distinguished node and construct a spanning tree  Label each channel as up/down depending on proximity of end points to root (break ties with unique node number)  Routing restriction: a valid path traverses zero or more links in the up direction followed by zero or more links in the down direction How does this avoid cycles? Note the absence of virtual channels!

ECE 8813a (31) Review The extended channel dependency graph must capture all dependencies  Direct and indirect cross dependencies For wormhole switching routing function must be coherent, otherwise the preceding theorem provides only a sufficient condition Complete the list of dependencies accommodated by the theorem

ECE 8813a (32) Extensions: Channel Classes Create equivalence classes of channels  For example, with no intra-class dependencies If the extended class dependency graph is acyclic, routing is deadlock free (sufficient condition) channel Class X0+X1+X0-X1- Y1+ Y0+ Y0- Y1-

ECE 8813a (33) Extensions Extending the domain of the routing function  Including source, channel, or history information Extension to central buffers  Channels are really queues oAssociate routing functions with central queues and use queue dependencies to analyze deadlocks  Domain of the routing function may be or NxN or QxN oExample 2-D mesh: four queues/node, one corresponding to each direction in each dimension.  Queue dependency graph is acyclic  Mixed resource types (edge buffers and central queues) utilizes similar analysis techniques  the extended resource dependency graph

ECE 8813a (34) Summarize Solution Philosophies Defined permitted dependencies (prevention)  Correct by construction (acyclic)  Minimal routing freedom Weaken the preceding requirement (avoidance)  Ensure cycles cannot lead to deadlock  Improve routing freedom  Some creative avoidance techniques based on the theory (next) Detect and recover (Next)  Predicated on unlikelihood of occurrence  Maximal routing freedom