create new tag
, view all tags
See BLT.

FAT-16: An MS-Dos / Windows filesystem, limited (IIRC) to 8.3 filenames, 2 GB partitions, and 65k clusters per partition. See FAT-32 and FAT-12.

256 MB with 65k clusters is 4096 bytes per cluster. 2 GB with 65k clusters is 32,768 bytes per cluster, which means, on average, each file wastes 16,384 bytes. For this reason, I try to limit FAT-16 partitions to 256 MB (or slightly less -- I double check the cluster size after creating a partition to confirm that it is 4096 bytes (or less)). I use some FAT-16 partitions for compatibility with DOS.

FAT stands for "File Allocation Table" which is the primary data structure used to track which disk blocks in the file system have been allocated to each file or directory. The FAT based file system is primitive by comparison to any UNIX, Linux, or Mac OS, file system. Each directory entry points to an initial entry in the FAT, Each entry in the FAT corresponds to block in the data area of the file system. Each entry contains a pointer to the next entry. reserved values (0xFFFF etc) mark the "end of file" (EOF) (To do: cross-reference this) and also mark bad blocks, and unallocated (free) blocks.

FAT-16 has 16 bits in each FAT entry --- thus a total of 65536 blocks (less several for the reserved EOF and bad block values). FAT-12 has 12 bits for each entry. FAT-32 is a bit more complex. The limit on the number of FAT entries comes from the size of each entry (any entry must be able to point to any other entry to form chains of blocks that constitute the file's contents.

The easiest way to visualize how FAT works without some nice diagrams is to think of a parking lot containing convoys of vehicles (files). In the parking lot office you might have a map depicting all of the parking spaces (on a chalkboard or pegboard). You have a tablet contain a list of the convoys, and an entry listing the spot taken up by the 'first' vehicle in the convoy. Looking up at the map you seen a number pointing at the next parking spot number taken up by the next vehicle. You could then follow this chain of parking slot numbers on the map (the FAT) to find each vehicle in the convoy.

On FAT based systems the root directory is of a fixed size; subdirectories are handled as a special type of file. Thus any subdirectory can contain an unlimited number of entries, up to the size of the file system. However, any searches on these directories is sequential in nature; no indexed directory searching is available.

There is no way to support "sparse allocation" (holes) in files. (To do: cross reference).

Very little redundancy is available in FAT systems --- so any damage to the FAT or to any directory entry can lead to extensive damage to the filesystem as a whole. The FAT is duplicated, but MS-DOS never implemented any effective use of the extra copy.


  • RandyKramer - 06 Feb 2002
  • JimDennis - 12 Jan 2004
  • <If you edit this page, add your name here, move this to the next line>
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004-01-12 - JimDennis
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look