|
File Allocation Table (FAT) is a file system developed by
Microsoft for MS-DOS and is the primary file system for consumer versions of
Microsoft Windows up to and including Windows Me. FAT as it applies to
flexible/floppy and optical disc cartridges (FAT12 and FAT16 without long
filename support) has been standardized as ECMA-107 and ISO/IEC 9293. The
file system is partially patented.
The FAT file system is relatively uncomplicated, and is supported by
virtually all existing operating systems for personal computers. This
ubiquity makes it an ideal format for floppy disks and solid-state memory
cards, and a convenient way of sharing data between disparate operating
systems installed on the same computer.
FAT12
This initial version of FAT is now referred to as FAT12. Designed as a file
system for floppy diskettes, it had the following limitations: Cluster
addresses were only 12 bits long, which not only limited the cluster count
to 4078, but made FAT manipulation a bit tricky with the PC's 8-bit or
16-bit registers. (Under Linux, FAT12 is limited to 4084 clusters.) The disk
size was stored as a 16-bit count of sectors, which limited the size to 32
MiB. FAT12 was used by several manufacturers with different physical formats
but a typical floppy diskette at the time was 5.25-inch, single-sided, 40
tracks, with 8 sectors per track, resulting in a capacity of only 160 KiB
for both the system areas and files. The FAT12 limitations exceeded this
capacity by one or more orders of magnitude. The limits were successively
lifted in the following years which increased storage capacity dramatically
but eventually rendered FAT12 obsolete.
FAT16
In November 1987, Compaq DOS 3.31 introduced what is today called the FAT16
format, with the expansion of the 16-bit disk sector index to 32 bits. The
result was initially called the DOS 3.31 Large File System. Although the
on-disk changes were apparently minor, the entire DOS disk code had to be
converted to use 32-bit sector numbers, a task complicated by the fact that
it was written in 16-bit assembly language.
The limit on partition size was now dictated by the 8-bit signed count of
sectors-per-cluster, which had a maximum power-of-two value of 64. With the
usual hard disk sector size of 512 bytes, this gives 32 KiB clusters,
thereby fixing the "definitive" limit for the FAT16 partition size at 2
gibibytes. On magneto-optical media, which can have 1 or 2 KiB sectors, the
limit is proportionally greater.
Long File Names (VFAT, LFNs)
One of the "user experience" goals for the designers of Windows 95 was the
ability to use long filenames (LFNs—up to 255 UTF-16 code points long), in
addition to classic 8.3 filenames. LFNs were implemented using a work-around
in the way directory entries are laid out. The version of the file system
with this extension is usually known as VFAT after the Windows 95 VxD device
driver, also known as "Virtual FAT" in Microsoft's old document.
FAT32
In order to overcome the volume size limit of FAT16, while still allowing
DOS real-mode code to handle the format without unnecessarily reducing the
available conventional memory, Microsoft decided to implement a newer
generation of FAT, known as FAT32, with cluster values held in a 32-bit
field, of which 28 bits are used to hold the cluster number, for a maximum
of approximately 250 million (228) clusters. This would allow for drive
sizes of up to 8 tebibytes with 32KiB clusters, but the boot sector uses a
32-bit field for the sector count, limiting volume size to 2TiB on a hard
disk with 512 byte sectors.
On Windows 95/98, due to the version of Microsoft's ScanDisk utility
included with these operating systems being a 16-bit application, the FAT
structure is not allowed to grow beyond around 4 million (< 222) clusters,
placing the volume limit at 127.53 gibibytes. A limitation in original
versions of Windows 98/98SE's Fdisk causes it to incorrectly report disk
sizes over 64GiB. A corrected version is available from Microsoft. These
limitations do not apply to Windows 2000/XP except during Setup, in which
there is a 32GiB limit. Windows Me supports the FAT32 file system without
any limits.
|