Title: Deadlock, Livelock, and Starvation
1Deadlock, Livelock, and Starvation
- ???sta ?aµp???? ?.?. 127
- ???st?d????d?? ?a??a ?.?. 94
2Deadlock Avoidance in Wormhole Switching
- Wormhole switching
- ?a??? de? ?p???e? pe?????sµ?? ??a t? µ??e??? t??
pa??t??, t? pa??t? µp??e? ?a ?ata?aµß??e?
pe??ss?te?a ap? ??a ?a????a ?ta? e??a?
µp???a??sµ??? - ?p??e? ?a ?p?????? e?a?t?se?? ?a? µeta?? µ?
?e?t?????? ?a?a???? - ????t?s? ?a?a????
- ?s????? ?? e?a?t?se?? p?? ??????ta? sta SAF ?a?
VCT switching - ?st? ??a pa??t? p?? ?ata?aµß??e? ??a s?????
?e?t?????? ?a?a???? ci, ci1, , ck-1, ck, t?t??a
?ste ta ci ?a? ck e??a? escape channels, a??? ta
?p????pa ??? - Indirect dependency a? t? ci e??a? escape
channel ??a t?? p?????sµ? - Indirect cross-dependency a? t? ci de? e??a?
escape channel ??a t?? p?????sµ?, a??? e??a? ??a
??p????? ?????? p?????sµ???
3Deadlock Avoidance in Wormhole Switching
- ?a????a p?? e??????ta? ap? t?? ni ,
,
- ni t????? ??µß?? ?a? nj p?????sµ??
- S????t?s? d?ad??µ?s?? R a? ? t????? ??µß?? e??a?
? p?????sµ??, t?te ap????e?se t? pa??t?, a?????
???s?µ?p???se t?
- ?p?-s????t?s? d?ad??µ?s?? a? ? t????? ??µß??
e??a? ? p?????sµ??, t?te ap????e?se t? pa??t?,
a????? ???s?µ?p???se t?
4Deadlock Avoidance in Wormhole Switching
- ?a??de??µa 1 (s????e?a)
- ? header ß??s?eta? st?? n1 ?a? p??????eta? ??a
t?? n4 - ?p????? ?a a??????????? ta e??? µ???p?t?a
- cH1, cB2, cH3 ? indirect dependency
- cA1, cB2, cH3 ? indirect cross-dependency
- cA1, cA2, cH3 ? indirect cross-dependency (?a?
direct cross-dependency ap? t? cA2 st? cH3)
5Deadlock Avoidance in Wormhole Switching
- ?a??de??µa 2
- Ge?t?????? ??µß?? s??d???ta? µe d??
- ?a????a
- ?? n3 ?a? n0 s??d???ta? µe ??a ?a????
- ?a????a p?? e??????ta? ap? t?? ni cAi, i 0,
1, 2, 3 ?a? cHi, i 0, 1, 2 - S????t?s? d?ad??µ?s?? R a? ? t????? ??µß?? e??a?
? p?????sµ??, t?te ap????e?se t? pa??t?, a?????
???s?µ?p???se t? - ?p?-s????t?s? d?ad??µ?s?? a? ? t????? ??µß??
e??a? ? p?????sµ??, t?te ap????e?se t? pa??t?,
a????? ???s?µ?p???se t?
6Deadlock Avoidance in Wormhole Switching
- ?a??de??µa 2 (s????e?a)
- ? header ß??s?eta? st?? n3 ?a? t? pa??t?
p??????eta? ??a t?? n2 - ????p?t? cA3, cA0, cH1 ? indirect dependency
- ? header ß??s?eta? st?? n0 ?a?
- t? pa??t? p??????eta? ??a t?? n3
- ????p?t? cH0, cA1, cH2 ? indirect dependency
- Extended class dependency graph t?? R1 ??a
wormhole switching - ?a??? de? ?p?????? ??????, ? R e??a?
deadlock-free ??a wormhole switching
7Deadlock Avoidance in Wormhole Switching
- ?a?at???se??
- St? wormhole switching, ??a pa??t? µp??e? ?a
?ata?aµß??e? p???? ?a????a ?ta? ??e? µp?????e? - ?at? s???pe?a, p????? s??a?t?se?? d?ad??µ?s??
µp??e? ?a e??a? deadlock-free ??a t? SAF, a???
??? ??a t? wormhole switching - ?pa??? ?????? se ??a extended channel dependency
graph µ?a? s??dedeµ???? ?p?-s????t?s??
d?ad??µ?s?? de s?µa??e? ?t? µp??e? ?a ?d????e? t?
s?st?µa se ad????d? - ?? de? ?p???e? ?????? se ?a???a ap? ta ??af?µata
???? t?? d??at?? ?p?-s??a?t?se?? d?ad??µ?s??, t?
s?st?µa de? µp??e? ?a ?d????e? se ad????d? - ?e? e??a? apa?a?t?t? ?a d???µ?s??µe ??e? t??
?p?-s??a?t?se?? d?ad??µ?s??. ???e? ?a ep??????µe
µ?a st?? ?p??a? t? ???f?µa ?p???e? ?????? ?a? ?a
p??spa??s??µe ?a de????µe ?t? µp????µe ?a
?d??????µe se ad????d?
8Deadlock Avoidance in Wormhole Switching
- ?a??de??µa 3
- ????µa 2 d?ast?se?? ?p?? ???s?µ?p??e?ta? wormhole
switching - ???e f?s??? ?a???? ci a?t?st???e? se d?? e???????
?a????a ai ?a? bi - ? s????t?s? d?ad??µ?s?? pa???e? ??a ta a ?a????a
p?? a?????? st? e????st? µ???p?t? ?a? ??a b
?a???? s?µf??a µe t? dimension-order routing
9Deadlock Avoidance in Wormhole Switching
?a????a t?? C1
?a????a
??a?t?se?? ?a?a????
?µµese? e?a?t?se?? ?a?a????
- C1 s????? t?? b ?a?a????
- R1
- ta ?a????a t?? C1 pa?????ta? ap? t?? R1 ??a
??p???? p?????sµ? a? ta pa???e? ?a? ? R (XY
a??????µ?? d?ad??µ?s??) - S??dedeµ???
- ?? ???f?µa e??a? ??????, ?p?te ? R e??a?
deadlock-free
10?pe?t?se??
- ???se?? ?a?a????
- St?? pe??ss?te?e? t?p?????e? µp????µe ?a ???s??µe
µ?a d??ta?? µeta?? t?? ?a?a???? - ?s?d??aµa ?a????a e??a? d?? ?a????a p?? de?
e??a? d?ad????? ?a? ????? ??????? p???????? ?a?
ap??????? st? d??ta?? - ? s??s? a?t? d?µ?????e? t?? ???se?? ?s?d??aµ?a?
- ?eta?? ?a?a???? µ?a? ???s?? ?s?d??aµ?a? de?
?p?????? e?a?t?se?? - ????t?s? ???se?? d?? ???se?? e??a? e?a?t?µ??e?
a? ?p?????? d?? ?a????a (??a ap? ???e µ?a) ta
?p??a e??a? e?a?t?µ??a - ?? class dependency graph a?apa??st? t??
e?a?t?se?? t?? ???se?? p?? pe??????? ??a ta
?a????a t?? d??t??? - ?? t? ???f?µa pe????e? µ??? t?? e?a?t?se?? t??
???se?? t?? ?a?a???? p?? pa???e? ? R1, t?te
???µ??eta? extended class dependency graph
11?pe?t?se??
- ???se?? ?a?a????
- Te???µa µ?a s??dedeµ??? s????t?s? d?ad??µ?s?? R
e??a? deadlock-free a? ?p???e? µ?a s??dedeµ???
?p?-s????t?s? d?ad??µ?s?? R1 ?a? µ?a s?s??t?s? R1
???sµ??? st? s?????
, - t?t??a ?ste t? extended class dependency graph
??a t?? R1 ?a µ?? pe????e? ??????? - ? s?????? e??a? µ??? ??a??, a??? e??a? a??et? ??a
?a ap?de????µe deadlock freedom
12?pe?t?se??
- ?pe?te????ta? t? ped?? ???sµ?? t?? s????t?s??
d?ad??µ?s?? - ???s?µ?p????µe ep?p???? p????f???a
- ?.?. d?at????µe st? header t?? a???µ? t??
?a??asµ???? d?ad??µ?se?? p?? ????? ???e? - Overhead
- ?.?. d?at????µe p????f???a ??a t? ?a???? e?s?d??,
?p?te t? ped?? ???sµ?? ???eta? C x N - ?e?a??te?? e?e????a st?? ???sµ? s??a?t?se??
d?ad??µ?s?? - ??p??e? configurations p?? µp????? ?a ?d???s???
se ad????d? e??a? a??f??te? - ?e?t????? ?????
- ?at? t? d?ad??µ?s? e??? pa??t??, ? s????t?s?
d?ad??µ?s?? de? pa???e? ??a s????? ?a?a????, a???
??a s????? ????? (central queues) - ?????? p???? e??a? ?? ?e?t????? ?????
- ????t?s? µeta?? d?? ????? ?p???e? ?ta? ??a pa??t?
ß??s?eta? ????? ? µe???? se µ?a ap? a?t?? ?a?
??t? t?? ???? - ??t?st???a, ????eta? ? queue dependency graph
- Ge???e?s?
- ??a ?a???? ? µ?a ?e?t???? ???? e??a? ? p????
- ??t?st???a, ????eta? t? extended resource
dependency graph
13??a??a?t???? p??se???se??
- Te???t???? p??se???se??
- Deflection Routing
- Injection Limitation
14Te???t???? p??se???se??
- Waiting channel
- ??a pa??t? ??e? desµe?se? ??p??a ?a????a, e??
pe??µ??e? ??a ??p??a ???a - ????e?ta? ??a ?a????a p?? a?????? se ??a
?p?s????? t?? ?a?a???? p?? pa?????ta? ap? t?
s????t?s? d?ad??µ?s?? ??a a?t? t? pa??t? - ?? t? pa??t? ??e? µp?????e?, ? a???µ?? t??
ep?????? d?ad??µ?s?? µe???eta? - ?s?d??aµe? µe t? d??aµ??? a??a?? t?? s????t?s??
d?ad??µ?s?? ß?se? t?? ?at?stas?? t?? pa??t?? - ?ts? µp????µe ?a ap?f????µe ??p??e? ep?????? p??
?a µp????sa? ?a ?d???s??? se ad????d? - ?????eta? ? e?e????a ?at? t? d?ad??µ?s?
15Te???t???? p??se???se??
- Wait-for graph
- ?a? de???e? p????? p????? pe??µ????? ta
µp???a??sµ??a pa??ta - ?? ta µp???a??sµ??a pa??ta d?µ???????? ????? st?
???f?µa, t?te ?p???e????ta? ?a ???s?µ?p???s???
?tete?µ???st??? d?ad??µ?s? - Message flow model
- ??a ta ?a????a p??pe? ?a e??a? deadlock-immune,
d??ad? ?a e?????ta? t?? pa??d?s? t?? pa??t?? p??
ta ??e? desµe?se? - ??????, a?a????ta? ta ?a????a p?? e?????ta? t??
pa??d?s? t?? pa??t?? - Se ???e ß?µa a?a????ta? ta ?a????a p?? e??a?
?e?t????? a?t?? p?? a?a?????a? st? p??????µe??
ß?µa
16Te???t???? p??se???se??
- Channel waiting graph
- ?e???e? t?? s?s?et?se?? µeta?? t?? ?a?a????
- ???s?µ?p??e?ta? ??? µ??? ? s????t?s? d?ad??µ?s??,
a??? ?a? ? s????t?s? ep??????, µe ap?t??esµa ?a
?aµß??eta? ?p??? ?a? ? ?at?stas? t?? ?a?a???? t??
d??t??? - Te???µa ? a??????µ?? d?ad??µ?s?? e??a?
deadlock-free a? ?a? µ??? a? ?p???e? ??a
wait-connected restricted channel waiting graph
p?? de? ??e? a???????? ??????? - Wait-connected e??a? connected ???s?µ?p????ta?
µ??? waiting channels - True cycle ?????? p?? µp??e? ?a d?µ???????e?
?e?????ta? ap? ??a ?de?? d??t??
17Deflection (Hot Potato) Routing
- ?d?a ? a???µ?? t?? e?se???µe??? ?a?a???? e??a?
?s?? µe t?? a???µ? t?? e?e???µe??? ?a?a???? - ?p?µ????, ??a e?se???µe?? pa??t? ß??s?e? p??t?te
??a e?e??e?? e?e???µe?? ?a???? - ?? ?p?????? pe??ss?te?a ap? ??a e?e??e?a ?a????a,
ep????eta? e?e??? p?? a???e? st? e????st?
µ???p?t? - ?? ??a ta e?e???µe?a ?a????a e??a? desµe?µ??a,
???s?µ?p??e?ta? t? memory port, p?? e??a?
e?e??e?? - ?p?µe?a pa??ta ap????e???ta? se buffer µ???? ?a
???e? d??at? ? ap?st??? t??? - ?e?????sµ??
- ?ta? ??a ta e?e???µe?a ?a????a e??a?
apas????µ??a, t? pa??t? ap????e?eta? st??
t?????ta ??µß? - ?ta? ??a ta e?e???µe?a ?a????a p?? a?????? se
e????sta µ???p?t?a e??a? apas????µ??a, t? pa??t?
d??µ????e?ta? ?a??asµ??a - ????s? t?? ?a??st???s?? pa??t??
- ?p??e? ?a ?d???se? se livelock
- ?p??t?ta, e?e????a
18Injection Limitation
- ?fa?µ??eta? µ??? st?? te?????? SAF ?a? VCT
- ?a?t?????
- Se pe??pt?s? ad?e??d??, ?a???a pa??t? de? µp??e?
?a p??????e? - ?e d?µ?????e?ta? ad????d? a? ?p???e? t??????st??
µ?a ?de?a ??s? se ??a buffer t?? da?t????? - ??? t? pet??a????µe ??a? ??µß?? de? ep?t??peta?
?a ap?ste??e? ??a pa??t? a? a?t? ?eµ??e? t??
t?p??? t?? ???? - ???e ??µß?? ???s?µ?p??e? µ??? t?p??? p????f???a
19Injection Limitation
- ?a??de??µa
- ? ??µß?? 1 de? µp??e? ?a ap?ste??e? pa??ta,
epe?d? ? t?p??? t?? ???? e??a? ?eµ?t?. ??e?
?eµ?se? µet? ap? µetaf??? ded?µ???? ap? t?? ??µß?
0 - ? ??µß?? 2 de? µp??e? ?a ap?ste??e? pa??ta epe?d?
?a ?eµ?se? ? t?p??? t?? ???? - ?? ??µß?? 0 ?a? 3 µp????? ?a ap?ste????? pa??ta
20Injection Limitation
- Tori
- ?p?????? ?e?t????? ?????
- ?a ?a????a e??a? d??ate?????µe?a
- ?fa?µ??eta? dimension-order routing
- ???e ???? ?aµß??e? pa??ta ap? t?? t?p??? ??µß?
?a? ap? ?aµ???te?e? d?ast?se?? - ??a? ??µß?? de? ep?t??peta? ?a ap?ste??e? ??a
pa??t? a? a?t? ?eµ??e? t?? a?t?st???? ???? - ??a pa??t? de? µp??e? ?a µetafe??e? st?? ep?µe??
d??stas? a? ?eµ??e? t?? ???? p?? a?t?st???e? se
a?t? t? d??stas? - ? µ??a??sµ?? µp??e? ?a efa?µ?ste? ?a? se p???µata
21Deadlock Avoidance in Switch-Based Networks
- ? d?a??pt?? µp??e? ?a s??d?eta? se ?a???a?, ??a?
? pe??ss?te???? epe?e??ast??, se a?t??es? µe ta
Direct Networks, ?p?? ???e router s??d?eta? µe
??a? epe?e??ast? - ??a??????µe d?? pe??pt?se??
- ? epa?a?????f???a ep?t??peta?
- ?fa?µ????ta? ta ?d?a ?e???t??? ap?te??sµata, ?p??
?a? st?? pe??pt?s? t?? Direct Networks - ? epa?a?????f???a de? ep?t??peta?
- ?a pa??ta p???????ta? ap? a??ste?? p??? ta de???,
µ?s? d?ad?????? stad??? - ?p?????? µ??? e?a?t?se?? a??µesa sta ?a????a d??
d?ad?????? stad??? - ?e? ?p???e? ??????? e???t?s? a??µesa sta ?a????a
µ? d?ad?????? stad??? - ?p?µ????, ap?fe????ta? ta ad????da
22Deadlock Avoidance in Switch-Based Networks
- ???sµ?? ???se??
- ??????ta? t?se? ???se??, ?sa ?a? ta st?d?a, ?a???
de? ?p?????? e?a?t?se?? a??µesa sta ?a????a t??
?d??? stad??? - ?? extended class dependency graph de? pe????e?
???????, ?a??? de? ?p?????? e?a?t?se?? µeta??
µ?a? ???s?? e??? stad??? ?a? t?? ???se?? p??
a?t?st?????? se p??????µe?a st?d?a - ???ate?????µe?a MINs
- ?a d??ate?????µe?a ?a????a ?e?????ta? d?? ap??
?a????a µ???? ?ate????s?? - ??af??et??? ?a????a ???s?µ?p?????ta? ??a t??
d?af??et???? ?ate????se??, ep?µ????, ????eta?
?at? ??p??? t??p? µ?a f?s??? d??ta?? t?? stad???
23Deadlock Prevention in Circuit Switching and PCS
- ?e?????? pa?eµp?d?s?? ad?e??d??
- ??sµe?s? ???? t?? apa?t??µe??? p???? (?a????a,
buffers) p??? ???s?µ?p??????? - ???s?µ?p?????ta? st?? te?????? Circuit Switching
?a? PCS - ? p??? ap?st???e? ??a probe ??a t?? e??a??d??s?
t?? µ???pat??? - ?at?p??, ta ded?µ??a p???????ta? st?? p?????sµ?
- ?e? µp??e? ?a d?µ???????e? ad????d?, ?a??? ????
?? - apa?t??µe??? p???? ????? desµe?te? p??? t??
??a??? t?? µet?d?s?? t?? pa??t?? - ?? t? µ???p?t? de? µp??e? ?a d?µ???????e?,
???eta? ?p?s??d??µ?s? ?a? ape?e??e?????ta? ??
desµe?µ???? p???? - ?? de? ep?t??peta? ? ?p?s??d??µ?s?, t? probe
µp??e? ?a µp?????e?, ?p?te de ???s?µ?p?????ta?
te?????? pa?eµp?d?s?? ad?e??d??, a??? ?? te??????
ap?f???? p?? efa?µ????ta? st? Wormhole Switching