Title: Deadlock, Livelock and Starvation chapter 3
1Deadlock, Livelock and Starvation (chapter 3)
- INTERCONNECTION NETWORKS
- AN ENGINEERING APPROACH
- DUATO, YALAMANCHILI, NI
2Ge????
- Deadlock µe???? pa??ta de? µp????? ?a p?????????
st?? p?????sµ?, d??t? ta buffers p?? ??e?????ta?
??a ?a ap????e?t??? e??a? ?d? ?eµ?ta. - s????a ap? pa??ta µp???????ta? ??a p??ta, af??
???e pa??t? a?te?ta? p?????, p?? e??a?
desµe?µ???? ap? ???a pa??ta, e?? t? ?d?? d?at??e?
p????? p?? ??e?????ta? ???a pa??ta. - Livelock ??a pa??t? µp??e? ?a ta??de?e? ???? ap?
t?? p?????sµ?, d??t? ta ?a????a µ?s? t?? ?p????
??e? p??sßas? se a?t?? e??a? desµe?µ??a ap? ???a
pa??ta. - s?????? s?µßa??e? ?ta? ta pa??ta de? a?????????
ta ß??t?sta µ???p?t?a.
3Ge????
- Starvation a? ? ????s? e??a? ??t??? ?a? ??
p????, p?? a?te?ta? ??a pa??t?, pa?a??????ta?
p??ta se ???a pa??ta p?? t??? ??t??e, t?te a?t?
t? pa??t? µp??e? ?a staµat?se? µ???µa. - s?µßa??e? ?ta? se pe??pt?s? s??????s??
???s?µ?p??e?ta? ?a??asµ??? s??d?? a???es?? p????.
43.1 A Theory of Deadlock Avoidance
53.1.1 Network and Router Models
- Direct networks s????? ap? ??µß???
d?as??dedeµ????? µe ?a????a ? µe s??d?sµ??? ap?
s?µe?? se s?µe??. ???e ??µß?? ??e? ??a? router. - Switch crossbar
- Routing arbitration unit ?a???????? t? ?a????
e??d?? ???e pa??t?? s??a?t?se? t?? ??µß??
p?????sµ??, t?? t?????t?? ??µß?? ?a? t??
?at?stas?? t?? ?a?a???? e??d??. - ?ta? ??a pa??t? ?ata?aµß??e? t? µ???da routing
arbitration ?a? de? µp??e? ?a d??µ??????e? ????
???e???? e?e??e??? ?a?a???? e??d??, ap????e?eta?
p??s????? st?? buffer e?s?d??. ?ta? d??µ????e?ta?
?a??, t?te p????e?ta? st? 1? d?a??s?µ? ?a????
e??d??, p?? e??a? ??????. - Physical channels d??ate????t???a, d?p??.
?p????? ?a µ???ast??? se virtual channels. ?a
virtual channels µ???????ta? ??????? t? f?s???
µ?s? ?ta? p???e?ta? ?a µetaf????? flit. - Channel queue ? s???????? ap????e?t???? ?????
p?? s?et??eta? µe ??a virtual channel.
63.1.2 Basic Definitions
- ???t?? d?as??des?? I pa??st??eta? ap? ??a ?s????
s??dedeµ???, ?ate?????µe?? ???f? µe p???ap???
a?µ?? G(N, C), ?p?? ?? ????f?? t?? ???f??
pa??st????? t??? ??µß??? ?a? ?? a?µ?? ta ?a????a
ep????????a? t?? d??t???. - ?e??ss?te?a t?? e??? ?a????a ep?t??p??ta? ?a
s??d???? ??a ?e???? ??µß??. - ?a d??ate?????µe?a ?a????a ?e?????ta? ?? 2
µ????ate?????µe?a ?a????a. - ci ?a???? si ??µß?? p??? di ??µß??
p?????sµ?? - ???????µ?? d?ad??µ?s??
- Routing function ßas???µe?? st?? t?????ta ??µß?
?a? t?? ??µß? p?????sµ? (NxN), pa???e? ??a s?????
ap? ?a????a e??d??. ??s?ast??? ?a?????e? a? ?
a??????µ?? e??a? e?e??e??? ap? deadlocks. - Selection function ßas???µe?? st?? ?at?stas? t??
?a?a???? e??d?? t?? t?????t?? ??µß??, ep????e?
??a ?a???? ap? t? s?????. ??s?ast???, ep??e??e?
t?? e?t??es?.
7Continue
- ?e? ?p???e? pe?????sµ?? st?
- ???µ? pa?a????? pa??t??.
- ??????sµ? pa??t??.
- ???e??? pa??t??.
- ????p?t? p?? pa???e? ? a??????µ?? d?ad??µ?s??
(ß??t?st? ? ???). - Se pepe?asµ??? ????? ?a ?????? ta pa??ta.
- SAF VCT switching ?p?????? edge buffers.
- S??e?t??? ?a?e?ta? ? s????t?s? d?ad??µ?s?? ?ta?
??a ???e µ???p?t? P, p?? ????e?, t?te ??a ta
?p?µ???p?t?a t?? P µp????? ?a ???st??? ap? a?t??.
- Wormhole switching
- ? ???? de? pe????e? flits d?af??et???? pa??t??.
- ? ???? ?a p??pe? ?a ade???e? p??? de?te? ????
header flit. - ?ta? ??a virtual channel ??e? ????? ?a? sta 2
???a, t?te ?a? ?? 2 ????? ?a p??pe? ?a ade??s???
p??? t?? ??e?s? ???? header flit. - Mad postman switching
- ?d??? pe?????sµ?? µe t? wormhole, ap??? ta dead
flits ?ta? µp???????ta? ap?µa??????ta?. - Configuration a???es? pa??t?? ? flits se ???e
????.
8Continue
Legal configuration pe?????fe? µ?a p??a??
?at?stas?
Canonical ????eta? t? deadlock configuration st?
?p??? ??a ta pa??ta e??a? µp???a??sµ??a.
9Continue
- Canonical deadlock configuration e??a? legal
configuration ?p?? ?a???a pa??t? de? p????e?ta?. - SAF VCT switching
- ?a???a pa??t? de? ??e? ?d? f??se? st?? ??µß?
p?????sµ?. - ?a pa??ta de? µp????? ?a p????????? ??at? ??
????? ???? t?? e?a??a?t???? ?a?a???? e??d??, p??
????? p??ta?e?, e??a? p???e??. - Wormhole switching
- ?e? ?p???e? pa??t? t?? ?p???? t? header flit ?a
??e? ft?se? st?? ??µß? p?????sµ?. - ?a header flits de? µp????? ?a p????????? ??at?
?? ????? ???? t?? e?a??a?t???? ?a?a???? e??d??,
p?? ????? p??ta?e?, de? e??a? ?de?e?. - ?a data flits de? µp????? ?a p????????? ??at? t?
ep?µe?? ?a???? e??d?? p?? desµe?t??e ap? t?
header flit ??e? t?? a?t?st???? ???? p????.
10Continue
- Reachable e??a? ? configuration p?? ep?t?????eta?
d??µ??????ta? pa??ta se ??a a????? ?de?? d??t??. - ???e legal configuration e??a? reachable.
- H routing function de? ??????e? t? µ???p?t? p??
a???????se ???e pa??t?. ?ts?, ??a ???e legal
configuration - ?? pa??t? p?? ap????e?eta? st?? ???? e???
?a?a????, ?e??e?ta? ?t? pa???eta? ap? t?? ??µß?
p??? a?t?? t?? ?a?a????. - Wormhole switching t? pa??t? pa???eta? ap? t??
??µß? p??? t?? ?a?a???? p?? p????e? t? te?e?ta??
flit t?? pa??t??. - ?ta? ??a ta legal configurations e??a? reachable,
? routing function de? ??e? deadlocks a?? de?
?p???e? ??p??? deadlock configuration ??a a?t? t?
s????t?s?. - ? routing function R e??a? s??dedeµ??? a? µp??e?
?a ??se? µ???p?t? a??µesa se 2 ??µß???,
???s?µ?p????ta? ta ?a????a p?? ? ?d?a ????e?.
113.1.3 Necessary an Sufficient Condition
- ?ta? ??a pa??t? ??e? desµe?µ??? ??a ?a???? ?a?
??t?e? ?a ???s?µ?p???se? ??a ???? ?a????, t?te
?p???e? e???t?s? a??µesa se a?t? ta 2 ?a????a. - ?a? ta 2 ?a????a e??a? se ??a ap? ta µ???p?t?a
p?? µp??e? ?a a???????se? t? pa??t?. - Wormhole switching ta ?a????a de? e??a?
apa?a?t?ta ?e?t????? µ?a? ?a? ??a pa??t? µp??e?
?a desµe?e? p???? ?a????a ta?t?????a. - Se d???? ??µß?, ??a pa??t? µp??e? ?a ??t?se? t?
???s? p????? ?a?a???? ?a? µet? ?a d?a???e? ??a
ap? a?t?. - ?ta? ??a ta e?a??a?t??? ?a????a e??d?? e??a?
apas????µ??a, t? pa??t? ?a p??e? t? 1? d?a??s?µ?
?a???? p?? ??t?se. - ??a ta ?a????a p?? ????? ??t??e? d?µ????????
e?a?t?se?? a??µa ?a? a? te???? de? ?????
ep??e??e?. - ????e?µ???? ?a ap?fe?????? ta deadlocks, e??a?
apa?a?t?t? ?a ap?µa???????? ?? ????????
e?a?t?se??.
12Continue
Routing function ?? ? t????? ??µß?? ni e??a?
?d??? µe t?? ??µß? p?????sµ? nj, t?te ap????e?se
t? pa??t?. ??????, a? jlti ???s?µ?p???se t?
c0i. ?? jgti ???s?µ???se t? c1i.
deadlock-free c00 c13 de
???s?µ?p?????ta?.
Routing function ?? ? t????? ??µß?? e??a? ?
??µß?? p?????sµ??, t?te ap????e?se t? pa??t?.
??????, ???s?µ?p???se t? ci. ?p???e? ???????
e???t?s? a??µesa sta ?a????a ci. deadlock
13Continue
- ???e deadlock configuration ???s?µ?p??e? µ??? ta
?a????a cAi. - Escape path µ???p?t? e?e??e?? ap? ????????
e?a?t?se??. - ???????st?? ??a pa??t? ap? ???e ????? ?a p??pe?
?a ep????e? t? escape path st? t?????ta ??µß?,
a?e???t?ta ap? t?? p?????sµ?. - ?? R e??a? µ?a routing function ?a? R1 µ?a
routing subfunction, t?te ????µe - ta ?a????a p?? pa?????ta? ap? t?? R1
?a????ta? escape channels. -
Routing function ?? ? t????? ??µß?? ni e??a?
?d??? µe t?? ??µß? p?????sµ? nj, t?te ap????e?se
t? pa??t?. ??????,???s?µ?p???se t? cAi , j?i ? t?
cHi, jgti. deadlock-free
14Continue
- ?p???e? e???t?s? ap? ??a escape channel ci se ??a
???? escape channel ck a? ?p???e? pa??t? p??
desµe?e? t? ci ?a? ??t?e? t? ck ?? escape channel
??a t?? ea?t? t??. - Channel dependency graph ???a? ??a?
?ate?????µe??? ???f??, DG(C, E). ?? ????f?? t??
D e??a? ta ?a????a t?? d??t??? d?as??des?? I. ??
a?µ?? t?? D e??a? ?e??? ?a?a???? (ci, cj) t.?.
?p???e? e???t?s? ap? t? ci st? cj. - Extended channel dependency graph of R1.
15Continue
- Te???µa ??a s??dedeµ??? routing function R ??a
??a d??t?? d?as??des?? I e??a? e?e??e?? ap?
deadlocks a?? ?p???e? µ?a routing subfunction R1
? ?p??a e??a? s??dedeµ??? ?a? de? ??e? ???????
st? a?t?st???? extended channel dependency graph. - ????sµa ??a ?tete?µ???st??? routing function R
??a ??a d??t?? d?as??des?? I e??a? e?e??e?? ap?
deadlocks a?? de? ?p?????? ?????? st? a?t?st????
channel dependency graph D.
16Continue
- ??e????a d??µ?????s?? (?)
- ?ta? ??a pa??t? ???s?µ?p??e? ??a escape channel
se ??a? ??µß?, t?te st?? ep?µe?? ??µß? µp??e? ?a
???s?µ?p???se? ?p???d?p?te d?a??s?µ? ?a???? p??
pa???e? ? routing function. - ?ta? ??a pa??t? µp?????e?, t?te pe??µ??e? st??
???? t?? ?a?a???? e?s?d?? ?a? ?a d??µ??????e?
µ???? ??p??? ap? ta pa?e??µe?a ?a????a t??
routing function ???e? d?a??s?µ?.
173.1.4 Deadlock Avoidance in SAF and VCT
Switching.
- (?pe???µ?s? ?p???e? e???t?s? ap? ??a escape
channel ci se ??a ???? escape channel ck a?
?p???e? pa??t? p?? desµe?e? t? ci ?a? ??t?e? t?
ck ?? escape channel ??a t?? ea?t? t??.) - Direct dependency a? t? ci e??a? escape channel
??a t? pa??t? µe t?? s???e???µ??? p?????sµ?. - Direct cross-dependency a? t? ci de? e??a?
escape channel ??a t? pa??t? µe t?? s???e???µ???
p?????sµ?.
18Continue
Routing subfunction R1 ?? ? t????? ??µß?? ni
e??a? ?d??? µe t?? ??µß? p?????sµ? nj, t?te
ap????e?se t? pa??t?. ??????,???s?µ?p???se t? cAi
, jlti ? t? cHi, jgti.
?a?ade??µata 1? pa??t? ap????e?µ??? st?? n1 µe
p?????sµ? t? n0. (cA1-cA2-cA3 direct
dependencies) . 2? pa??t? ap????e?µ??? st?? n1
µe p?????sµ? t? n3. (cA1-cH2 direct
cross-dependency) .
19Continue
- ????sµa ??a s??dedeµ??? routing function R ??a
??a d??t?? d?as??des?? I e??a? e?e??e?? ap?
deadlocks, a? ?p???e? ??a ?p?s????? C1 ? C t.?. ?
routing subfunction R1(x,y)R(x,y)nC1 ??a ???e
x,y ? ? e??a? s??dedeµ??? ?a? de? ??e? ???????
st? a?t?st???? channel dependency graph D1. - Te???µa ??a s??dedeµ??? routing function R ??a
??a d??t?? d?as??des?? I e??a? e?e??e?? ap?
deadlocks, a? ?p???e? ??a ?p?s????? C1 ? C t.?. ?
routing subfunction R1(x,y)R(x,y)nC1 ??a ???e
x,y ? ? e??a? s??dedeµ??? ?a? e?e??e?? ap?
deadlocks.
203.1.5 Deadlock Avoidance in Wormhole Switching.
- ??a pa??t? ,p?? a?te?ta? ??a µ? ?e?t????? ?a????,
d?at??e? desµe?µ??a ?a? ??a ta ?a????a t??
µ???pat??? p?? pe??????? t? te?e?ta?? flit ?? ?a?
t? header flit. - ??te ?p???e? µ?a se??? ap? e?a?t?se?? a??µesa sta
?e?t????? ?a????a a?t?? t?? µ???pat???. - ??a pa??t? ?s?? ?a desµe?e? ??a s????? ap?
?e?t????? ?a????a ci,ci1,,ck-1,ck ?ts? ?ste ta
ci, ck ?a e??a? escape channels e?? ta ?p????pa
???. - ? e???t?s? ap? t? ci st? ck e??a? s?µa?t???.
- Indirect dependency ?? t? ci e??a? escape
channel ??a t? pa??t? µe t? s???e???µ???
p?????sµ?. - Indirect cross-dependency ?? t? ci de? e??a?
escape channel ??a t? pa??t? µe t? s???e???µ???
p?????sµ? a??? e??a? ??a ?????? p?????sµ???. - ?? ck e??a? escape channel ?a? st?? 2 pe??pt?se??.
21Continue
- Routing function R?? ? t????? ??µß?? ni e??a?
?d??? µe t?? ??µß? p?????sµ? nj, t?te ap????e?se
t? pa??t?. ??????,???s?µ?p???se t? cAi ? cBi ??a
j?i ? t? cHi ??a jgti. - Routing subfunction R1?? ? t????? ??µß?? ni
e??a? ?d??? µe t?? ??µß? p?????sµ? nj, t?te
ap????e?se t? pa??t?. ??????,???s?µ?p???se t? cAi
, jlti ? t? cHi, jgti.
- ?a?ade??µata
- ?a??t? µe p?????sµ? t? n4, t?? ?p???? t? header
e??a? ap????e?µ??? st? n1. (cH1-cB2-cH3 indirect
dependency) / cA1-cB2-cH3 indirect
cross-dependency)
22Continue
- ?a??t? µe p?????sµ? t? n2 t?? ?p???? t? header
e??a? st? n3 (cA3-cA0-cH1 indirect dependency). - ?a??t? µe p?????sµ? t? n3 t?? ?p???? t? header
e??a? st? n0 (cH0-cA1-cH2 indirect dependency). - ?e? ?p???e? indirect cross-dependency.
- R deadlock-free.
23Continue
- ?ta? µp?????e? ??a pa??t?, t?te e??a?
apas????µ??a p???? ?a????a. - deadlock-free, SAF.
- Routing functions
- not deadlock-free, Wormhole
switching. - ???e?sa? µ?a? routing subfunction µe ??????? st?
a?t?st???? extented channel dependency graph, de?
s??ep??eta? t?? ?pa??? e??? deadlock. -
24Continue
- ai virtual
- ?a???? ci
- bi virtual
- ? routing function R pa???e?
- ?a????a a p?? a?????? sta ß??t?sta µ???p?t?a.
- ??a ?a???? b s?µf??a µe t? dimension-order
routing.
25Continue
?a????
dependencies
?a???? t?? C1
Indirect dependencies
- C1 s????? ap? b channels.
- R1 R1(x,y)R(x,y)nC1 ??a ???e x,y ? ?
- S??dedeµ???
- ? ???f?? ??????? R e?e??e?? ap? deadlocks.
263.2 Extensions
273.2.1 Channel Classes
- ?s?d??aµa 2 ?a????a ci, cj ta ?p??a ?????
??????? p???at????? ?a? d?ad?????. - ???s? ?s?d??aµ?a? ? ?µad?p???s? t?? ?s?d??aµ??
?a?a????. - ?e? ?p???e? e???t?s? a??µesa sta ?a????a t??
?d?a? ???s??. - ?p???e? e???t?s? ap? t?? ???s? Ki st?? ???s? Kj
a? ?p?????? 2 ?a????a ci ? Ki ?a? cj ? Kj t.?.
?p???e? e???t?s? a??µesa se a?t?. - Class dependency graph a? ?? ???se?? pe???????
??a ta ?a????a. - Extended class dependency graph ???se?? µe t?
s????? ?a?a???? C1 p?? pa???e? ? routing
subfunction R1. -
28Continue
- Te???µa ??a s??dedeµ??? routing function R ??a
??a d??t?? d?as??des?? I e??a? e?e??e?? ap?
deadlocks, a? ?p???e? µ?a s??dedeµ??? routing
subfunction R1 ?a? µ?a s??s? ?s?d??aµ?a? R1
ßas???µe?? st? C1Ux,y?N R1(x,y) ?ts? ?ste t?
extended class dependency graph ??a t?? R1 ?a
e??a? ??????. - ? ?pa??? e???t?s?? a??µesa se 2 ???se?? de?
?p???e? apa?a?t?ta t?? ?pa??? e???t?s?? a??µesa
se ???e ?e???? ?a?a???? a?t?? t?? ???se??. - ? ?pa??? ?????? st? extended class dependency
graph de? ?p???e? ?t? t? extended channel
dependency graph ??e? ???????.
29Continue
- p.?. pa?at??e?ta? ? ?pa??? e?a?t?se?? ap? t???
b01,b34,b67 st??? b12,b45,b78. - ??a ta ??????t?a (???eta) ?a????a st?? ?d?a st???
(??aµµ?) ?a? ?ate????s? a?????? st?? ?d?a ???s?. - p.?. X0b01,b34,b67
- ?p?????? e?a?t?se?? ???se?? ap? ???e X ???s? se
???e Y. - ?pe?d? ap? ??a t??????st?? ??????t?? ?a????
µp??e? ?a ??t??e? st? s????e?a t? a?t?st????
???et? ?a????.
303.2.2 Extending the Domain of the Routing
Function.
- NxN ? routing function, p???e?µ???? ?a p??sf??e?
st? pa??t? ??p??e? ep??????, ?aµß??e? ?p??? µ???
t?? t?????ta ??µß? ?a? t?? ??µß? p?????sµ?. - H R ?a µp????se ?a ?aµß??e? ?p??? ?a? ???e?
p????f???e?, ?p?? - ??? ??µß? p???.
- ?? p????? t?? ?a??asµ???? e?e??e??? ?s?? af??? t?
d?ad??µ?s? t?? pa??t??. - ??? ???? t?? ?a?a???? e?s?d?? st? ?p???
ap????e?eta? t? pa??t? ? t? header t??.
?ed?? ???sµ?? CxN.
313.2.3 Central Queues
- ?? µ???a??µe??? p???? e??a? ?? ?????.
- ? routing function ?at? t? d??µ?????s? pa??t??
a?t? ?a pa???e? ?a????a, pa???e? ?????. - NxN
- ?ed?? ???sµ?? t?? R
- QxN
- Queue dependancy t? pa??t? e??a? p????? ?
µe????? ap????e?µ??? se µ?a ???? ?a? a?te?ta? µ?a
????. - ?? queue dependancy graphs a?t??a??st??? t???
channel dependancy graphs. - ????? ?a???? ? ????.
- Resource dependancy t? pa??t? apas???e? ??a?
p??? ?a? a?te?ta? ??a? ?????. - ?µ???? ????eta? t? extended resource dependency
graph.
323.3 Alternative Approaches
333.3.1 Theoretical Approaches
- Waiting channel
- ?? ? routing function, ?p? f?s????????? s?????e?,
pa???e? ??a t? d??µ?????s? e??? pa??t?? t? s?????
?a?a???? Ci, t? pa??t? ?ta? µp?????eta? a?aµ??e?
µ??? ??a ?a???? p?? a???e? st? Cj ? Ci. - To Cj µp??e? ?a ??e? ??a µ??? ?a????.
- ???ad? µe?????ta? ?? ep?????? t?? pa??t??.
- ?????eta? ? e?e????a t?? d?ad??µ?s??
- E?de??µ???? ap?fe????ta? ??p??e? ep?????? p??
?d????? se deadlocks. - Wait-for graph
- O ???f?? ?p?de????e? t??? p????? p?? a?aµ????? ta
µp???a??sµ??a pa??ta. - ?s? ta pa??ta de? e??a? µp???a??sµ??a µp????? ?a
???s?µ?p???s??? ?a? µ? ß??t?sta µ???p?t?a. - ?a µp???a??sµ??a pa??ta de? ep?t??peta? ?a
a?aµ????? ?a????a p?? e??a? desµe?µ??a ap? ???a
pa??ta. - ?? d?µ???????? ?????, t?te p??pe? ?a
???s?µ?p???s??? ?tete?µ???st??? d?ad??µ?s?.
34Continue
- Message flow model
- ??a ?a???? e??a? ap??sß??t? ap? deadlocks a? ???e
pa??t?, p?? desµe?e? a?t? t? ?a????, pa?ad?deta?
?p?sd?p?te. - ? routing function se a?t? t? µ??t??? e??a?
e?e??e?? ap? deadlocks a?? ??a ta ?a????a e??a?
ap??sß??ta ap? deadlocks. - ?? µ??t??? a?a??e? ta ?a????a, ta ?p??a e?????ta?
t?? pa??d?s? t?? pa??t??, ?a? µet? ß?µa-ß?µa
a?a??e? ta ?e?t????? ?a????a. - A channel waiting graph
- ?a???s???e? t?? s?s?et?se?? a??µesa sta ??????a.
- ???s?µ?p??e? routing function selection
function. - O a??????µ?? d?ad??µ?s?? e??a? e?e??e??? ap?
deadlocks a? e??a? wait-connected ?a? de?
?p?????? ?????? st? channel waiting graph. - Wait-connected a? e??a? s??dedeµ????
???s?µ?p????ta? µ??? waiting channels. - True cycles ?ta? d?µ????????ta? ?e?????ta? ap?
?de?? d??t??. - ??a? a??????µ?? d??µ?????s?? e??a? e?e??e??? ap?
deadlocks a?? ?p???e? pe?????sµ??? channel
waiting graph, p?? e??a? wait-connected ?a? de?
??e? true cycles.
353.3.2 Deflection Routing
- Deflection (hot potato) routing
- input channels output channels.
- ?? ? ??µß?? de? e?s??e? ??p??? pa??t? st? d??t??,
t?te ???e e?se???µe?? pa??t? ?a ß??s?e? ??a
e?e??e?? e?e???µe?? ?a????. - ?? ?p?????? p????? ep?????? t?te ep????eta? t?
?a???? p?? a???e? st? ß??t?st? µ???p?t?. ??????
t? pa??t? ?a d??µ??????e? esfa?µ??a. - ?? ? ??µß?? e?s??e? ??p??? pa??t? st? d??t??,
t?te ?s?? ??a ta e?e???µe?a ?a????a ?a e??a?
desµe?µ??a e?t?? ap? t? memory port. - ?? st?? ??µß? a?t? ft??e? ???? pa??t?, t?te
ap????e?eta?. - ???te?a??t?ta ????? ta ap????e?µ??a pa??ta ?a?
µet? a?t? p?? f??????. - ?e?????sµ??
- 1???pa?te? t?? ap????e?s? t?? pa??t?? st??
t?????ta ??µß? ?ta? ??a ta e?e???µe?a ?a????a
e??a? apas????µ??a. - 2???a pa??ta d??µ???????ta? esfa?µ??a, ?ta? ??a
ta e?e???µe?a ?a????a p?? a?????? sta ß??t?sta
µ???p?t?a e??a? apas????µ??a. - (-) packet latency, bandwidth consumption ()
ap??t?ta, e?e????a.
363.3.3 Injection Limitation
- ?????? ??a SAF VCT switching.
- Ring
- Se ?at?stas? deadlock de? p????e?ta? ?a???a
pa??t?. - ?? ?p???e? ??a t??????st?? ?de?? buffer t?te de?
?p???e? deadlock. - O ??µß?? de? e?s??e? ??? pa??t? a? ?eµ??e? ?
t?p??? ????. - 2 ? pe??ss?te??? buffers st?? t?p??? ????
apa?t???ta? ??a t?? e?sa???? ???? pa??t??.
37Continue
- Torus
- ?e?t????? ?????, dimension-order routing.
- ?a????a d??ate?????µe?a.
- ???e d??stas? ??e???eta? 2 ????? (µ?a ??a ???e
?ate????s?). - ? ???? ?aµß??e? pa??ta ap? t?? t?p??? ??µß? ?a?
ap? ?aµ???te?e? d?ast?se??. - ? ??µß?? de? e?s??e? ??? pa??t? a? p???e?ta? ?a
?eµ?se? ? a?t?st???? ????. - ?? pa??t? de? µp??e? ?a p??????e? st?? ep?µe??
d??stas? a? p???e?ta? ?a ?eµ?se? ? a?t?st????
????. - ???te?a??t?ta ????? ta pa??ta p?? a???????
d??stas? ??a?t? t?? ???? pa??t?? p?? e?s????ta?.
383.4 Deadlock Avoidance in Switch-Based Networks.
39- S?????s? router (direct network) switch
(switch-based network) - O router s??d?eta? µe ??a? epe?e??ast?, e?? t?
switch µe 0,1 ? pe??ss?te???? epe?e??ast??. - ?p?t?ept? epa?a?????f???a
- To pa??t? µp??e? ?a d?as??se? t? d??t?? p?????
f???? f?????ta? se ??a? e?d??µes? ??µß? µet? ap?
???e ?????f???a e?t?? ap? t?? te?e?ta??. - ??s?ast??? ? s?µpe??f??? ?s?? af??? ta deadlocks
e??a? ?d?a µe a?t? t?? direct networks. - ?? ep?t?ept? epa?a?????f???a
- ?fa?µ??eta? µ?a se??? ???s?? t?? p????.
- ???s?µ?? p???? ?a????a a??µesa sta st?d?a ? ta
a?t?st???a buffers. - ?a pa??ta d??µ???????ta? st? switch t?? 1??
stad???, µet? st? switch t?? 2?? ?a? s??e???eta?
? d?ad??as?a se ??a ta st?d?a µ???? ?a f??s???
st?? p?????sµ?. - ?e? ?p???e? e???t?s? a??µesa sta ?a????a t??
?d??? stad???. - ?p?????? e?a?t?se?? ap? ta ?a????a t?? e???
stad??? sta ?a????a t?? ep?µe??? stad???. - ?e? ?p?????? ??????.
40- ?sa e??a? ta st?d?a, t?se? e??a? ?a? ?? ???se??.
- ???ata?????µe?a MINs
- ? ?at?stas? e??a? ?d?a.
- ???ate?????µe?? ?a???? 2 ?a????a µ????
?ate????s??. - ??af??et??? ?a????a ???s?µ?p?????ta? se ???e
?ate????s? (forward backward).
413.5 Deadlock Prevention in Circuit Switching and
PCS
42- ?e??????
- ??sµe?s? t?? p???? p??? ???s?µ?p???????.
- ? ??µß?? p??? st???e? ??a probe ??a ?a st??e? ???
t? µ???p?t?. - ?f?? st??e? t? µ???p?t? ta data flits p???????ta?
st? d??t??. - ?? t? probe de? µp??e? ?a p??????e?, t?te
?p?s??d??µe? ap?desµe???ta? t??? a?t?st??????
p?????. - ?? t? probe ad??ate? ?a st?se? µ???p?t?
(e?att?µat??? ?a????a ? ??µß??), t?te ep?st??fe?
st?? ??µß? p??? ap?desµe???ta? ????? t??? p?????. - ?? ? ?p?s??d??µ?s? t?? probe de? ep?t??peta?,
t?te a?t? pa?aµ??e? µp???a??sµ???, d?at????ta?
????? t??? p????? p?? ??e? desµe?se? µ???? e?e???
t? st??µ?.(wormhole switching)
433.6 Deadlock Recovery
44- ?? deadlock recovery te?????? apa?t???
µ??a??sµ??? a????e?s?? ?a? ep???s?? ?atast?se??
deadlocks. - ?ta? a????e?eta? deadlock, t?te ??a ? pe??ss?te?a
pa??ta ape?e??e?????? t??? p????? p?? ??at??e
ep?t??p??ta? ???a pa??ta ?a t??? desµe????. - ?? te?????? a?t?? e??a? ???s?µe? ?ta? ta
deadlocks e??a? sp???a.
453.6.1 Deadlock Probability
- Routing freedom t? p????? t?? d?a??s?µ??
ep?????? d?ad??µ?s?? p?? ??e? ??a pa??t? st?
d????ta ??µß?. ?????eta? µe t?? a???s? t??
f?s???? ?a?a????, t?? p??s???? virtual channels
?a? t?? a???s? t?? p??sa?µ?st???t?ta? t??
a??????µ?? d??µo????s??. - ?a deadlocks se ??a d??t?? d?as??des?? µe?????ta?
?ta? t? d??t?? pa???e? routing freedom se
??a??p???t??? ßa?µ? ?a? ? routing function t??
?aµß??e? ?p???. - Channel wait-for graph (CWG) a?apa??st??e? t??
?ata??µ? p???? ?a? t?? a?t?se?? p?? e???eµ??? t?
ded?µ??? ??????? st??µ?.
46Continue
- CWG
- ??µß?? ta virtual channels p?? ????? desµe?te? ?
??t??e? ap? ??p??a pa??ta. - Solid arcs de?????? st? ep?µe?? virtual channel
p?? ??e? desµe?te? ap? t? a?t?st???? pa??t?. - Dashed arcs de?????? sta e?a??a?t??? virtual
channels p?? µp??e? ??a µp???a??sµ??? pa??t? ?a
ap??t?se? p???e?µ???? ?a p??????e?. - Knot ??a s????? ap? ??µß??? t?? ???f??, ?p?? ap?
???e ??µß? t?? knot µp????µe ?a f??s??µe se
?p???d?p?te ???? ??µß? t?? knot. - Deadlock set s????? ap? pa??ta p?? ?????
desµe?se? ta virtual channels t?? knot. - Resource set s????? ap? virtual channels p??
????? desµe?te? ap? µ??? t?? deadlock set. - Knot cycle density a?apa??st??e? t? p????? t??
?????? se ??a knot.
47Continue
- ??a ta pa??ta a?aµ????? p????? p?? e??a?
desµe?µ???? ap? ???a pa??ta deadlock. - Deadlock set m0 m7.
- Resource set vc0 vc15.
- Knot cycle density 24
48Continue
- To m4 ??e? ???? p?????sµ?.
- ??a µp??e? ?a p?e? st?? p?????sµ? t?? ?a? µ?s?
t?? vc16 ape?e??e?????ta? t? vc7 ??a ta ?p????pa
pa??ta. - ?e? ?p???e? knot d??t? ap? t?? ??µß? vc16 de?
µp????µe ?a p?µe se ???? ??µß?.
49Continue
- ? a???s? t?? routing freedom de? e?a?e?fe?
e?te??? t? d?µ??????a ???????? nondeadlocks. - ??????? nondeadlocks ?d????? se ?atast?se?? ?p??
ta pa??ta µp???????ta? ??????? ??a ??p??a
????.pe???d? a??????ta? t?? ?a??st???s?. - G?a t? µe??s? t?? p??a??t?ta? eµf???s?? deadlock
p??te??eta? ?a pe?????ste? t? packet injection - injection ports1
- ??s?d?? pa??t?? µ??? ?ta? t? p????? t?? e?e??e???
virtual channels e??a? µe?a??te?? ap? ??p???
?at?f??.
503.6.2 Detection of Potential Deadlocks.
- ????e?? µ??a??sµ?? a????e?s?? de? e??a? ef??t??
d??t? apa?t??? a?ta??a?? p????f????? a??µesa
st??? ??µß???. - ?d??at?? µe t?? ?pa??? deadlocked pa??t??.
- E???st???? µ??a??sµ?? ????? ?????? ??a t??
a????e?s? deadlocks efa?µ????ta? st? - Source node ?p?? ??a pa??t? ?e??e?ta? deadlocked
?ta? ? ?????? p?? µes???ß?se ap? t? st??µ? p??
e?s???? a?t? ? t? te?e?ta?? flit e??a?
µe?a??te??? ap? ??a ?at?f??. - Se ???e injection port p??pe? ?a ?p???e? ??a?
µet??t?? ?a? s?????t??. - Intermediate node ?p?? ???e virtual channel
apa?te? µet??t? ?a? s?????t? ??a ?a ?p??????e? t?
????? p?? µp???????? ta header. -
51Continue
- False deadlock detection ??a pa??t? µp??e? ?a
?e????e? deadlocked e?? pe??µ??e? ??a ?a???? p??
e??a? desµe?µ??? ap? ??a µe???? pa??t?. - ??a t? ?at?f?? ?a p??pe? ?a e??a? a??et? µe????.
- ????s? t?? ?a??st???s??.
- ?ta? p???? pa??ta ??????? ??a deadlocked
configuration, t?te a??e? ?a ape?e??e???e? ?
buffer e??? µ??? pa??t??. - ? e???st???? µ??a??sµ?? a????e?s?? ?e?t????e?
t?p??? ?a? pa??????a µe ap?t??esµa p????? ??µß??
?a a????e?s??? ta?t?????a ad????d? ?a? ?ts? ?a
ape?e??e??s??? t??? a?t?st?????? p?????.
523.6.3 Progressive and Regressive Techniques.
- ?e?????? t?? deadlock recovery
- Progressive ap?d?sµe?s? t?? p???? ap? ta
?a?????? pa??ta ?a? a???es? a?t?? t?? p???? sta
pa??ta p?? ß??s???ta? se deadlock p???e?µ???? ?a
pa?a??f???? ??????a. - Regressive ap?d?sµe?s? p???? ap? ta pa??ta p??
ß??s???ta? se deadlock, s?????? d?a???f??ta? ta
pa??ta. - ?? deadlocks a????e???ta? st?? ??µß? p???, t?te
???s?µ?p??e?ta? ? te????? regressive - ?? pa??t? s??t??eta? µe t? ?a sta??e? ??a s?µa
e?????? p?? ape?e??e???e? t??? buffers ?a?
d?ad?deta? se ??? t? µ???p?t? p?? d?sµe?se t?
header flit. ?et? ap? ??p??a ?a??st???s? t?
pa??t? e?s??eta? ?a?? st? d??t??. - ???e injection port p??pe? ?a ??e? ??a packet
buffer. -
53Continue
- ?? t? deadlock a????e?eta? se e?d??µes? ??µß? p??
pe????e? t? header, t?te p??te????ta? ?a? ?? 2
te??????. - Regressive recovery ?? pa??t? p?? e??a? se
?at?stas? deadlock d?a???feta? d?ad?d??ta? p???
ta p?s? ??a s?µa e??????, t? ?p??? ape?e??e???e?
t??? buffers ap? t?? ??µß? p?? ??e? t? head ??
t?? ??µß? p???. - Progressive recovery ?p?desµe???ta? ?? p???? ap?
ta ?a?????? pa??ta ?a? a?at??e?ta? st? pa??t? p??
ß??s?eta? se ?at?stas? deadlock ??? ?t?? f??se?
st?? p?????sµ?. ?ta? pa?a??f?e? t? pa??t?, t?te
?? p???? ?a?aµ???????ta? sta a????? pa??ta.
54Continue
- Deadlock buffer ???? ?? ?e?t?????? ??µß?? ?????
p??sßas? ?a? ??t??? ??a s?µa e?????? se pe??pt?s?
deadlock. - Deadlock-free recovery lane ???? ?? deadlock
buffers t?? s?st?µat??. - Se pe??pt?s? deadlock, t? pa??t? p????e?ta? st?
deadlock-free recovery lane ?a? d??µ????e?ta? se
??? t? µ???p?t? µ???? t?? p?????sµ?.
???s?µ?p??e?ta? t? physical bandwidth t??
?a??????? pa??t?? ?a? ???e f??? e?e???p??e?ta? t?
s?µa e?????? ??a ?a ap????e?eta? t? flit st?
deadlock buffer t?? ep?µe??? router.
55Continue
- Deadlock configuration.
- 2 virtual channels/physical channel.
- ?p???t??µe ?t? ?p?????? k ??????.
56Continue
- O Ra a????e?e? µ?a e?de??µe?? ?at?stas? deadlock
(t? P1 µp?????eta? ap? ta P2, P3). - O crossbar d?a??pt?? t?te p????e? t? P1 st?
deadlock buffer. - E?e???p??e?ta? t? control signal ??a ?a p??????e?
t? pa??t? µ?s? t?? deadlock-free recovery lane. - To p????? t?? ?????? µe???eta? se k-1.
- ?e? ?p???e? se??? p??te?a??t?ta? st?? ?at?????
t?? deadlock buffer.
57Continue
- To recovering pa??t? (P1) st? deadlock buffer
?s?? ?a ??e?aste? se ??a? router (Rb) t? ?d??
?a???? e??d?? µe a?t? e??? e?e???? pa??t?? (P8). - ?a??t? t? P1 ?ata?aµß??e? t? f?s??? ?a???? e??d??
pa?ate????ta? t?? pa??d?s? t?? P8, t? P8 ?a
f??se? s?????a st?? p?????sµ?. - ?? deadlock buffer s??d?eta? st?? p?e??? e??d??
t?? crossbar switch. - ??? t? bandwidth t?? d??t??? a?at??eta? st?
d??µ?????s? t?? ?a??????? pa??t??, e?t?? t??
pe??pt?se?? a????e?s?? deadlocks, p?? e??a?
sp???e?. - ?e?????? deadlock avoidance routing µe????
virtual channels ???s?µ?p?????ta? ap???e?st???
??a t?? ap?f??? deadlocks. - ?? p????? t?? deadlock buffers se ???e ??µß?
p??pe? ?a e??a? µ???? ??a ?a µ?? a????e? t?
µ??e??? t?? crossbar ?a? ?at ep??tas? ?
?a??st???s? d??d?s??.
58Continue
- Disha sequential ??a pa??t? t? f??? ep?t??peta?
?a ???s?µ?p??e? ta deadlock buffers. - Disha recovery ()
- a?a??te? p????? sta deadlocked packets a?t? ?a ta
s??t?se? ?a? µet? ap?desµe?e? a?t??? t??? p?????. - ?????ta? deadlock freedom ???? st? routing
subfunction, ? ?p??a e??a? s??dedeµ??? ?a? de?
??e? ???????? e?a?t?se?? a??µesa st??? p?????. - ?p??e? ?a s?ed?aste? ?ts? ?ste ?a a?t?µet?p??e?
p???? deadlocks ta?t?????a. Se ???e ??µß?
?p?????? - Arbiter
- ?e??ss?te?a t?? e??? deadlock buffers.
- ?a?t?????? deadlock recovery µp??e? ?a ep?te???e?
se ?p??ad?p?te t?p?????a µe Hamiltonian paths ?a?
µe 2 deadlock buffers/node. ?? ??µß?? ?????
et???te? s?µf??a µe t? ??s? t??? st? Hamiltonian
path. - ?? 1? s????? ap? deadlock buffers ???s?µ?p??e?ta?
??a pa??ta t?? ?p???? ? p?????sµ?? ??e? label gt
ap? t?? t?????t?? ??µß??. ??? t? 2? ??a t?
a?t??et?.
593.7 Livelock Avoidance
60- ?e????????ta? t?? esfa?µ??? d??µ?????s?
- ?p?f??? livelock
- ??s? efa?µ??? Minimal routing algorithms.
- ?a?a???? p?? desµe?e? t? pa??t? d??µet??
d??t???. - ?????t?? e??? µ???st?? a???µ?? ap? sf??µata p??
de? ap?s??d???? t? d??t??, ??e? ap?de???e? ?t? µe
pe?????sµ??? esfa?µ??? d??µ?????s? ??a ??
p?????sµ?? e??a? p??sß?s?µ??. - ?e????????ta? t?? esfa?µ??? d??µ?????s? ?p???e?
??a ??? ???? ??a t?? a???µ? t?? ?a?a???? p??
desµe???ta? ap? ??a pa??t?. -
61- ?at?????? a??????µ? d??µ?????s??
- ?e?????sµ?? misrouting
- ped?? st? pa??t? p?? ??at?e? t?
misrouting - H te????? limiting misrouting p???a?e? deadlock
?ta? t? µ??ad??? d?a??s?µ? ?a???? st? t?????ta
??µß? de? µp??e? ?a ???s?µ?p????e? ??at? ??e?
?epe?aste? t? ???? t?? misrouting. - Deflection routing e??a? livelock-free.
- ?p???t??ta? ?t? p??t?µ???ta? ta ?a????a t??
ß??t?st?? µ???pat??? a??? ? ??????a t? pa??t? ?a
f??se? st?? p?????sµ?.