EE382C Lecture 9 Deadlock 4/26/11 EE 382C - S11- Lecture 9.

Slides:



Advertisements
Similar presentations
Deadlock Prevention, Avoidance, and Detection
Advertisements

A Novel 3D Layer-Multiplexed On-Chip Network
Deadlock Prevention, Avoidance, and Detection.  The Deadlock problem The Deadlock problem  Conditions for deadlocks Conditions for deadlocks  Graph-theoretic.
6. Deadlocks 6.1 Deadlocks with Reusable and Consumable Resources
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.
Miguel Gorgues, Dong Xiang, Jose Flich, Zhigang Yu and Jose Duato Uni. Politecnica de Valencia, Spain School of Software, Tsinghua University, China, Achieving.
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.
1 Lecture 23: Interconnection Networks Paper: Express Virtual Channels: Towards the Ideal Interconnection Fabric, ISCA’07, Princeton.
Deadlocks. 2 System Model There are non-shared computer resources –Maybe more than one instance –Printers, Semaphores, Tape drives, CPU Processes need.
CSE 291-a Interconnection Networks Lecture 12: Deadlock Avoidance (Cont’d) Router February 28, 2007 Prof. Chung-Kuan Cheng CSE Dept, UC San Diego Winter.
CS 258 Parallel Computer Architecture Lecture 5 Routing February 6, 2008 Prof John D. Kubiatowicz
Lei Wang, Yuho Jin, Hyungjun Kim and Eun Jung Kim
1 Lecture 13: Interconnection Networks Topics: flow control, router pipelines, case studies.
1 Lecture 25: Interconnection Networks Topics: flow control, router microarchitecture Final exam:  Dec 4 th 9am – 10:40am  ~15-20% on pre-midterm  post-midterm:
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 25: Interconnection Networks, Disks Topics: flow control, router microarchitecture, RAID.
Issues in System-Level Direct Networks Jason D. Bakos.
1 Lecture 24: Interconnection Networks Topics: topologies, routing, deadlocks, flow control.
1 Lecture 26: Interconnection Networks Topics: flow control, router microarchitecture.
1 Lecture 25: Interconnection Networks Topics: communication latency, centralized and decentralized switches, routing, deadlocks (Appendix E) Review session,
1 Near-Optimal Oblivious Routing for 3D-Mesh Networks ICCD 2008 Rohit Sunkam Ramanujam Bill Lin Electrical and Computer Engineering Department University.
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.
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
Deadlock CEG 4131 Computer Architecture III Miodrag Bolic.
O1TURN : Near-Optimal Worst-Case Throughput Routing for 2D-Mesh Networks DaeHo Seo, Akif Ali, WonTaek Lim Nauman Rafique, Mithuna Thottethodi School of.
ECE669 L21: Routing April 15, 2004 ECE 669 Parallel Computer Architecture Lecture 21 Routing.
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.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock.
Lecture 16: Router Design
A formal proof of a necessary and sufficient condition for deadlock-free adaptive networks Interactive Theorem Proving Freek Verbeek & Julien.
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.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock: Part II - Recovery.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 7: Deadlocks.
Headline in Arial Bold 30pt Cyclic Dependencies and Deadlock Cyclic Dependencies and Deadlock in Computer Networks (with historical anectdotes) Greg Thorson.
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.
CSE 120 Principles of Operating
CSE 451: Operating Systems Winter 2012 Deadlock
Lecture 23: Interconnection Networks
ITEC 202 Operating Systems
Deadlock.
Interconnection Networks: Flow Control
Lecture 23: Router Design
Chapter 12: Concurrency, Deadlock and Starvation
Lecture 16: On-Chip Networks
Mechanics of Flow Control
Introduction to Operating Systems
Switching, routing, and flow control in interconnection networks
Deadlock, Illustrated.
Lecture 14: Interconnection Networks
Virtual-Channel Flow Control
Lecture: Interconnection Networks
On-time Network On-chip
DPNM Lab. Dept. of CSE, POSTECH
CEG 4131 Computer Architecture III Miodrag Bolic
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Lecture: Networks Topics: TM wrap-up, networks.
Lecture: Interconnection Networks
Lecture 22: Intro to Transactions & Logging IV
CSE 451: Operating Systems Spring 2008 Module 9 Deadlock
Lecture 25: Interconnection Networks
Presentation transcript:

EE382C Lecture 9 Deadlock 4/26/11 EE 382C - S11- Lecture 9

Question of the day What is the minimum number of virtual channels needed to break deadlock in a mesh network using virtual-channel flow control with minimal adaptive routing? Give two approaches to allocating these VCs. EE 382C - S11- Lecture 9

Deadlock Review Deadlock Deadlocked Configuration Resource Dependence A condition in which a set of agents waits indefinitely trying to acquire a set of resources Deadlocked Configuration A configuration in which the wait-for/held-by graph between agents and resources has at least one cycle i.e., the configuration is deadlocked Resource Dependence A resource A is dependent on a resource B if it is possible for A to be held-by an agent X and it is also possible for X to wait-for B This relationship is transitive If a resource dependence graph is acyclic, a deadlocked configuration cannot be reached EE 382C - S11- Lecture 9

