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 that has a logical block size of 512 bytes and

ID: 3652504 • Letter: C

Question

Consider a file system on a disk that has a logical block size of 512 bytes and assume that the information about each file (i.e., the folder) is already in memory and that each pointer requires 16 bytes under linked and indexed allocation methods, answer the following questions:

(a) How many blocks are required for storing a 98KB file under contiguous, linked, and indexed allocation methods? Note that 1KB is 1024 bytes.

(b) How many blocks must be read from the disk under linked allocation when the user wants to access data on the 9857th byte of that file?

(c) How many blocks must be read from the disk under indexed allocation when the user wants to access data on the 8957th byte of that file?

Explanation / Answer

(a)How many blocks are required for storing a 98KB file under contiguous, linked, and indexed allocation methods? Note that 1KB is 1024 bytes.

(b)How many blocks must be read from the disk under linked allocation when the user wants to access data on the 9857th byte of that file?

9857/(512-16)= 9857/496 = 19.9 rounds up to 20 blocks

(c)How many blocks must be read from the disk under indexed allocation when the user wants to access data on the 8957th byte of that file?

8957/512 = 17.5, rounds up to 18. So the 8957th byte resides in the 18th data block. There are 31 indexes per index block that points to data blocks, so the 18th pointer resides in the 1st index block, so 1st index block, so 1 index block plus 1 data block =2 blocks

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