Indexed File Allocation

Indexed File Allocation Diagram

Indexed File Allocation solves the fragmentation and file growth problems of sequential allocation by using a dedicated index block for each file. This index block contains pointers to all the disk blocks allocated to that file.

The file system maintains an index table where each entry corresponds to a file and points to its index block. When accessing a file, the system first reads the index block to locate all the data blocks. This allows for non-contiguous storage while maintaining efficient direct access.

The main advantage is elimination of external fragmentation and support for dynamic file growth. However, it requires additional space for index blocks and may have performance overhead for very large files that need multi-level indexing.

Advantages

Disadvantages