作者hateexam (迷恋就是青春)
看板Grad-ProbAsk
标题Re: [问题] 97高科计概Deadlock
时间Tue Mar 31 23:37:10 2009
※ 引述《peterpan126 (亚兹别)》之铭言:
: 97高科电通计概第九题 第一小题
: Allocation Max Available
: A B C D A B C D A B C D
: P1 1 2 1 0 1 3 2 2 1 X 1 2
: P2 5 1 3 0 7 7 3 0
: P3 2 1 4 2 3 6 6 6
: P4 5 3 0 2 5 5 6 5
: P5 1 4 2 0 5 4 2 3
: Let X be the smallest value in which the system state is safe. what is X?
REQUEST
A B C D
P1 0 1 1 2
P2 2 6 0 0
P3 1 5 2 4
P4 0 2 6 3
P5 4 0 0 3
当X=1时 由P1先执行释放 2 3 2 4 很明显无法满足任何接续程序
当X=2时 由P4先执行释放 6 5 1 4 再来可挑选P1或P5...,可满足安全状态
故X最小为2
--
你知道每年全球有多少人死於饥饿吗?美国的「The Hunger site」
http://www.thehungersite.com/clickToGive/home.faces?siteId=1 网站上只要网友
每天上网按一次,他们就会联合世界企业家,捐给世界各地饥民一碗食物,
光是去年一整年,「The Hunger site」就送出了4,800万碗食物给世界各地需要的
饥民.只要连上网路,动动你的滑鼠,加入首页,每天击点一次就可以帮助一个人,
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.172.106.205