作者b76516 (阿聰)
看板Grad-ProbAsk
標題[理工] [作業系統] 檔案管理
時間Sun Nov 15 10:42:59 2009
請問一下洪逸的作業系統分類題庫(2)6-20 例題34(94中山資工)
題目很長 我翻成大意如下
一個檔案有200個block
計算三種分配策略(contiguous,linked,single level index)
在以下情況DISK I/O次數
題目又說
In the contiguous allocation case,assume that there is no room to
grow in the beginning ,but there is room to grow in the end.
請問這段話什麼意思?
情況(1)block 加在開頭
(2)block 加在中間
(3)block 加在結尾
(4)block 從頭刪除
(5)block 從尾刪除
答案
contiguous linked index
(1)401 1 1
(2)201 102 1
(3)1 3 1
(4)398 1 0
(5)0 200 0
請問一下
為什麼情況(2)在linked策略下 需要102次I/O?
為什麼情況(3)在linked策略下 需要3次I/O?
為什麼情況(4)在contiguous策略下 需要398次I/O?
為什麼情況(5)在linked策略下 需要200次I/O?
問題很多 先謝謝大家解答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.230.130.195