The type of the FAT to be used is decided by the FDISK program during the partition of the hard disk drive. But the actual FAT is written by the FORMAT program of DOS.
The FAT does not keep track of each and every sector on the disk surface instead it manages the disk area in a group of sectors called “cluster” or “allocation unit” (See the Cluster Discussed before, in the same chapter).
A cluster is the smallest unit of hard disk drive space that DOS allocates to a file, it consist of one or more sectors depending on the drive size. The cluster size is decided and fixed by the DOS FORMAT program during the high level formatting of the hard disk drive. (See the “size of clusters” discussion, given before)
Actually, the FAT is an index of the clusters of the entire volume. The FAT has one entry for each cluster. The first two entries in a FAT contain information about the FAT. The third and subsequent entries in the FAT are assigned to clusters of disk space, starting with the first cluster available for use by files
Because FAT is such an important item, DOS keeps two copies of the FAT, primary FAT or FAT1 and secondary FAT or FAT2 (there are normally two copies, however many new operating systems create more than two copies of FAT).
Each FAT occupies contiguous sectors on the disk, with the 2nd FAT immediately following the1st FAT does not make the DOS use 2nd FAT to correct the problem, instead when the 1st FAT is updated DOS copies it to the 2nd FAT, corrupting the 2nd FAT as well, in the process.
This updating is done every time DOS finds that the 1st and 2nd FAT does not match. So, in case of any corruption of the 1st FAT, one should immediately do the repair by using some disk editor software and comparing the 1st FAT with the 2nd FAT. This should be done before DOS copies the corrupted FAT to the second FAT.
With the introduction of FAT32, both the FAT entries and the sector numbering are now 32-bit. That means that there are now 4,294,967,296 distinct 32-bit values multiplied by 512 bytes per sector yielding 2 terabytes (2,199,023,255,552 bytes) as the maximum possible disk size under FAT32.
The size of the directory entry for each file in FAT 32 is 4 bytes to contain the value of the starting cluster of the file rather than the 2 bytes needed under FAT16. The larger value accommodates the larger number of possible clusters.
Traditionally, each directory entry is a 32-byte record, and this remains the same. In the middle of the directory record there is 10 bytes (bytes 12 to 21) that Microsoft has reserved for its own future use. Two of those bytes are now used to accommodate the extra bytes needed to specify the starting cluster under FAT32.
As we have already discussed that there have been 12 bit, 16 bit, and 32 bit versions of FAT. While 32 bit FAT allows much more efficient storage which may be up to 30% more efficient and use of larger hard drives.
When the File System of an Operating System is invoked by a program to find the contents of a file, the first cluster value, in the directory entry for that file, is read and used to find the FAT chain. The FAT chain is the list of clusters that contain data belonging to a file.