File Allocation Methods

The file allocation methods define how the files are stored in the disk blocks.

The main idea behind these methods is to provide:

There are 3 file allocation methods commonly used in Operating Systems to schedule files in the secondary disk.

All the three methods have their own advantages and disadvantages as discussed below:

Contiguous Allocation

Files are stored in consecutive blocks on the disk. Each file occupies a contiguous set of blocks.

  • Fast sequential access
  • Simple implementation
  • Suffers from external fragmentation

Linked Allocation

Each file block contains a pointer to the next block. Files can be stored in any available blocks.

  • No external fragmentation
  • Flexible allocation
  • Slower random access

Indexed Allocation

Uses an index block containing pointers to all blocks of the file. Provides efficient direct access.

  • Direct access to blocks
  • No external fragmentation
  • Index block overhead
Feature Contiguous Linked Indexed
Random Access Excellent Poor Good
Space Efficiency Poor Good Fair
Implementation Simple Complex Moderate
Try Simulation