看板 NTPU-CSIE95 關於我們 聯絡資訊
Consider a file currently consisting of 100 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, if, for one block, the following conditions hold. In the contiguousallocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory. a. The block is added at the beginning. b. The block is added in the middle. c. The block is added at the end. d. The block is removed from the beginning. e. The block is removed from the middle. f. The block is removed from the end. 強者幫忙解一下吧~~恐龍習題,中山清交考過.... 答案直接附上好了 a 201 1 1 b 101 52 1 c 1 3 1 d 198 1 0 e 98 52 0 f 0 100 0 左→右分別為 contiguous linked indexed -- ┌這?─────────────────────────────┐ │ │ 一"一 \ / >\\\< ╯ ╰ ∩ ∩ ▁ ▁_< ㄧ ㄧ+ │ ε Δ ╰╯ 北七 亂喔 害羞 莎笅 爽啦 哭爸 XD 科科 └──────────────────────────────────────┘ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.14.2 ※ 編輯: polomoss 來自: 122.116.14.2 (01/22 00:19) ※ 編輯: polomoss 來自: 122.116.14.2 (01/22 01:10)
glennchen:為什麼linked的c是3而已? 01/24 23:02
polomoss:不知道~~你可以解釋一下其他的嗎? 說不定一個會其他都會 01/24 23:31
hahaha86888:這題弘毅那本有 01/27 02:23
hahaha86888:contiguous的a就是 先全部swap out 然後added at 01/27 02:43
hahaha86888:the beginnig 然後再全部swap回來 所以 100+1+100 01/27 02:44
hahaha86888:bc同理 然後d就是後面99個swapout 然後刪 再swap回99 01/27 02:45
hahaha86888:link有點忘了 改天研究 ㄎㄎ 01/27 02:47
hahaha86888:以上不負責任發言 不確定對 01/27 02:47