File Allocation Table(FAT)

The File Allocation Table (FAT) is a file system used by operating systems to organize and manage files on storage devices. It maintains a table that maps each file to its physical location on the disk, tracking which clusters (groups of sectors) are allocated to files and which are available for use.

Structure of FAT

FAT consists of a sequence of entries, where each entry represents a cluster on the disk. A cluster is the smallest unit of disk space that can be allocated to a file. Each FAT entry contains information about the cluster's status and pointers to the next cluster in a file's chain.

FAT Structure Boot Sector File Allocation Table Root Directory Data Area Contains system info Maps clusters to files File/folder entries Actual file content 0 4 5 EOF Free File chain: 4?5?EOF

  • Boot Sector Contains file system information and boot code

  • FAT entries Each entry points to the next cluster in a file or indicates if cluster is free/end-of-file

  • Root Directory Contains file and directory entries with metadata

  • Data Area Stores actual file content in clusters

Types of FAT

There are three main versions of FAT, each designed for different storage capacities and requirements

FAT Type Year Max Disk Size Cluster Size Typical Use
FAT12 1980 16 MB 512 bytes Floppy disks, digital cameras
FAT16 1984 2 GB Up to 64 KB Small hard drives, memory cards
FAT32 1996 2 TB Up to 32 KB USB drives, SD cards, external drives

How FAT Manages Files

FAT manages files through a linked-list approach using cluster chains

  • File Creation The OS allocates clusters and updates FAT entries to mark them as used

  • File Access The OS finds the first cluster in the directory entry, then follows the chain using FAT pointers

  • File Deletion FAT entries are marked as free, making clusters available for reuse

  • Space Management FAT tracks free clusters and allocates contiguous clusters when possible

Advantages

  • Universal Compatibility Supported by Windows, macOS, Linux, and embedded systems

  • Simple Implementation Straightforward structure makes it easy to implement on various devices

  • Low Overhead Minimal metadata and system requirements

  • Portable Ideal for removable storage devices like USB drives and memory cards

Disadvantages

  • Fragmentation Files can become scattered across the disk, reducing performance

  • No Security Features Lacks file permissions and access control mechanisms

  • Limited Filename Support Original FAT12 supports only 8.3 filenames; newer versions have some restrictions

  • No Journaling Vulnerable to corruption during unexpected shutdowns

Comparison with Modern File Systems

Feature FAT32 NTFS ext4
Max File Size 4 GB 16 TB 16 TB
Security None ACLs, Encryption Permissions
Journaling No Yes Yes
Compatibility Universal Windows-focused Linux-focused

Conclusion

FAT remains a crucial file system for portable storage devices due to its universal compatibility and simple structure. While modern file systems offer advanced features like security and journaling, FAT's widespread support makes it indispensable for data exchange between different platforms and embedded systems.

Updated on: 2026-03-17T09:01:38+05:30

17K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements