Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a file currently consisting of 8 3 blocks. Assume that the file control block ( and the index block, in the case of indexed

Consider a file currently consisting of 83 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 contiguous allocation case, assume that there is room to grow in the beginning and in the end. Assume that the block information to be added is stored in memory. For linked allocation, there is a head and tail pointer pointing respectively to the first and last node.
Note that while calculating the total number of I/O operations for each, also indicate how many are from r (read) and w (write). For each part, if there is more than one answer, choose the one that gives you the least number of I/O operations.
The block is removed from the beginning
The block is added after 41st block
The block is removed from the end
Assumptions:
Read one whole block = one I/O operation
Write one whole block = one I/O operation
The directory information for each allocation is already in the RAM. If the directory information is updated, it does not need to be written back to the disk
For linked allocation, a file allocation table (FAT) is not used, i.e., only the address of the starting and ending block is in memory
All preparation of a block (including putting in the data and any link value) is done in main memory and then the block is written to disk with one write operation
The file control block does not have to be written to disk after a change (this is typical where many operations are performed on a file)
At most one index block is required per file and it does not have to be written to disk after a change
For linked, contiguous and indexed allocations, assume that no I/O operations are necessary to add a freed block to the free list
The OS has information about the free blocks. It does not have to go to the disk to find a free block
When a block is removed, nothing needs to be written to that disk block indicating it is removedConsider a file currently consisting of 83 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 contiguous allocation case, assume that there is room to grow in the beginning and in the end. Assume that the block information to be added is stored in memory. For linked allocation, there is a head and tail pointer pointing respectively to the first and last node.
Note that while calculating the total number of I/O operations for each, also indicate how many are from r (read) and w (write). For each part, if there is more than one answer, choose the one that gives you the least number of I/O operations.
The block is removed from the beginning
The block is added after 41st block
The block is removed from the end
Assumptions:
Read one whole block = one I/O operation
Write one whole block = one I/O operation
The directory information for each allocation is already in the RAM. If the directory information is updated, it does not need to be written back to the disk
For linked allocation, a file allocation table (FAT) is not used, i.e., only the address of the starting and ending block is in memory
All preparation of a block (including putting in the data and any link value) is done in main memory and then the block is written to disk with one write operation
The file control block does not have to be written to disk after a change (this is typical where many operations are performed on a file)
At most one index block is required per file and it does not have to be written to disk after a change
For linked, contiguous and indexed allocations, assume that no I/O operations are necessary to add a freed block to the free list
The OS has information about the free blocks. It does not have to go to the disk to find a free block
When a block is removed, nothing needs to be written to that disk block indicating it is removed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions