喵嗚~因為這週是考試週的關係,我的腦中跑的東西除了書,還是書……
心情日記?等我有空去想到心情是啥的時候再來寫@@"
今天我把筆記的內容整理一些到網路上好了,這樣星期五要考OS之前,只要能上網我都能看啦!
明天再來寫《期中考OS解釋名詞的重點》好了
Banker
STEP 1.
If request(i) > Need(i) then
{ 中止 process(i);
stop banker;
}
STEP2.
If request(i) > av(i) then
{ put process(i) into waiting Queue 中;
stop;
}
STEP3.
Need(i) = Need(i) - request(i);
Alloc(i) = Alloc(i) + request(i);
av = av - request(i);
call safetty algorithm
STEP1. Finish[1...n] = False;
STEP2. work = av;
STEP3. Find process(i) if Need(i) <= work(i) and Finish(i) = False
else goto 7;
STEP4. work(i) = work(i) + Alloc(i);
STEP5. Finish(i) = True;
STEP6. goto 3;
STEP7. If Finish[1...n] = True then
return (True);
Else
return (False);
if safety == true then
執行配置工作;
Else
Need(i) = Need(i) + request(i);
Alloc(i) = Alloc(i) - request(i);
av = av + request(i);
設process(i)等待
留言列表