Google Search Box

自訂搜尋

Sunday, May 16, 2010

[課業] 作業系統 /deadlock

作者: jerki (Dennis) 看板: Examination
標題: [課業] 作業系統 \deadlock
時間: Sun May 16 20:45:24 2010


1.考試科目:計算機概論


2.章節名稱or篇名(單元關鍵字):Ch.7 Deadlock P.253


3.目前參考用書or考古題出處:恐龍書第七版


4.想問的內容:banker's algorithm

allocation max available
A B C A B C A B C
P0 0 1 0 7 5 3 3 3 2
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3

這書上了例子,若要達到行程安全的狀態,其序列為P1->P3->P4->P2->P0

5.想法:

計算過後各行程需求為
P0 743
P1 122
P2 600
P3 011
P4 431
我覺得P1->P4->P3->P2->P0,這樣算起來也算是安全的耶
不知有沒有問題..
謝謝







1 comment:

  1. → ohiammatt:此題safe sequence不只一組,你確定沒錯就可以 05/16 21:06

    ReplyDelete