File Allocation Table (FAT)

What is File Allocation Table (FAT)?

File Allocation Table, or FAT refers to the process of keeping track by the Microsoft operating system of the contents on a hard drive. In simple words, it is a table that defines the status of cluster allocation and content relations in a file system.

Technically, the structure of a FAT volume in this file system has a boot sector in the beginning, two sectors to store the primary and duplicate FAT before a root directory sector, followed by a sector for other files and directories.

Understanding File Allocation Table

What is File Allocation Table

The File Allocation Table was originally designed for use on floppy disks, but later on it became the default file system for the Windows 9x operating system and MS-DOS.

Gradually, it was further modified so that it could be used on the hard disks used in computers and other devices.

Over time, with the increase in the capacity of Hard Disk Drives (HDDs) more variants of FAT were further developed.

Typically, files stored on a hard drive are accessed by a process called seeking, which refers to actual physical searching.

This involves moving the read and write heads on the disk, which takes some time.

The FAT file system is especially designed to reduce this time by ensuring that the heads do not need to move much. This, in turn, reduces the wear and tear as well.

For a file in the FAT volume, there is an entry point to store its first segment followed by an allocation chain.

The allocation chain is a set of links that indicates the location of the following segments of the file. It is terminated by an EOF or End of File marker.

The FAT structure basically maps the positions of the clusters on a disk where files and folders are stored. This basically makes up the file and provides the sequence in which the file is stored.

This is very important because the files or data on a hard disk are often not kept in a contiguous setting due to the continuous creation and deletion of files that cause disk fragmentation.

When a file is read from a FAT volume, that particular file from the cluster is reassembled by the operating system.

This is done with reference to the allocation table related to the chain linkage of the file. The operating system then renders the file in memory in its entirety.

FAT Volumes

There are different FAT volumes that are categorized according to the FAT type, the number of clusters and their sizes. It all depends on the sizes of the drives, as explained below:

Read Also:  What is PCIe SSD? Uses, Benefits & Challenges

Sections

Ideally, there are four distinct sections in a FAT file system. Each of these sections forms a part of the structure of the FAT partition. These sections are:

Boot Sector

This section is alternatively known as the reserved sector and it is typically found on the initial part of the disk. This specific section contains the following:

FAT Region

This particular section consists of two copies of FAT. This helps in checking the redundancy and describes how exactly the clusters are assigned.

Since this region contains a duplicate of the primary allocation table, it is also referred to as the Allocation Table Region. This duplicate FAT acts as a backup when the primary allocation table cannot be accessed.

Data Region

In this specific section of FAT, all existing files along with the directory data are stored. It typically takes up the major part of the partition.

Root Directory Region

This final section of the FAT file system refers to the directory table. The information about the files and directories is stored in this specific section. It is usually used with FAT16 and FAT12 and a fixed maximum size is created here.

The root directory in FAT32 is typically stored in the data region. It can be expanded as and when required.

Table Entry

In the FAT file system, each entry made into the table matches with a cluster. These entries are typically made in one of the following four states of the cluster:

Each of these entries in FAT has different uses and implications such as:

Every chain here starts with the identified cluster in the root directory listing for a specific file or directory. This chain can consist of only one single cluster. In that case, it is considered to be the last cluster of the chain.

File Allocation Table Types

Introduced in 1977, there are different types of FAT available such as FAT8, FAT12, FAT16, and FAT32. All these different types are suited for different operating systems.

FAT8

This is the oldest FAT and was used typically on the 8-inch floppy disks with the 8086 processor.

FAT12

This type of FAT typically uses a 12-bit binary system. Though it is a derivation of FAT8, a FAT12-formatted hard drive was able to use approximately 16,736,256-bytes.

However, the earlier FAT12 used cluster addresses of 12-bit values and supported up to 4078 clusters. With UNIX, it allowed up to 4084 clusters.

FAT16

This type of FAT is used with Windows 95 and Windows 3.x and uses a 16-bit binary system. It was introduced by IBM in 1983 with the simultaneous release of their personal computer AT and MS-DOS 3.0 software from Microsoft.

FAT16 is supposed to be more efficient because it uses 16-bit cluster addresses which allows up to 65,517 clusters in each volume. With 32 MB of space, it also supports 512-byte clusters and a bigger file system with four different sectors totaling up to 2,048 bytes.

Read Also:  What is Zip Drive? Function, Types & More

FAT32

This is an enhanced version of FAT introduced by Microsoft in 1997. It uses a 28-bit binary system and was used in Windows 98 and Windows 95 OSR2 for the first time. It has the ability to save disk space by using a 4K cluster.

This particular file system has enhanced size limits. It can also handle the format with its DOS real-mode code support.

The file system has a 32-bit cluster address. Out of this, 28 bits are used to store the cluster. The number can be as high as about 268 million clusters.

There are also a few derivatives of FAT as well, such as:

File Allocation Table Uses

The File Allocation Table is mainly used by the operating system for managing the files stored on the hard drives as well as in other computer systems. It plays a significant role in helping access different files and directories on a FAT volume.

Basically, it is not only used to store data and information in a much more organized way for quicker access but also to boost the life of a hard drive.

Here are some specific use cases of the File Allocation Table file system.

Historically, the FAT file system was on hard disks running on DOS and Windows 9x operating systems. It was also the standard for home users until 2001, when Windows XP was released.

It was also used extensively for floppy disks, especially FAT12, with short 8.3 filename support only. FAT16 and FAT32 were used on larger media.

Since its supports hard drives as well as the subdirectories, this specific file system is used widely for Windows computer systems.

In the later periods, this file system is used in the (Extensible Firmware Interface) EFI system partition while booting the EFI-compliant computer systems.

The Unified Extensible Firmware Interface (UEFI) boot partition also uses hidden FAT file systems.

The file system is also used in drives in a shared environment of operating systems such as Windows, Linux, and DOS.

Apart from these, there are also several other removable drives and media as well as different portable devices where the FAT file system is used. These are:

Even digital cameras use this file system through the Design Rule for Camera (DCF) file system that they usually adopt.

This is because this file system describes a logical file system with 8.3 filenames.

This typically uses either FAT12, FAT16, FAT32 or exFAT mandatorily for its physical layer to ensure compatibility.

However, now the Windows systems use a more efficient New Technology File System (NTFS) mainly, along with the Resilient File System (ReFS) to a lesser degree, in place of the FAT file system. These offer more scalability, availability, and resilience.

Still, the current versions of the Windows operating system support File Allocation Table, just like other operating systems such as Linux, macOS, and Unix do. So, it is still used in:

It is mainly due to its greater compatibility and ease of operation.

Advantages

Read Also:  What is Master File Table (MFT)? (Explained)

Disadvantages

FAT Vs NTFS

Where is the File Allocation Table Located?

The File Allocation Table is typically located in the first sector of the disk. This specific region is called disk sector 0.

Apart from that, it may also be found in other devices such as flash memory drives, digital cameras, and other removable devices.

Conclusion

FAT is a significant file system for Windows and other operating systems.

Offering a diverse range of advantages and disadvantages, this file system allows for better organization of the files and easier access.

However, it is not as popular or as good as the NTFS, and you know why, thanks to this article.