The structure that gives the FAT file system its name is the file allocation table.
In order to understand what this important table does, you must first understand how space
on the hard disk is allocated under DOS (and its derivatives that also use FAT).
While data is stored in 512-byte sectors on the hard disk, for performance reasons
individual sectors are not normally allocated to files. The reason is that it would take a
lot of overhead (time and space) to keep track of pieces of files that were this small.
The hard disk is instead broken into larger pieces called clusters, or
alternatively, allocation units. Each cluster contains a number of sectors.
Typically, clusters range in size from 2,048 bytes to 32,768 bytes, which corresponds to 4
to 64 sectors each. Clusters and how they work are described in full
detail in this section.
The file allocation table is where information about clusters is stored. Each cluster
has an entry in the FAT that describes how it used. This is what tells the operating
system which parts of the disk are currently used by files, and which are free for use.
The FAT entries are used by the operating system to chain
together clusters to form files.
The file allocation tables are stored in the area of the disk immediately following the
volume boot sector. Each volume actually contains two identical copies of the FAT;
ostensibly, the second one is meant to be a backup of sorts in case of any damage to the
first copy. Damage to the FAT can of course result in data loss since this is where the
record is kept of which parts of the disk contain which files. The problem with this
built-in backup is that the two copies are kept right next to each other on the disk, so
that in the event that for example, bad sectors develop on the disk where the first copy
of the FAT is stored, chances are pretty good that the second copy will be affected as
well.
Next: Files, Directories, Paths and the Directory Tree