File Allocation Table

The main disadvantage of linked list allocation is that the Random access to a particular block is not provided. In order to access a block, we need to access all its previous blocks.

File Allocation Table overcomes this drawback of linked list allocation. In this scheme, a file allocation table is maintained, which gathers all the disk block links. The table has one entry for each disk block and is indexed by block number.

File allocation table needs to be cached in order to reduce the number of head seeks. Now the head doesn't need to traverse all the disk blocks in order to access one successive block.

It simply accesses the file allocation table, read the desired block entry from there and access that block. This is the way by which the random access is accomplished by using FAT. It is used by MS-DOS and pre-NT Windows versions.


os file allocation table

Advantages

  1. Uses the whole disk block for data.
  2. A bad disk block doesn't cause all successive blocks lost.
  3. Random access is provided although its not too fast.
  4. Only FAT needs to be traversed in each file operation.

Disadvantages

  1. Each Disk block needs a FAT entry.
  2. FAT size may be very big depending upon the number of FAT entries.
  3. Number of FAT entries can be reduced by increasing the block size but it will also increase Internal Fragmentation.





Latest Courses