[問題] OS-disk scheduler

看板Grad-ProbAsk作者 (Terry)時間17年前 (2009/04/01 23:57), 編輯推噓5(508)
留言13則, 3人參與, 最新討論串1/1
Consider a collectin of disk request s with arbitrary arrival times. Which one of the following disk scheduling algorithms always completes all requests with the shortest total seek time? a)sstf b)scan c)look d)non of the above 解答寫:D 可是...我覺得是a耶...sstf有錯嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.228.99.244

04/02 00:04, , 1F
D 因為SSTF不一定最佳
04/02 00:04, 1F

04/02 00:08, , 2F
可是他不是說total time最短的嗎?
04/02 00:08, 2F

04/02 00:09, , 3F
是阿 SSTF不一定最短喔 恐龍書上有反例
04/02 00:09, 3F

04/02 00:12, , 4F
那是不是這最短的total time是不唯一的嚕?
04/02 00:12, 4F

04/02 00:13, , 5F
這樣說吧 SSTF是每次去找最近的 但是最後的結果不見得是
04/02 00:13, 5F

04/02 00:14, , 6F
最佳的
04/02 00:14, 6F

04/02 00:19, , 7F
嗯,我知道了
04/02 00:19, 7F

04/02 00:19, , 8F
只是我又想說,那是不是最短的total time對每一種
04/02 00:19, 8F

04/02 00:19, , 9F
演算法來說,並不唯一?應該說沒有一定的答案嚕?
04/02 00:19, 9F

04/02 00:21, , 10F
不是 同一INPUT對同一algorithm算出來的答案當然是唯一
04/02 00:21, 10F

04/02 00:21, , 11F
只要INPUT沒有變動的話
04/02 00:21, 11F

04/02 00:21, , 12F
Disk scheduling 沒有哪一種演算法是保證最快
04/02 00:21, 12F

04/02 00:22, , 13F
嗯,了解,謝謝
04/02 00:22, 13F
文章代碼(AID): #19quxP98 (Grad-ProbAsk)