A common operation on files is to copy them A copy operation
A common operation on files is to copy them. A copy operation requires (asymptotically) fewer disk accesses in which of the following file allocation methods?
a. Contiguous allocation
b. Linked allocation
c. FAT
d. Inode allocation
e. All require roughly the same disk accesses
The answer is e but could someone tell me why
Solution
To keep track of the free space, the file system maintains a free-space list which tracks all the disk blocks which are free. To create a file, the required space is reserved for the file and the corresponding space is removed from the free list linked to each other.
Disks are usually accessed in physical blocks, rather than a byte at a time. Block sizes may range from 512 bytes to 4K or larger.
Each I/O operation reads or writes a whole block.
For linked allocation, a file allocation table (FAT) is not used, i.e., only the address of the starting block is in memory.
The blocks are numbered 1 to 150 and the current positions of these blocks are also numbered 1 to 150.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.

