Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mechanics of Flow Control

Similar presentations


Presentation on theme: "Mechanics of Flow Control"— Presentation transcript:

1 Mechanics of Flow Control
EE382C Lecture 8 Flow Control Part 2 Virtual Channels Mechanics of Flow Control Deadlock 4/21/11 EE 382C - S11- Lecture 8

2 Logistics HW2 due today HW3 out today - see next slide - due 4/28
Midterm IN CLASS on 5/3 EE 382C - S11- Lecture 8

3 Homework 3 Problems 13.3, 14.2, 14.9 EE 382C - S11- Lecture 8

4 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

5 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

6 Circuit Switching (II)
EE 382C - S11 - Lecture 7

7 Flow Control Review Allocate resources To units of information
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

8 Buffered Flow Control Packet-Buffer FC Flit-Buffer FC
Store and Forward Virtual Cut Through Flit-Buffer FC Wormhole Virtual Channels Why buffer? EE 382C - S11 - Lecture 7

9 Packet-Buffer Flow Control
EE 382C - S11 - Lecture 7

10 Store-and-Forward EE 382C - S11 - Lecture 7

11 Virtual Cut-through EE 382C - S11 - Lecture 7

12 Packet-Buffer Flow Control
EE 382C - S11 - Lecture 7

13 Allocation units EE 382C - S11 - Lecture 7

14 What is good about packet buffers? What is bad about packet buffers?
Don’t idle channels when a packet is partly transmitted and you can’t get a buffer Of course you may idle a channel because you can’t get a buffer to start sending. Two main issues: They are big – this increases cost and energy Not the most efficient way to use a fixed amount of buffer space Big buffers soften backpressure – you can send a lot of flits the wrong way before you sense congestion. EE 382C - S11 - Lecture 7

15 Wormhole The Movie EE 382C - S11 - Lecture 7

16 Head flit arrives, allocate VC state, request upper output
W is waiting state U is upper output channel L refers to lower input channel EE 382C - S11 - Lecture 7

17 Body flit arrives, still waiting on upper output
EE 382C - S11 - Lecture 7

18 Output allocated, forward head flit, second body flit arrives
A is active Both ports now select upper U EE 382C - S11 - Lecture 7

19 Tail arrives, body flit forwarded
EE 382C - S11 - Lecture 7

20 Second body flit forwarded
EE 382C - S11 - Lecture 7

21 Tail flit forwarded, input and output VC states deallocated
EE 382C - S11 - Lecture 7

22 Virtual Channel Flow Control
EE 382C - S11- Lecture 8

23 Blocking of wormhole flow control
Example of inefficiency – channel is idle even though a packet could use it Why? Because blocked packet owns the buffer EE 382C - S11 - Lecture 7

24 Virtual-channel flow control decouples dependency between buffer and channel
EE 382C - S11 - Lecture 7

25 Sometimes, its better to be unfair (part 1)
EE 382C - S07- Lecture 8

26 Fair arbitration interleaves flits. Both packets are impeded
EE 382C - S07- Lecture 8

27 Winner-take-all arbitration impedes only one packet – by the same amount as interleaving
EE 382C - S07- Lecture 8

28 Q When should you use winner-take-all? And when shouldn’t you?
EE 382C - S07- Lecture 8

29 Is “Winner Take All” just Wormhole?
EE 382C - S07- Lecture 8

30 State of a VC router EE 382C - S07- Lecture 8

31 Wide vs long buffers (Which of these is better?)
EE 382C - S11- Lecture 8

32 Many small buffers wins non-interference with stiff backpressure
EE 382C - S11- Lecture 8

33 VCs as a Swiss Army knife
EE 382C - S11- Lecture 8

34 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

35 Mechanics of Flow Control
EE 382C - S11- Lecture 8

36 Credit-Based Flow Control
EE 382C - S11- Lecture 8

37 On/Off Flow Control EE 382C - S11- Lecture 8

38 Ack-Nack Flow Control EE 382C - S11- Lecture 8

39 Deadlock EE 382C - S11- Lecture 8

40 Definition Deadlock A condition in which a set of agents waits indefinitely trying to acquire a set of resources EE 382C - S11- Lecture 8

41 Examples Dining Philosophers Circuit Switching Who are the agents?
What are the resources? EE 382C - S11- Lecture 8

42 Deadlocked Configuration
Waits-for, held-by graph Circuit switching example EE 382C - S11- Lecture 8

43 Example Circuit-switched ring network EE 382C - S11- Lecture 8

44 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

45 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

46 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

47 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

48 Protocol Deadlock EE 382C - S11- Lecture 8

49 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

50 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

51 Summary Virtual Channel Flow Control Flow Control Mechanics Deadlock
Partition channel state Allow packets to “pass” blocked packets Many uses Performance QoS Non-interference Deadlock avoidance Flow Control Mechanics Backpressure requires signaling Credits, on/off, ack/nack Deadlock Occurs when agents “wait forever” for resources Agents: connections, packets Resources: channels, buffers, virtual channels Deadlocked configuration Resource dependence EE 382C - S11- Lecture 8


Download ppt "Mechanics of Flow Control"

Similar presentations


Ads by Google