[理工] [OS] 恐龍本習題

看板Grad-ProbAsk作者 (saponevol23)時間14年前 (2012/02/12 16:36), 編輯推噓4(402)
留言6則, 4人參與, 最新討論串1/1
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. 有問題的是linked allocation的 c. The block is added at the end. 答案給3次 , 有問題的是linked有存最後一個block的資訊嗎 不然為什麼不是從頭追蹤到尾取得最後一個區塊的指標再修改呢 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.255.191.209

02/12 17:14, , 1F
他的檔案資料中不僅包含開頭也包含結束位置!!
02/12 17:14, 1F

02/12 18:13, , 2F
有存最後一個喔 恐龍的圖上有寫
02/12 18:13, 2F

02/12 23:40, , 3F
可以教一下算法嗎 參考書上只有答案...
02/12 23:40, 3F

02/12 23:44, , 4F
隨便寫到一格空白的、讀LINK最後一格、改寫LINK連過去
02/12 23:44, 4F

02/12 23:45, , 5F
應該是這樣吧 總和三
02/12 23:45, 5F

02/12 23:56, , 6F
這題是把檔案存到disk嗎?end是disk的end? 抱歉題目看步太懂XD
02/12 23:56, 6F
文章代碼(AID): #1FDtebGd (Grad-ProbAsk)