Skip navigation

Defragment Access Violation; IDE Drivers Get a Major Tune-Up

In some undocumented circumstances, you might see an access violation from the Windows 2000 Disk Defragmenter utility after you run either an analysis or a defragment operation. The access violation occurs when you exit the utility. Although Microsoft doesn't explain why the application failure occurs, the company has issued a patch that eliminates this nonfatal problem. Call Microsoft Product Support Services (PSS) and ask for the new version of dfrgui.dll with a file release date of May 5; use the Microsoft article "'Access Violation (0xC0000005)' Error Message Occurs When You Quit Disk Defragmenter" (http://support.microsoft.com/?kbid=818888) as a reference. The replacement file suggests that the problem is in the GUI, rather than in the utility’s analysis or disk-reorganization code. This fix is tagged as pre–Service Pack 5 (SP5), and you can install it only on Win2K SP3 and later versions.

IDE Drivers Get a Major Tune-Up
Have you ever thought that your laptop was getting slower and slower, even though you made no changes to the system? If so, this problem might explain how such a slowdown can occur on systems that have IDE drives. In Windows Server 2003, Windows XP, and Win2K, the atapi.sys driver supports IDE drives. To ensure data isn't lost because of drive errors, the driver monitors and reduces the direct memory access (DMA) transfer speed in response to IDE device timeouts and cyclical redundancy check (CRC) errors. When a timeout or CRC error occurs, the driver increments the device error counter; when the counter reaches six (timeouts, CRCs, or a combination), the driver reduces the transfer speed one level.

In Win2K, atapi.sys uses a 4-second timeout value. If a system is in standby, it frequently takes longer than 4 seconds for the disk to spin up and for the system to resume regular operation. In this scenario, the read request times out, causing the driver to increment the error counter. If you suspend a system repeatedly during the day, the driver finally reduces the speed of DMA transfer to the slowest possible speed, known as Programmed I/O (PIO) mode. Because we configure notebooks to conserve power, these timeouts occur more often on portable systems than on workstations or servers. So, for example, if you suspend a notebook computer 12 times in 1 day, the atapi.sys driver reduces the transfer rate twice. If you suspend the machine more often, the native algorithm can reduce the data transfer rate to the speed of a snail.

You can check the current transfer rate in the Control Panel Device Manager applet. In the device list, expand the IDE ATA/ATAPI controllers and locate the Primary and Secondary IDE Channel entries. Right-click Primary IDE, select Properties, and click Advanced Settings. The third field, Current Transfer Mode, displays the active transfer rate. If this field says PIO only, the hard disk is running in snail mode. If you have two IDE controllers, check the transfer speed on both. You might see a slower transfer rate on the secondary channel if the only device on the secondary channel is a slow CD-ROM.

According to Microsoft, you can manually reset the transfer rate to the highest speed the device supports. To do so, uninstall and reinstall the IDE Controller device. In Device Manager, locate and right-click the IDE controller. Choose Uninstall and reboot the system. At system startup, the system resets the value to the highest supported rate appropriate for the devices on each channel. Note: I didn't test this procedure. To be prudent, I recommend you try this on a test system or back up the hard disk before you use this method to reset the transfer speed.

This problem exists in the IDE/ATAPI driver on most Windows platforms, including Windows 2003, XP, and Win2K. PSS has a new atapi.sys driver for each affected platform. The new version makes the slowdown algorithm more flexible and causes the driver to return more quickly to the optimum transfer rate. On Win2K systems, the hotfix increases the driver timeout value to 10 seconds (Windows 2003 and XP IDE drivers use a timeout of 10 seconds). On all platforms, the driver reduces the transfer rate one level after six consecutive timeout or CRC errors (or a mix), and resets the counter. The latest version of the atapi.sys driver is a comprehensive update that replaces all earlier versions of the IDE driver. The following list summarizes the atapi.sys driver information for each affected platform:

• Windows 2003--The 32- and 64-bit versions of atapi.sys have version number 5.2.3790.10 and a file release date of April 28. This patch installs on the original release of Windows 2003 and will be included in SP1.
• XP--The 32- and 64-bit versions of atapi.sys have version number 5.1.2600.1211, with a file release date of April 23. You can install this update on XP SP1 and later systems; the update will likely be included in XP SP2. The new driver supersedes two earlier hotfixes.

• Win2K--The newest version of atapi.sys has version number 5.0.2195.6741, with a file release date of April 28. You can install this version on Win2K SP2 and later systems; this update, which will be included in SP5, supersedes eight earlier hotfixes.

To fully activate the new disk transfer rate adjustment algorithm, you must add a data value to each IDE channel (i.e., Primary and Secondary) key in the registry. See the Microsoft article "IDE ATA and ATAPI Disks Use PIO Mode After Multiple Time-Out or CRC Errors Occur" (http://support.microsoft.com/?kbid=817472) for instructions about how to perform this operation and for more information about this update.

TAGS: Security
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish