Managing filesystem types

The files area

The remainder of the volume after the root directory is known as the files area, or data area. The disk sectors in this area are viewed as a pool of clusters, each containing one or more logical sectors, depending on the disk format. Each cluster has a corresponding entry in the FAT that describes its current usage:

When a file is extended under MS-DOS Versions 1 and 2, the FAT is searched from its beginning until a free cluster (designated by a zero FAT field) is found; that FAT field is then changed to a last-cluster mark, and the previous last cluster of the file's chain is updated to point to the new last cluster. In other words, when a file is extended, the first free cluster on the disk is used, regardless of its position. Under Version 3, however, a different allocation scheme is used, so the first free cluster on the disk is not necessarily the one assigned when a file is created or extended.

Because they are special kinds of files, subdirectories can also grow in this way, by being assigned additional clusters from the files area. This is why subdirectories are capable of containing any number of file entries, whereas the root directory has a fixed maximum size determined at the time the disk is formatted.

Because the first two fields of the FAT are reserved, the first cluster in the files area is assigned the number 2. If the volume is a bootable system disk, the first clusters of the files area are allocated sequentially to the files containing the MS-DOS BIOS and the DOS kernel, thus keeping the complexity of the disk bootstrap program to a minimum.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999