[理工] 作業系統 ch5 process scheduling

作者: mozzan (mozzan)   2014-06-29 18:39:19
這是恐龍第八版的習題 (ch5 process scheduling)
5.16
Consider a preemptive priority scheduling algorithm based on dynamically
changing priority. Larger priority numbers imply higher priority.
When a process is waiting for the CPU (in the ready, but not running), its
priority changes at rate A; when it is running. its priority changes at a rate
B. All processes are given a priority of 0 when they enter the ready queue.
The parameter A and B can be set to give many different scheduling algorithm.
a. What is the algorithm that result form B > A > 0 (A : FCFS)
b. What is the algorithm that result form A < B < 0 (A : LIFO)
另外題庫還有
c. What is the algorithm that result form A > B > 0 (A : LIFO)
d. What is the algorithm that result form B < A < 0 (A : FCFS)
a和b 沒問題
其他都不太了解為甚麼,像 A > B > 0
剛進入Ready queue的為0,原先在Ready queue和Runing的priority應該都較高
為何答案卻是 LIFO
而 B < A < 0
就更不懂了,煩請大家解惑,感謝

Links booklink

Contact Us: admin [ a t ] ucptt.com