[理工] [OS] I/O

看板Grad-ProbAsk作者 (阿蛋)時間14年前 (2012/02/05 18:39), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/1
2.Consider a file currently consisting of a 100 blocks(Assume the block number:0-99).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 in the end. Assume that the block information to be added is stored in memory. (1)The block is added in the middle when use the contiguous allocation. And assume the new middle block number is 49. (2)The block is removed from the beginning when use the contiguous allocation. 請問這兩題要怎麼解呢>"<?? 沒有頭緒... 答案是: (1) 103 (2) 198 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.169.123.12 ※ 編輯: Eggchun 來自: 1.169.123.12 (02/05 18:40)

02/05 18:49, , 1F
1. 51*2+1 //49~99往後移一個每個讀、寫一次之後寫入49
02/05 18:49, 1F

02/05 18:50, , 2F
2. 99*2 //把1~99往前移一格 每個各讀、寫一次
02/05 18:50, 2F

02/05 19:30, , 3F
謝謝!!
02/05 19:30, 3F
文章代碼(AID): #1FBbnaA6 (Grad-ProbAsk)