Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote