Option A
Contiguous:All blocks of a file are stored contiguously.
Advantages:
- Faster access as all blocks are nearby.
- Suitable for small sequentially accessed file
Disadvantages:
- Poor performance if file grows or shrinks.
- This method suffers from both internal and external fragmentation. This makes it inefficient in terms of memory utilization.
- Increasing file size is difficult because it depends on the availability of contiguous memory at a particular instance.
Linked Allocation:Each block stores pointer to next block
Advantages:
- No fragmentation
- Suitable for large sequentially accessed file
Disadvantages:
- Because the file blocks are distributed randomly on the disk, a large number of seeks are needed to access every block individually. This makes linked allocation slower.
- Random access is not possible, If one link is lost, cannot access subsequent blocks.
- Pointers required in the linked allocation incur some extra overhead.
Indexed Allocation:A single bock stores indexes of all blocks of a file.
Advantage:
- Suitable for large randomly accessed file
- It overcomes the problem of external fragmentation.
Disadvantages:
- The pointer overhead for indexed allocation is greater than linked allocation.
- For very small files, say files that expand only 2-3 blocks, the indexed allocation would keep one entire block (index block) for the pointers which is inefficient in terms of memory utilization. However, in linked allocation we lose the space of only 1 pointer per block.
https://www.tutorialspoint.com/operating_system/os_file_system.htm
https://www.geeksforgeeks.org/file-allocation-methods/