[理工] [OS]-死結

看板Grad-ProbAsk作者 (XD)時間16年前 (2009/10/08 10:23), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/2 (看更多)
Consider a system consisting of m resources of the same type that are shared by n processes,each of which needs at most k resources. Please show the condition such tbat the system is guaranteed to be deadlock-free. Briefly explain why your condition can guarantee a deadlock-free system. 這題要怎麼寫比較恰當呢? 解答寫 1<= K <=m n*k < m + n 然後附上此定理的證明 可是這題才6分 所以我想說 就依鴿籠來講 m resources ,n processes 則 當 m = n*(k-1) + 1 時 必有一個process可恰持有k resources 則此系統必不會進入死結 繼續執行下去 不知道此方法可行嗎 謝謝指導! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.127.208.96

10/08 10:36, , 1F
m = n*(k-1)+1
10/08 10:36, 1F

10/08 11:13, , 2F
打錯了@@
10/08 11:13, 2F
※ 編輯: yesa315 來自: 140.127.208.96 (10/08 11:13)
文章代碼(AID): #1ApKq8sD (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #1ApKq8sD (Grad-ProbAsk)