Download presentation
Presentation is loading. Please wait.
1
OS 期中檢討 2005/11/30
2
Problem 1 課本上有答案 (e) 指出一定時間內完成 (f) 除了 many-to-many ,還有 1-to-1
3
Problem 2 標準答案於作業解答 是寫不同及相同處,不是如何情況下會相 似或相異,改作業時已有指出,故考試從 嚴處理。
4
Problem 3 Block – 丟進佇列等待, 不使用CPU Busy waiting - 跑迴圈,使用CPU
5
Problem 4 Fairness. You want to play fair among the various jobs. Debatable whether you want jobs to have equal time in memory; or equal time waiting suspended; or equal time running the CPU; etc. Size. It's always easier and less costly to swap in a small job. In choosing a job to swap out, there's a trade-off: Swapping out a large job takes longer (to write to disk); on the other hand, it clears up more space that you can use for other jobs. In particular, swapping in a large job may require swapping out several small jobs. Blockedness. If the job is blocked in any case waiting for some event that may be slow, why not swap it out? Page faulting: If all the processes are page-faulting a lot, then you have better swap one or more of them out.
6
Problem 5 多CPU時,可避免浪費時間的置換,預 期很快會做到 ,
7
Problem 6 請參考考試解答
8
Problem 7 P3-P1-P2 或 P3-P2-P1 皆可
9
Problem 8 課本有完整答案 程式碼必須能 Work 部分給分僅於語法或表達上的錯誤
10
Problem 9 程式碼必須能 Work 部分給分僅於語法或表達上的錯誤
11
Problem 10
12
Problem 11 略
13
Problem 12 標準答案於作業解答 To show that the progress is satisfied, you should ensure all loops in algorithm will progress when the C.S is empty. To say at most n-1 turns are needed to wait for must point out “Enter C.S by increasing turn”.
14
Problem 13 (b)SJF
15
Problem 13 複雜度 - 端看所使用的排序演算法 !
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.