Consider a file system that uses file allocation tables FAT
Consider a file system that uses file allocation tables (FAT). Assume that the whole FAT can be stored in one block. How many disk accesses are required in order to append a new block to a file? Assume that the free-list is implemented as a linked list and that the directory and the freelist pointer are stored in memory. Also assume that the new block is needed as a result of adding more data in the file.
a. It depends on the number of block the file contains
b. 2
c. 3
d. 4
e. 5
the answer is d but could someone tell me why?
Solution
answer is option d that is 4
These many disk accesses are required inorder to append a new block to a file. \"indexed allocation\" and FAT schemes use the idea of linked list, i.e., the blocks are linked one after another. The file allocation scheme used in UNIX has one inode for each file, which contains 15 pointers. Usually they are in the same block and you do not need to let the head move from one block to another, or even if you have to jump to another block(since FAT may be longer than what can be stored on a single block), it is still much faster than \"indexed allocation\".

