Penguin
Note: You are viewing an old revision of this page. View the current version.

FAT12 was Microsofts File system designed for floppies.

FAT is an acronym for File Allocation Table, which refers to the table which lists where on the disk files are stored.

The reason it is called FAT12 is that each DiskCluster is represented in the File Allocation Table by a 12 bit number. Some values:

|^Value|^Meaning |>000|<The cluster is unused and available |>FF7|<The cluster has a bad sector in it and will not be allocated |>FF8-FFF|<The last claster of a file |>other|<The cluster number of the next cluster in the file.

Usually the FAT is stored as the second cluster on the disk, there are two copies kept, so if one is corrupted the other can be refered to. The first cluster is the boot sector and contains a table of how the disk is layed out.

Note that FAT12 can only address up to 64mb in size, so FAT16 was introduced.

FAT12 also has the 8.3 filename charactoristics.

FAT12 uses a FirstFit method for finding which DiskCluster to allocate first. According to my "MS-DOS Operating System PRogrammer's Reference Manual" (for DOS 2.0!): "This permits the most efficient utilization[sic? of disk space because clasters made available by erasing files can be allocated for new files." The problem of course of using FirstFit in this case is that file fragment a lot. Most other file systems try and spread the data around the disk so that when a file needs to be extended it has plenty of space that can be used.

Defrag is a program that takes all the files on the disk and packs them to the beginning of the disk and defragmenting them. This tends to improve performance, at least for a while. After a few deletions and additions a disk that has been "packed" with defrag will show worse performance for new files. Sigh.