What is file allocation table (FAT) ?

 File Allocation Table

File Allocation TableFile Allocation Table

 The File Allocation Table (FAT) was developed by Microsoft in the 1980s in the release of MS-DOS 1.0. It stores block information including its status (allocated or free) and the block number of the next block in the file. FAT file system, also developed by Microsoft, is the tabular implementation of noncontinuous file allocation. The FAT file system has many versions. In the first version, FAT12 uses 12-bits to store block information. 

Consequently, if a disk is managed by FAT12, then the disk can have only 212 i.e., 4096 blocks on it. The drawback of FAT12 is, it can support only small disks having few files. However, when FAT12 is used to man-age larger disks, a huge amount of memory gets wasted. Consider an example disk of 64 MB. With FAT12, the minimum block size must be 8 kB. Thus, files with a size of less than 8 kB lead to significant internal fragmentation.

With an increase in the disk size, Microsoft worked loopholes of FAT12 developed two more versions of FATT block information. Thus, with FAT16 and FAT32 more number Al12 and d K S1ze, Microsoft worked on the to store FAT file system. FAT16 uses 16 bits and FAT32 uses 32-bits more number to store Clocks can be referenced However the increase oI number Dits for each entry in FAT lead to memory wastage in file System caches and an increase in file access times.

FAT is no longer suitable for managing today s nard disks. It can be useful only for small disks like floppy disks



Usage of File Allocation Table (FAT)

File Allocation Table (FAT) is used in popular operating systems like MS-DOS, OS/2, etc. FAT is stored at the beginning of each volume and it has one entry for each disk block. The directory entry consists of the starting block number of the file and the FAT entry of that block contains the address of the next block. This linking continues until the last block which contains End-Of-File (EOF) table is reached. 




   As seen in the above figure, a FAT can be used along with the directory structure. The directory structure consists of the name of the file and the starting above block number of the file. This same starting block number in the File Allocation Table (FAT) is consists of the address of the next block. This block in turn consists of the address of the next block. The same process of linking is continued until the End Of File (EOF) is reached. 

In this example, the starting block number is 199, this has the address of 595, which in turn points to 365 and this 365 holds EOF. Therefore, the file allocation table can be used for addressing the issues involved with space required for allocating to a certain file, the amount of portion occupied by it and to keep a check on the type of data that is being stored in the portion that was allocated earlier.


Post a Comment