The first file system to be used on a Microsoft operating system was the FAT system, which uses a file allocation table. The file allocation table is actually an index which lists the content of the disk in order to record the location of the files on it. Since the blocks making up a file are not always stored contiguously on the disk (a phenomenon called fragmentation), the allocation table allows the file system structure to be maintained by creating links to the blocks making up the file. The FAT system is a 16-bit system that allows files to be identified by a name consisting of up to 8 characters and a 3 character extension, which is why this system is called FAT16.
To improve on this, the original version of Windows 95 (using the FAT16 system) was delivered with improved FAT management in the form of the VFAT (Virtual FAT) system. VFAT is a 32-bit system that allows file names of up to 255 characters in length. The programmers had to ensure forward compatibility, however, so that 16-bit (DOS) environments could still access these files. The solution was therefore to assign one name for each system. This is why it is possible to use long file names under Windows 95, but still access them under DOS.
The FAT file system is a 16-bit system, which means that cluster addresses can not be bigger than 16 bits. The maximum number of clusters that can be referenced with the FAT system is therefore 216, (65536) clusters. Now, since a cluster consists of a fixed number (4,8,16,32, ...) of sectors of 512 contiguous bytes, the maximum size of FAT partition can be determined by multiplying the number of clusters by the size of a cluster. With 32Kb clusters, the maximum size of a FAT partition is therefore 2GB.
Furthermore, a file can only occupy an integral number of clusters, which means that if a file occupies several clusters, the last cluster will only be partially occupied and the unoccupied space will be unusable. As a result, the smaller the cluster size, the less wasted space. It is estimated that a file wastes, on average, half a cluster, which means that on a 2 GB partition, 16KB will be lost per fileâ€¦
The File Allocation Table is a list of digital values that describes the allocation of the clusters of a partition or, in other words, the state of each cluster of the partition in which it is located. In fact, each cell of the allocation table corresponds to a cluster. Each cell contains a number that indicates if the cluster is used by a file and, if so, the location of the next cluster in the file. In this way, you end up with a FAT chain, a linked list of references pointing to the successive clusters up until the end of the file. Each FAT entry is 16- or 32-bits long (depending on whether it is FAT16 or FAT32). The first two entries store information about the table itself, while the following entries reference the clusters. Certain entries may contain values indicating the state of the specific cluster. For example, the value 0000 indicates that the cluster is not used, FFF7 marks the cluster as bad so that it will not be used, and values between FFF8 and FFFF specify that the cluster contains the end of a file. Each partition actually contains two copies of the table stored contiguously on the disk, so that it can be recovered if the first copy becomes corrupted.
Although VFAT was a clever system, it did not address the limitations of FAT16. As a result, a new file system (and not just better FAT management as was the case with VFAT) appeared with Windows 95 OSR2. This file system, called FAT32 uses 32-bit values for the FAT entries. In fact, only 28 bits are used, as 4 bits are reserved for future use.
With the appearance of the FAT32 file system, the maximum number of clusters per partition went increased from 65535 to 268,435,455 (228-1). FAT32 thus allows much bigger partitions (up to 8 terabytes). Although the maximum theoretical size of a FAT32 partition is 8 TB, Microsoft has voluntarily limited it to 32 GB on Windows 9x systems to promote NTFS (ref: http://support.microsoft.com/default.aspx?scid=kb;en;184006). Since a FAT32 partition can contain many more clusters than a FAT16 partition, it is possible to reduce significantly the size of the clusters and thereby also limit wasted disk space. For example, with a 2GB partition, it is possible to use 4KB clusters with the FAT32 system (instead of 32KB clusters with FAT16), which reduces the wasted space by a factor of 8.
The trade-off for this is that FAT32 is not compatible with Windows versions prior to OEM Service Release 2. A system booting up with an earlier version will simply not see this type of partition.
Also, 16-bit disk management utilities, such as early versions of Norton Utilities, will no longer work correctly. In terms of performance, using a FAT32 system instead of a FAT16 system will result in a slight performance improvement on the order of 5%.
As the number of clusters is limited, the maximum size of a partition depends on the size of each cluster. Let's take a look at the maximum partition size according to the cluster size and file system used:
|Cluster size||FAT16 file system||FAT32 file system
|512 bytes||32 MB||64 MB|
|1 KB||64 MB||128 MB|
|2 KB||128 MB||256 MB|
|4 KB||256 MB||8 GB
|8 KB||512 MB||16 GB
|16 KB||1 GB||32 GB
|32 KB||2 GB||2 GB
When you format a hard disk, you therefore need to decide carefully on the type of file system to use, and select the one that provides an amount of available space that is as close as possible to the desired size!