Question 3. Suppose a file system can have three disk allocation strategies, con
ID: 3775956 • Letter: Q
Question
Question 3. Suppose a file system can have three disk allocation strategies, contiguous, linked, and indexed. We have just read the information for a file from its parent directory. For contiguous and linked allocation, this gives the address of the first block, and for indexed allocation this gives the address of the index block. Now we want to read the 10th data block into the memory. How many disk blocks (N) do we have to read for each of the allocation strategies? For partial credit, explicitly list which block(s) you have to read.
Explanation / Answer
Data blocks have to be read into main memory and written back out to their new locations. Furthermore, relocation registers apply only to sequential files, and many disk files are not sequential. For this same reason, many new files will not require contiguous disk space; even sequential files can be allocated noncontiguous blocks if links between logically sequential blocks are maintained by the disk system.
Contiguous allocation: R = 1 block
Linked allocation: R = 10 blocks
Indexed allocation: R = 2 blocks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.