[理工] [OS] CPU scheduling

看板Grad-ProbAsk作者 (小銘)時間15年前 (2011/03/10 17:42), 編輯推噓4(405)
留言9則, 6人參與, 最新討論串1/4 (看更多)
Consider the following preemptive priority-scheduling algorithn based on dynamically changing priorities. Larger priority numbers imply higher priority. When a process is waiting for the CPU(in the ready queue,but not running),its priority changes at a 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 parameters A and B can be to give many different scheduling Algorithms. (a) What is the algorithm that result from B > A > 0. (b) What is the algorithm that result from A < B < 0. 我知道答案(a)LIFO (b)FCFS 但我不明白為什麼是這樣 照題目給的 B的 優先權值應該會恆大於A 所以兩個都解釋成FCFS也行的通吧 難道是我誤會了什麼嗎? 有請大大解答 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.27.133.68

03/10 18:16, , 1F
這今年中山資工的第一題耶....
03/10 18:16, 1F

03/10 18:47, , 2F
你答案好像寫反了。
03/10 18:47, 2F

03/10 18:50, , 3F
這題好像很夯= = 清大也考
03/10 18:50, 3F

03/10 19:01, , 4F
中山小題好像是反過來
03/10 19:01, 4F

03/10 19:26, , 5F
原文書 是那樣寫 不過我也是都覺得FCFS
03/10 19:26, 5F

03/10 19:26, , 6F
-3<-2 奇怪哩 他們怎麼會覺得 -2的速率扣的快
03/10 19:26, 6F

03/10 19:26, , 7F
所以中山我都寫FCFS...= =
03/10 19:26, 7F

03/10 19:27, , 8F
不過請還是照著原文書走吧..
03/10 19:27, 8F

03/10 23:15, , 9F
這題很夯阿 中山今年考第二次了
03/10 23:15, 9F
文章代碼(AID): #1DU9phK6 (Grad-ProbAsk)
文章代碼(AID): #1DU9phK6 (Grad-ProbAsk)