The 32-bit, protected-mode file system in Windows 98 allows optimal access to hard disks, CD-ROM drives, and network resources. The file system support means faster, better performance for all file I/O operations than was previously available.
You can use long file names and directory names in Windows 98 and in any applications that support long file names. The eight-character limit on file names that was imposed by the file system under MS-DOS no longer holds.
The file system in Windows 98 permits exclusive access to a disk device for file system utilities. For example, ScanDisk, a file system utility, requires exclusive access to the file system to ensure data integrity in a multitasking environment. Otherwise, if a file on the disk were to be saved while the utility was writing information to the disk at the same time, data corruption could occur.
The file system also detects when Windows 98 shuts down improperly. If Windows 98 is shut down without going through the standard shutdown sequence, real mode Scandisk will be executed at the next startup. The purpose of running Scandisk is to correct potential errors in the file allocation table (FAT) before continuing the boot process. In the event that a Disk read/write error is encountered during normal Windows 98 operation, a flag will also be set to run real mode Scandisk with Surface Scan.
Exclusive disk access means you can now run disk management and optimization utilities without quitting Windows. You can even complete tasks, such as disk defragmentation, without stopping work in other applications. The exclusive access support is used by the disk utilities provided with Windows 98 and can be used in Windows-based disk management utilities from any vendors that take advantage of the related application programming interface (API) in their utilities.
File allocation table (FAT) refers to a disk format, which is a way of organizing the storage space on a hard disk. The table organizes information about the files on the hard disk, representing each one as a chain of numbers that identifies where each part of a file is located. The FAT itself is similar to a table of contents in a book—the operating system uses it to look up a file and find which clusters that file is written to on the hard disk.
FAT is probably the most widely recognized disk format, being read by most operating systems. Microsoft originally devised FAT to manage files on floppy disks, and adapted it as a standard for file and disk management in MS-DOS. A 12-bit FAT was first used for managing floppy disks and logical drives smaller than 16 MB. MS-DOS version 3.0 introduced the 16-bit FAT for larger drives.
FAT32 goes beyond the capabilities of FAT16. The most prominent feature is that it supports drives of up to 2 terabytes in size. In addition, FAT32 decreases the cluster size on large drives, thus reducing the amount of unused space. For example, with FAT16, a 2 GB drive has a 32 KB cluster size. The same drive under FAT32 has 4 KB clusters.
To maintain the greatest possible compatibility with existing programs, networks, and device drivers, FAT32 was implemented with as little change as possible to existing architecture, internal data structures APIs, and on-disk format for Windows 98.
However, because 4 bytes are now required to store cluster values, many internal and on-disk data structures and published APIs have been revised or expanded. In some cases, existing APIs have been prevented from working on FAT32 drives to prevent legacy disk utilities that use them from damaging the FAT32 drives. Most programs will be unaffected by these changes. Existing tools and drivers should continue to work on FAT32 drives. However, MS-DOS block device drivers (for example, Aspidisk.sys) and disk tools must be revised to support FAT32 drives.
All of Microsoft’s bundled disk tools (Format, FDISK, Defrag, and MS-DOS-based and Windows-based ScanDisk) have been revised to work with FAT32. In addition, Microsoft is working with leading device driver and disk tool vendors to support them in revising their products to support FAT32.
Note
A FAT32 volume cannot be compressed using Microsoft DriveSpace 3.
FAT16 is still available because of its widespread compatibility with all other non-Microsoft operating systems. The major benefits of FAT32 are that it is more efficient than a 16-bit FAT on larger disks (sometimes by as much as 20–30 percent), and that it can support disk drives larger than 2 GB without having to use multiple partitions.
Note
In real-mode MS-DOS or when running Windows 98 in safe mode, FAT32 is considerably slower than FAT16. If you need to run applications in MS-DOS mode, loading Smartdrv.exe in Autoexec.bat or your MS-DOS PIF file will be beneficial.
Some older applications that were written to FAT16 specifications may be unable to display free or total disk space over 2 GB correctly. Windows 98 provides new MS-DOS and Win32 APIs that applications can use to determine free or total disk space over 2 GB.
Table 10.1 shows a comparison of FAT16 and FAT32.
Table 10.1 FAT16 and FAT32 comparison
FAT16 | FAT32 |
---|---|
Most operating systems (MS-DOS, Windows 98, Windows NT, OS/2, and UNIX) are designed to implement and use it. | Currently, FAT32 can be used only in Windows 98 and Windows 95 OSR2. |
It is efficient, both in speed and storage, on logical drives smaller than 256 MB. | Drives smaller that 512 MB are not supported by FAT32. |
Disk compression, such as Drvspace, is supported. | Disk compression is not supported with FAT32. |
FAT16 is limited in size to 65,525 clusters with each cluster being fixed in a size relative to the logical drive. If both the quantity of clusters and their maximum size (32 KB) is reached, the largest drive is limited to 2 GB. | FAT32 allows for (x) clusters, therefore, the largest drive can be up to 2 terabytes, based on the 32 KB cluster size limitation. |
Storing files in a FAT16 system can be inefficient in larger drives as the size of the cluster increases. The space allocated for storing a file is based on the size of the Cluster Allocation Granularity, not the file size. A 10 KB file stored in a 32 KB cluster wastes 22 KB of disk space. | FAT32 cluster sizes are 4 KB (drives less than 800 MB). |
The largest possible file for a FAT32 drive is 4 GB minus 2 bytes. Win32-based applications can open files this large without special handling. However, non-Win32-based applications must use Int 21h Function 716Ch (FAT32) with the EXTENDED_SIZE (1000h) open flag.
The FAT32 file system includes 4 bytes per cluster within the file allocation table. This differs from the FAT16 file system, which contains 2 bytes per cluster, and the FAT12 file system, which contains 1.5 bytes per cluster within the file allocation table.
Note that the high 4 bits of the 32-bit values in the file allocation table for FAT32 are reserved and are not part of the cluster number. Applications that directly read a FAT32 file allocation table must mask off these bits and preserve them when writing new values.
Table 10.2 provides a comparison of FAT16 and FAT32 cluster sizes according to drive size.
Table 10.2 Cluster sizes of FAT16 and FAT32
Drive size | FAT16 cluster size | FAT32 cluster size |
---|---|---|
256 MB – 511 MB | 8 KB | Not supported |
512 MB – 1023 MB | 16 KB | 4 KB |
1024 MB – 2 GB | 32 KB | 4 KB |
2 GB – 8 GB | Not supported | 4 KB |
8 GB – 16 GB | Not supported | 8 KB |
16 GB – 32 GB | Not supported | 16 KB |
>32 GB | Not supported | 32 KB |