File Systems

FAT16 is included in Windows 2000 for the following reasons:

  • It provides backward compatibility in the form of an upgrade path for earlier versions of Windows-compatible products.

  • It is compatible with most other operating systems.

FAT16 is not recommended for volumes larger than 511 MB; when relatively small files are placed on a FAT16 volume, FAT16 manages disk space inefficiently. You cannot use FAT16 on volumes larger than 4   gigabytes (GB).

note-icon

Note

On volumes with fewer than 32,680 sectors, the cluster sizes can be up to 8 sectors per cluster. In this circumstance, the format program creates a 12-bit FAT. Volumes less than 16 MB are usually formatted for a 12-bit FAT, but the exact size depends on the disk geometry. The disk geometry also determines when a larger cluster size is needed because the number of clusters on the volume must fit into the number of bits used by the file system managing the volume. Therefore, you might have a 33-MB volume that has only 1 sector per cluster.

FAT12 is the original implementation of FAT and is intended for very small media. The file allocation table for FAT12 is smaller than the file allocation table for FAT16 and FAT32, because it uses less space for each entry, leaving more space for data. All 1.44-MB 3.5-inch floppy disks are formatted with FAT12.

Figure 17.3 illustrates how FAT16 maps clusters on a volume. The file allocation tables (labeled FAT1 and FAT2 in Figure 17.3) identify each cluster in the volume as one of the following:

  • Unused

  • Cluster in use by a file

  • Bad cluster

  • Last cluster in a file Cc938947.fncc01(en-us,TechNet.10).gif
    Figure 17.3 Organization of a FAT16 Volume

The root folder exists at a specified location and has the maximum number of available entries fixed at 512. The maximum number of entries on a floppy disk depends on the size of the disk.

note-icon

Note

Each folder and 8.3 file name in the root folder counts as an entry. For example, since the maximum number of entries is fixed at 512, if you have 100 folders in the root folder, you can only create 412 more files or folders in the root folder. If those folders or files use names longer than the 8.3 format, fewer files and folders can be created.

Folders contain a 32-byte entry for each file and folder they contain. The entry includes the following information:

  • Name in 8.3 format (11 bytes)

  • Attribute (1 byte, described later in this section)

  • Create time (3 bytes)

  • Create date (2 bytes)

  • Last access date (2 bytes)

  • Last modified time (2 bytes)

  • Last modified date (2 bytes)

  • Starting cluster number in the file allocation table (2 bytes)

  • File size (4 bytes)
    note-icon
    Note
    Three bytes in each entry are held in reserve.

In the file allocation table of a FAT16 volume, files are given the first available location on the volume. The starting cluster number is the address of the first cluster used by the file. Each cluster contains a pointer to the next cluster in the file, or an end-of-file indicator at (0xFFFF) which indicates that this cluster is the end of the file. These pointers and end-of-file indicators are shown in Figure 17.4.

Cc938947.fncc02(en-us,TechNet.10).gif

Figure 17.4 Files on a FAT Volume

Figure 17.4 shows three files in a folder. File1.txt uses three clusters. File2.txt is a fragmented file that requires three clusters. File3.txt fits in one cluster. In each case, the file allocation table entry points to the first cluster of the file.

The information in the folder is used by all operating systems that support FAT. Windows 2000 can store additional timestamps in a FAT folder entry. These timestamps show when the file was created or last accessed.

Because all entries in a folder are the same size, the attribute byte for each entry in a folder describes what kind of entry it is. For example, one bit indicates that the entry is for a subfolder and another bit marks the entry as a volume. Typically, the operating system controls the settings of these bits.

The attribute byte includes four bits that can be turned on or off by the user — archive, system, hidden, and read-only.