→ qazws3483: 成deadlock 呢 09/13 15:13
推 wilson50101: wait(mutex) 09/13 16:08
→ wilson50101: c.s 09/13 16:08
→ wilson50101: wait(mutex) 09/13 16:08
→ wilson50101: 這樣一來沒有signal救人把mutex+1 09/13 16:08
→ wilson50101: 後面想進來c.s的process全部都會卡住形成deadlock 09/13 16:08
→ wilson50101: code寫兩遍 pi pj來trace比較好懂 09/13 16:08
→ qazws3483: 謝謝wilson大 下面的懂了 09/14 00:02
推 alen0303: 被卡在wait(s2)前會先執行signal(s1) 09/14 18:44
→ alen0303: 所以signal不會卡在wait(s1) 能通過條件式執行signal(s2 09/14 18:47