FAT

From SEGGER Wiki
Jump to: navigation, search

FAT (File Allocation Table) is a file system format originally introduced by Microsoft for organizing and managing files on storage devices such as floppy disks and hard drives. It is the de facto standard for interchangeable media such as SD-cards and USB sticks.



History

Basic functionality

Limitations

Cluster size

Files occupy complete clusters. Clusters are a number of adjacent sectors. A cluster consists of 2^n sectors, with n being 0..8, so between 1 and 256 sectors. With the typical sector size of 512 bytes, the maximum size of a cluster is 128KB.

File name limitation

Variations of FAT

The FAT standard has evolved over time. Initially, FAT12 was used, meaning that 12 bits were used to identify a cluster, limiting the number of clusters to (2^12), 4095. After that, FAT16 was introduced, effectively allowing 64k clusters. This pretty quickly turned out to be insufficient as well, as hard drives were becoming bigger, leading to the introduction of FAT32, with 32-bit (4G) Clusters. A FAT software implementation is typically capable of dealing with all 3 types of FAT (12/16/32). According to the spec, when formatting a medium, the number of clusters dictates the format to use. So even in today's world, FAT12 and FAT16 exist. With 128KB clusters, FAT16 is sufficient for a 8GB storage device.


Patents

Various patents, all expired. Details to be provided

Definition of the Standard