Windows 95 includes several tools for managing disks, protecting data, and ensuring good disk performance. To keep your computer in good working order, use these programs on a regular basis. To determine which tasks are necessary to manage your computer, consider the following.
To ensure that | Do this |
Files aren't lost if the hard disk fails | Run Microsoft Backup or a network backup agent. For information, see Chapter 16, "Remote Administration." |
The computer can access files quickly and efficiently | Defragment the hard disk. For information, see "Defragmenting Disks" later in this chapter. |
Lost clusters don't take up space on a disk, or the hard disk is not damaged | Run ScanDisk. For information, see "Using ScanDisk" later in this chapter. |
Space is available on the hard disk | Use various tips for freeing disk space, and use disk compression. For information, see "Managing the Recycle Bin to Free Disk Space" later in this chapter and "Using Disk Compression with Windows 95" later in this chapter. |
The routine for managing a computer's hard disks might include automatically running ScanDisk when starting the computer to check the integrity of the hard disk, backing up files once a week, and occasionally using the Disk Defragmenter to defragment the hard disk. No matter what your computer management plan, carry it out at regular intervals.
You can also use a scheduling utility such as System Agent in Microsoft Plus! for automatic disk maintenance. For information, see "Microsoft Plus! Utilities for Disk Management" later in this chapter.
Note
For best results, do not run other programs while running either Disk Defragmenter or ScanDisk. Although you can use the computer for other tasks while running either of these utilities, each time you write to the disk, the utility automatically reinitiates itself to work with the current view of the disk.
Windows 95 provides volume-locking APIs that applications such as disk utilities can use to control direct disk access when the computer uses the Windows 95 32-bit file system. (In Windows for Workgroups 3.11, VFAT generated an error whenever a disk utility tried to access the drive in protected mode.)
Disk utilities usually make absolute INT 25 and INT 26 disk calls, which do not require file system drivers. Instead of calling INT 21 and INT 13 to access the disk, the application calls INT 25 for reads and INT 26 for writes.
When an application is going to change the disk structure (such as a disk utility preparing to defragment the disk), it should first use the volume locking APIs to lock that volume or drive, so that no other application can write to that volume and interfere with its operations. When the application has completed its work, it must unlock the volume before the system can resume normal operation.
If a utility does not use volume locking before it attempts to read from or write to the disk, Windows 95 returns an error and causes it to fail. All utilities included with Windows 95, such as the Disk Defragmenter and ScanDisk, use volume locking. Such utilities cannot be used with Windows NT because Windows NT does not allow utilities to make direct calls to the hardware.