為什麼這篇I o operations鄉民發文收入到精華區:因為在I o operations這個討論話題中,有許多相關的文章在討論,這篇最有參考價值!作者dendrobium (石斛蘭)看板Grad-ProbAsk標題Re: [理工] [OS] I/...
※ 引述《flyguava (紅芭樂)》之銘言:
: Consider a file currently consisting of 200 blocks. Assume that the file
: control block (and the index block, in the case of indexed allocation) is
: already in memory. Calculate how many disk I/O operations are required for
: contiguous, linked, and indexed (single-level) allocation strategies. Assume
: that each disk I/O operation accesses only one block. In the contiguous
: allocation case, there is no room to grow in the beginning, but there is room
: to grow in the end. Moreover, the block information to be added is already
: stored in memory.
: (a). The block is added at the beginning.
contiguous : 200(讀) + 201(寫) = 401
linked : 1(寫) = 1
indexed : 1(寫) = 1
: (b). The block is added in the middle.
contiguous : 100(讀) + 101(寫) = 201
linked : 100(讀) + 2(寫) = 102
indexed : 1(寫) = 1
: (c). The block is added at the end.
contiguous : 1(寫) = 1
linked : 1(讀) + 2(寫) = 3
indexed : 1(寫) = 1
: (d).The block is removed from the beginning.
contiguous : 199(讀) + 199(寫) = 398
linked : 1(讀) = 1
indexed : 0 = 0
: (e).The block is removed from the middle.
contiguous : 100(讀) + 100(寫) = 200
linked : 101(讀) + 1(寫) = 102
indexed : 0 = 0
參考看看^^a
--
人家可不是為了你才這樣做的哦!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.198.35.85