dependability engineering & Petri nets May 2005 D:\mh\docs\lv\nl\nl_skript\nl07_deadlock_phils.sld.fm 7 - 1 / 20
SYSTEM DEADLOCKS
- DINING
SYSTEM DEADLOCKS - DINING PHILOSOPHERS - - PDF document
dependability engineering & Petri nets May 2005 SYSTEM DEADLOCKS - DINING PHILOSOPHERS D:\mh\docs\lv\nl\nl_skript\nl07_deadlock_phils.sld.fm 7 - 1 / 20 dependability engineering & Petri nets May 2006 DINING PHILOSOPHERS , ONE
dependability engineering & Petri nets May 2005 D:\mh\docs\lv\nl\nl_skript\nl07_deadlock_phils.sld.fm 7 - 1 / 20
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 2 / 20
right_fork left_fork phil right_fork left_fork thinking take_left waiting take_right put_left releasing put_right eating left_fork right_fork
ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES Y Y Y Y N Y Y Y N N N N Y N Y Y Y DTP SMC SMD SMA CPI CTI B SB REV DSt BSt DTr DCF L LV L&S Y Y Y Y Y Y Y Y Y N ? N Y Y Y Y
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 3 / 20
fork4 fork5 phil5 fork2 fork3 fork1 phil5 phil4 phil2 phil3 phil1 phil3 fork2 fork3 fork1 phil2 phil3 phil1 fork4 phil4 fork2 fork3 fork1 phil4 phil2 phil3 phil1
ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES Y Y Y Y N N Y Y N N N N N N N N Y DTP SMC SMD SMA CPI CTI B SB REV DSt BSt DTr DCF L LV L&S N Y Y N Y Y Y Y N Y ? N N N N N
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 4 / 20
th1, th2, f1, f2 w1, th2, f2 th1, w2, f1 w1, w2 e1, th2 r1, th2, f2 r1, w2 th1, e2 th1, r2, f1 w1, r2 tl1 tl2 tl2 tl1 tr1 pr1 tl2 pl1 pl1 pl2 tl1 pr2 tr2 pl2
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 5 / 20
r1, w2 w1, r2 th1, th2, f1, f2 w1, th2, f2 th1, w2, f1 w1, w2 e1, th2 r1, th2, f2 th1, e2 th1, r2, f1 tl1 tl2 tl2 tl1 tr1 pr1 tl2 pl1 pl1 pl2 tl1 pr2 tr2 pl2
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 6 / 20
th1, th2, f1, f2 w1, th2, f2 th1, w2, f1 w1, w2 r1, th2, f2 th1, r2, f1 tl1 tl2 {tr1; pr1} pl1 {pl1 | {tl1 | {tr2; pr2} pl2 {tl1 | tl2} th1, th2, f1, f2 w1, w2 {tl1 | tl2} {tl1; tr1; pr1; pl1} {tl2; tr2; pr2; pl2} tl2} pl2}
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 7 / 20
fork1 (B17) fork2 (B15) fork1 (B11) fork2 (B9) fork2 (B2) fork1 (B1) waiting2 (B13) take_left2 (E9) waiting1 (B14) take_left1 (E10) thinking1 (B18) thinking2 (B16) thinking2 (B4) take_left2 (E2) waiting2 (B6) take_right2 (E4) put_left2 (E8) releasing2 (B12) put_right2 (E6) eating2 (B8) thinking1 (B3) take_left1 (E1) waiting1 (B5) take_right1 (E3) put_left1 (E7) releasing1 (B10) put_right1 (E5) eating1 (B7)
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 8 / 20
# phils P / T Rstub R B / E time 1 2 3 4 5 6 / 4 10 / 8 15 / 12 20 / 16 25 / 20 4 8 20 38 62 4 10 35 118 392 9 / 4 18 / 10 45 / 27 84 / 52 135 / 85 6 7 8 9 10 30 / 24 35 / 28 40 / 32 45 / 36 50 / 40 92 128 170 218 272 1.297 4.286 14.158 46.763 154.450 198 / 126 273 / 175 360 / 232 459 / 297 570 / 370 11 12 13 14 15 55 / 44 60 / 48 65 / 52 70 / 56 75 / 60 332 398 470 548 632 510.116 (5.56 e+6) (60.7 e+6) 693 / 451 828 / 540 975 / 637 1.134 / 742 1.305 / 855 (0 : 5) (0 : 23) (1 : 29) (6 : 28) (27 : 42)
PEP INA
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 9 / 20
Machine: Hypersparc, 32 MB (britten) Times: user time + system time Model checking of the formula AG(_fork1 | _fork2 | ... | forkn)
smv options: -f -r inc
# states without reordering computation of reordering with reordering time BDD nodes time BDD nodes time BDD nodes 2 10 0.1” 3120 0.06” 1405 0.1” 3082 3 35 0.17” 7577 0.11” 3895 0.17” 7474 5 392 0.68” 10258 0.87” 5186 0.28” 10037 7 4247 3.09” 12635 5.36” 8800 2.82” 12674 9 46763 16.95” 60310 27.99” 12836 6.16” 16533 11 510116 88.17” 200803 5.99’ 49459 25.75” 67469 13 5.56e+6 35.99’ 720848 28.10’ 165055 1.69’ 222471 15 60.7e+6 1.76 h 1369156 41.12’ 125471 1.93’ 160109
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 10 / 20
1137517608656205162806720354362767684058541876947800011092858232169918\\ 1599595881220313326411206909717907134074139603793701320514129462357710\\ 2442895227384242418853247239522943007188808619270527555972033293948691\\ 3344982712874090358789533181711372863591957907236895570937383074225421\\ 4932997350559348711208726085116502627818524644762991281238722816835426\\ 4390437022222227167126998740049615901200930144970216630268925118631696\\ 7921927977564308540767556777224220660450294623534355683154921949034887\\ 4138935108726115227535084646719457353408471086965332494805497753382942\\ 1717811011687720510211541690039211766279956422929032376885414750385275\\ 51248819240105363652551190474777411874
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 11 / 20
right_fork left_fork phil
ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES Y Y Y Y N Y Y Y N N N N Y N Y Y Y DTP SMC SMD SMA CPI CTI B SB REV DSt BSt DTr DCF L LV L&S Y Y Y Y Y Y Y Y Y N ? N Y Y Y Y
right_fork left_fork end_put released_left put_left releasing_right releasing_left begin_put eating end_take having_left waiting_right waiting_left begin_take thinking take_left take_right released_right put_right having_right
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 12 / 20
# phils P / T Rstub R B / E time 1 2 3 4 5 12 / 8 22 / 6 33 / 24 44 / 32 8 18 43 100 10 57 446 3429 6 7 8 9 10 11 12 13 14 15
PEP INA
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 13 / 20
ANY DEADLOCK AVOIDANCE POLICY HAS TO ERASE AT LEAST ONE OF THESE CONDITIONS
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 14 / 20
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 15 / 20
right_fork left_fork phil right_fork left_fork thinking take_left waiting take_right put_left releasing put_right eating left_fork right_fork
ORD HOM NBM PUR CSV SCF CON SC Ft0 tF0 Fp0 pF0 MG SM FC EFC ES Y Y Y Y N Y Y Y N N N N Y N Y Y Y DTP SMC SMD SMA CPI CTI B SB REV DSt BSt DTr DCF L LV L&S Y Y Y Y Y Y Y Y Y N ? N Y Y Y Y
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 16 / 20
p1 p2 p3
f1f2 f3
f1f2 f3 f1f2 f3 f1f2 f3
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 17 / 20
p1 p2 p3 f1f2 f3
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 18 / 20
2p 1m 1p+3b+2m 1ps 1fs 1md fruits prep_p_salat prep_fruit_salat prep_mango_dip healthy_dishes (2) (3) (2) mango_dip fruit-salat p_salat prep_mango_dip prep_fruit_salat prep_p_salat mango bananas papaya 2p 4b 2m prep_p_salat prep_fruit_salat prep_mango_dip edibles edibles preps
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 19 / 20
Petrinetz
Petri net
Petrinetz
colored Petri net
dependability engineering & Petri nets May 2006 monika.heiner@informatik.tu-cottbus.de 20 / 20