PC Disk File Systems
By Stephen Bucaro
The first PC file system, called FAT because it used a "File Allocation Table", was
developed in the early 1980's for floppy disks. The File Allocation Table, a map of
the location of files on the disk, is located near the beginning of the disk. A disk
contains two copies of the FAT, in case one gets damaged.
A disk formatted with the original FAT16 could have only partition. Since FAT16 is
limited to 2GB per partition, it could not utilize the entire storage capacity of disk's
larger than 2GB. To allow the use of higher capacity hard disks, in January 1986, MS-DOS 3.2
was released with a new partition type called an extended partition. With MS-DOS 3.2 a single
disk can have up to four primary partitions (only one of which can be active), or three
primary partitions and one extended partition.
In the extended partition, the user can create logical drives. Originally only one logical
drive was allowed. in August 1987 MS-DOS 3.3 was released, which allowed up to 24 logical
drives in the extended partition. 24 was equal to the maximum number of available letters
that could be used for drive names (A and B being reserved for floppy drives).
The FAT file system divides a disk into sections called "clusters". The size of a
cluster depends on the size of the disk. Since the largest 16 bit number is 65,535
(64K), the disk can be divided at most into 64K sections. For example, a 512MB disk
would have an 8KB cluster size.
512MB / 65,535 = 8KB
When a file is written to the disk, a cluster is the minimum allocation unit. So on
a 512 MB disk, a 1KB file wastes 7KB of disk space. Explorer would report the file
size as 1KB, but the wasted space would be deducted from the free space on the disk.
A file is written to the first unused block of space on the disk. As files are
deleted and rewritten in a different size, unused blocks of space become discontiguous.
Parts of individual files become scattered across the disk. That's why it's important to
defragment your hard disk occasionally.
A 2GB FAT disk would have a cluster size of 64KB. In this case, a 1KB file wastes 63KB
of disk space. No matter how large a file is, unless the file’s size can be evenly
divided by the size of a cluster, some space is wasted in the file’s last cluster.
2GB / 65,535 = 64KB
The waste situation was getting out of hand so the size of a FAT partition was limited
to 2GB. In the middle of Windows 95 operating system production, Microsoft released OSR2.
This revision increased the size of FAT entries to 32 bits. The 32 bit file system
was named FAT32, and the 16 bit file system became referred to as FAT16.
Because the largest 32 bit number is more than 2 trillion, the FAT32 cluster size was
fixed at 4KB. This helped the disk space waste problem, but the FAT system could not
accommodate features like security and damaged file recovery that are required for
an advanced operating system. For this reason, Microsoft developed the NTFS (New
Technology File System).
|