Online Book Reader

Home Category

CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [182]

By Root 1271 0
or more file systems on a partition or volume. The versions of Windows in current use support three separate Microsoft file systems: FAT16, FAT32, and NTFS.

The simplest hard drive file system, called FAT or FAT16, provides a good introduction to how file systems work. More complex file systems fix many of the problems inherent in FAT and add extra features as well.

FAT


The base storage area for hard drives is a sector; each sector stores up to 512 bytes of data. If an OS stores a file smaller than 512 bytes in a sector, the rest of the sector goes to waste. We accept this waste because most files are far larger than 512 bytes. So what happens when an OS stores a file larger than 512 bytes? The OS needs a method to fill one sector, find another that’s unused, and fill it, continuing to fill sectors until the file is completely stored. Once the OS stores a file, it must remember which sectors hold the file, so it can be retrieved later.

MS-DOS version 2.1 first supported hard drives using a special data structure to keep track of stored data on the hard drive, and Microsoft called this structure the file allocation table (FAT). Think of the FAT as nothing more than a card catalog that keeps track of which sectors store the various parts of a file. The official jargon term for a FAT is data structure, but it is more like a two-column spreadsheet.

Figure 12-9 16-bit FAT

The left column (see Figure 12-9) gives each sector a number from 0000 to FFFF (in hex, of course). This means there are 65,536 (64 K) sectors.

Notice that each value in the left column contains 16 bits. (Four hex characters make 16 bits, remember?) We call this type of FAT a 16-bit FAT or FAT16. Not just hard drives have FATs. Some USB thumb drives also use FAT16. Floppy disks use FATs, but their FATs are only 12 bits because they store much less data.

The right column of the FAT contains information on the status of sectors. All hard drives, even brand-new drives fresh from the factory, contain faulty sectors that cannot store data because of imperfections in the construction of the drives. The OS must locate these bad sectors, mark them as unusable, and then prevent any files from being written to them. This mapping of bad sectors is one of the functions of high-level formatting. After the format program creates the FAT, it proceeds through the entire partition, writing and attempting to read from each sector sequentially. If it finds a bad sector, it places a special status code (FFF7) in the sector’s FAT location, indicating that the sector is unavailable for use. Formatting also marks the good sectors as 0000.

* * *

NOTE There is such a thing as “low-level formatting,” but that’s generally done at the factory and doesn’t concern techs. This is especially true if you’re working with modern hard drives (post-2001).

Using the FAT to track sectors, however, creates a problem. The 16-bit FAT addresses a maximum of 64 K (216) locations. Therefore, the size of a hard drive partition should be limited to 64 K × 512 bytes per sector, or 32 MB. When Microsoft first unveiled FAT16, this 32-MB limit presented no problem because most hard drives were only 5 to 10 MB. As hard drives grew in size, you could use FDISK to break them up into multiple partitions. You could divide a 40-MB hard drive into two partitions, for example, making each partition smaller than 32 MB. But as hard drives started to become much larger, Microsoft realized that the 32-MB limit for drives was unacceptable. We needed an improvement to the 16-bit FAT, a new and improved FAT16 that would support larger drives while still maintaining backward compatibility with the old style 16-bit FAT. This need led to the development of a dramatic improvement in FAT16, called clustering, that enabled you to format partitions larger than 32 MB (see Figure 12-10). This new FAT16 appeared way back in the DOS-4 days.

Clustering simply refers to combining a set of contiguous sectors and treating them as a single unit in the FAT. These units are called file allocation units or clusters.

Return Main Page Previous Page Next Page

®Online Book Reader