510 likes | 519 Views
Explore different flow control strategies like virtual channels and deadlocks in information transmission networks. Learn how to avoid and manage deadlock situations efficiently.
E N D
EE382CLecture 8 Flow Control Part 2 Virtual Channels Mechanics of Flow Control Deadlock 4/21/11 EE 382C - S11- Lecture 8
Logistics • HW2 due today • HW3 out today - see next slide - due 4/28 • Midterm IN CLASS on 5/3 EE 382C - S11- Lecture 8
Homework 3 • Problems 13.3, 14.2, 14.9 EE 382C - S11- Lecture 8
Pending Question from Tuesday • If storage is plentiful and channel bandwidth is expensive, what flow-control strategy should you use? • Hint: Does this depend on packet length? EE 382C - S11 - Lecture 7
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? EE 382C - S11- Lecture 8
Circuit Switching (II) EE 382C - S11 - Lecture 7
Flow Control Review • Allocate resources • Channel bandwidth, buffer space, router state • To units of information • Packets or Flits • Unbuffered flow control • Circuit switching • Dropping • Misrouting • Buffers decouple channel allocation • Packet-Buffer Flow Control • Store-&-Forward • Virtual cut-through • Flit-Buffer Flow Control • Wormhole • Virtual Channel • Virtual channels decouple channel dependencies EE 382C - S11- Lecture 8
Buffered Flow Control • Packet-Buffer FC • Store and Forward • Virtual Cut Through • Flit-Buffer FC • Wormhole • Virtual Channels EE 382C - S11 - Lecture 7
Packet-Buffer Flow Control EE 382C - S11 - Lecture 7
Store-and-Forward EE 382C - S11 - Lecture 7
Virtual Cut-through EE 382C - S11 - Lecture 7
Packet-Buffer Flow Control EE 382C - S11 - Lecture 7
Allocation units EE 382C - S11 - Lecture 7
What is good about packet buffers?What is bad about packet buffers? EE 382C - S11 - Lecture 7
Wormhole The Movie EE 382C - S11 - Lecture 7
Head flit arrives, allocate VC state, request upper output EE 382C - S11 - Lecture 7
Body flit arrives, still waiting on upper output EE 382C - S11 - Lecture 7
Output allocated, forward head flit, second body flit arrives EE 382C - S11 - Lecture 7
Tail arrives, body flit forwarded EE 382C - S11 - Lecture 7
Second body flit forwarded EE 382C - S11 - Lecture 7
Tail flit forwarded, input and output VC states deallocated EE 382C - S11 - Lecture 7
Virtual Channel Flow Control EE 382C - S11- Lecture 8
Blocking of wormhole flow control EE 382C - S11 - Lecture 7
Virtual-channel flow control decouples dependency between buffer and channel EE 382C - S11 - Lecture 7
Sometimes, its better to be unfair (part 1) EE 382C - S07- Lecture 8
Fair arbitration interleaves flits. Both packets are impeded EE 382C - S07- Lecture 8
Winner-take-all arbitration impedes only one packet – by the same amount as interleaving EE 382C - S07- Lecture 8
Q • When should you use winner-take-all? • And when shouldn’t you? EE 382C - S07- Lecture 8
Is “Winner Take All” just Wormhole? EE 382C - S07- Lecture 8
State of a VC router EE 382C - S07- Lecture 8
Wide vs long buffers(Which of these is better?) EE 382C - S11- Lecture 8
Many small buffers winsnon-interference with stiff backpressure EE 382C - S11- Lecture 8
VCs as a Swiss Army knife EE 382C - S11- Lecture 8
Pending Question from Tuesday • If storage is plentiful and channel bandwidth is expensive, what flow-control strategy should you use? • Hint: Does this depend on packet length? EE 382C - S11 - Lecture 7
Mechanics of Flow Control EE 382C - S11- Lecture 8
Credit-Based Flow Control EE 382C - S11- Lecture 8
On/Off Flow Control EE 382C - S11- Lecture 8
Ack-Nack Flow Control EE 382C - S11- Lecture 8
Deadlock EE 382C - S11- Lecture 8
Definition Deadlock • A condition in which a set of agents waits indefinitely trying to acquire a set of resources EE 382C - S11- Lecture 8
Examples • Dining Philosophers • Circuit Switching • Who are the agents? • What are the resources? EE 382C - S11- Lecture 8
Deadlocked Configuration • Waits-for, held-by graph • Circuit switching example EE 382C - S11- Lecture 8
Example • Circuit-switched ring network EE 382C - S11- Lecture 8
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 EE 382C - S11- Lecture 8
Cyclic Resource Dependence A cycle in the resource dependence graph means that a deadlocked configuration is possible. It does not mean that deadlock has occurred or will occur. EE 382C - S11- Lecture 8
Example • Consider the same 4-node ring with packet-buffer flow control • What is the dependence graph? • What is the held-by, wait-for graph for a deadlocked configuration? • How can you avoid deadlock in this network? EE 382C - S11- Lecture 8
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 8
Protocol Deadlock EE 382C - S11- Lecture 8
Next Time • 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 8
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? EE 382C - S11- Lecture 8