Consider a file system on a disk with disk block size of 256 bytes. Assume that
ID: 3694378 • Letter: C
Question
Consider a file system on a disk with disk block size of 256 bytes. Assume that the file allocation information ([start, end] or index block) is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed with a single index block already in memory), answer the following question: If we are currently at logical block 12 (the last block accessed was block 12) and want to access logical block 6, how many physical blocks must be read from the disk? Note: Logical block numbers start at 0.
Explanation / Answer
Answer for Question:
Let M be the block number of the first block in the file.
Contiguous: Divide the logical address A by 256 with X and Y the resulting quotient and remainder respectively.
1
Linked List: Divide the logical address A by 255 with X and Y the resulting quotient and remainder respectively.
6
Indexed Allocation: Divide the logical address A by 256 with X and Y the resulting quotient and remainder respectively.
3
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.