Example Zax One day, making tracks  In the prairie of Prax, Came a North-Going Zax And a South-Going Zax. And it happened that both of them came to a place Where they bumped.  There they stood. Foot to foot.  Face to face. "Look here, now!" the North-Going Zax said, "I say! You are blocking my path.  You are right in my way. I'm a North-Going Zax and I always go north. Get out of my way, now, and let me go forth!" "Who's in whose way?" snapped the South-Going Zax. "I always go south, making south-going tracks. So you're in MY way!  And I ask you to move And let me go south in my south-going groove." Then the North-Going Zax puffed his chest up with pride. "I never," he said, "take a step to one side. And I'll prove to you that I won't change my ways If I have to keep standing here fifty-nine days!" "And I'll prove to YOU," yelled the South-Going Zax, "That I can stand here in the prairie of Prax For fifty-nine years!  For I live by a rule That I learned as a boy back in South-Going School. Never budge!  That's my rule.  Never budge in the least! Not an inch to the west!  Not an inch to the east! I'll stay here, not budging!  I can and I will If it makes you and me and the whole world stand still!" Well... Of course the world didn't stand still.  The world grew. In a couple of years, the new highway came through And they built it right over those two stubborn Zax And left them there, standing un-budge in their tracks. EE 382C - S11- Lecture 9

Zax Continued EE 382C - S11- Lecture 9

Example Circuit-switched ring network EE 382C - S11- Lecture 9

Example Consider the same 4-node ring network with virtual channel flow control What is the dependence graph? How can you avoid deadlock in this network? EE 382C - S11- Lecture 9

Protocol Deadlock EE 382C - S11- Lecture 9

Dealing with Deadlock Two main approaches Just say NO! (to deadlock) AKA Deadlock Avoidance Prevent a deadlock from ever occurring e.g., by resource ordering Fix it AKA Deadlock Recovery Detect a deadlock and correct it e.g., by dropping packets or using “escape paths” EE 382C - S11- Lecture 9

Resource Ordering Example – packet buffers in a ring Nodes of dependence graph are buffers (on nodes) Order by Distance remaining Dateline Example – virtual channels in a ring Nodes of dependence graph are virtual channels, not router nodes EE 382C - S11- Lecture 9

Order Buffers by Distance Remaining EE 382C - S11- Lecture 9

Order Buffers by Dateline EE 382C - S11- Lecture 9

Order Virtual Channels by Dateline EE 382C - S11- Lecture 9

Last Thursday’s QOTD What is the minimum number of virtual channels needed to break deadlock in a mesh network using virtual-channel flow control? A – it depends on your routing algorithm For DOR, you can get by with a single VC per PC EE 382C - S11- Lecture 9

Ordering Channels Dimension-order routing in a mesh EE 382C - S11- Lecture 9

The Turn Model (Glass and Ni ISCA ’92) All cycles in a 2-D mesh require four turns Disallow one of these turns from the clockwise set And a “compatible” turn from the counterclockwise set This avoids deadlock At the expense of restricting routing EE 382C - S11- Lecture 9

Turn Model (a) (c) (b) West-first North-last Negative- first disallowed EE 382C - S11- Lecture 9

Why is the last pattern disallowed? (c) (b) West-first North-last Negative- first disallowed EE 382C - S11- Lecture 9

It creates a cycle across the two sets EE 382C - S11- Lecture 9

Ordering Implied by West-First EE 382C - S11- Lecture 9

Deadlock and Adaptive Routing With adaptive routing there are alternatives Can have cycles in the channel dependence graph as long as there are escape paths from each cycle EE 382C - S11- Lecture 9

Example Consider a mesh with two VCs per node VC 0 is restricted to DOR (provides escape path) VC 1 can use arbitrary minimal routing This has cycles, but is deadlock free What if it were non-minimal? EE 382C - S11- Lecture 9

Indirect Dependence EE 382C - S11- Lecture 9

With non-minimal routing allowed Packets can traverse channels they already traversed Therefore, two packets can wait on each other Only a concern with flit-buffer flow control. Why? B Class 1 Class 1 B B A Class 0 Class 0 Class 0 is the DOR class EE 382C - S11- Lecture 9

Duato’s Theorem Divide routing relation into R1 and Rc = R-R1 Routing subrelation and complement subrelation R is deadlock free iff R1 has no cycles in its extended channel dependency graph Indirect dependence from ca to cb (in R1) if there exists a path from ca to cb over channels entirely in Rc EE 382C - S11- Lecture 9

Basic Router Architecture EE 382C - S11- Lecture 9

Router Pipeline EE 382C - S11- Lecture 9

Question of the day What is the minimum number of virtual channels needed to break deadlock in a mesh network using virtual-channel flow control with minimal adaptive routing? Give two approaches to allocating these VCs. EE 382C - S11- Lecture 9

Summary Deadlock Deadlock Avoidance Deadlock and Adaptive Routing Situation when agents wait indefinitely for resources Occurs when there is a cycle in the wait-for/held-by graph Cannot occur if resource dependence graph is acyclic Deadlock Avoidance Typically achieved by resource (buffers or VCs) ordering Accomplished by restricting resource allocation Buffer allocation VC allocation Routing Resource ordering Distance based Dateline Deadlock and Adaptive Routing Escape channels, routing subrelation Indirect dependence EE 382C - S11- Lecture 9