HelpWithWindows.com             Windows Shell/User Award 2004-2005

Home Windows 95 Windows 98 Windows Me Windows 2000 Windows XP Support BBS Software Newsletter

Windows 98 > Fine Tune Windows 98


Using DMA (Bus Mastering)

IMPORTANT: Know what you're doing when using this information! You might have to re-install your system when getting it wrong (So make a backup before)! I provide links to the documents at Intel® and other places where you can read the full information. I provide this information because people are asking for it. It is YOUR system, it is YOUR responsibility!


Bus Master IDE General Overview

Traditionally IDE devices where programmed to transfer data in PIO (Programmed I/O) mode. In this mode data is transferred to and from IDE devices via CPU instructions. This requires a relatively large amount of dedicated CPU time, especially when transferring large amounts of data. A typical machine today will use 40% of the CPU doing hard drive transfers in PIO mode and use only 25% of the CPU doing hard drive transfers in DMA mode, on the same hardware.

DMA (Direct Memory Access) mode of operation allows the DMA channels to handle data transfer so that it's not required for the CPU to monitor the transfer, thus reducing CPU overhead. The transfer rate for a particular data transfer event will not noticeably increase.

Theoretically DMA mode 2 allows up to 22.2Mb/sec and UDMA (Ultra DMA) allows up 33.3 Mb/sec, whereas PIO mode 3 & 4 allow only up to 16.6 Mb/sec. (But in real-world operation actual data I/O rates are significantly less for all).
More information on DMA and UDMA can be found at PCGuide.

You can use this procedure to test your HDD for DMA support.

Now to measure and compare the speed of your hard drive while operating in different modes I would suggest you to download the shareware utility called HD Tach.

The measurements which are important here are Read burst speed, Read speed and CPU utilization. When operating in PIO mode the Read burst speed is more or less equal as the maximum Read speed data transfer rate, whereas the CPU Utilization is typically above 30%. In DMA modes the Read burst speed is typically 25 to 50% higher than the Read speed data transfer rate, and the CPU Utilization usually drops below 25%. In UDMA modes the Read burst speed is typically double the Read speed data transfer rate (although it can be significantly less), and the CPU Utilization is usually the same as for DMA mode (less then 25%).


To Bus Master your system and determine whether your drive supports DMA:

  1. Open System Properties in Control Panel (select Start > Settings > Control Panel)
  2. Select the Device Manager tab
  3. Click the + sign next to the Disk drives entry
  4. Select the drive you want to enable for DMA and click Properties
  5. On the Settings tab, there should be a DMA check box, if this box is unchecked, place a check mark. If there is no check box (or it is grayed out), your motherboard chipset does not support the bus master interface. If the check box is not checked after you restart your system, your hard disk probably has been automatically disabled again because the hard disk may not support a multiple-word DMA protocol. For more information see Microsoft's Knowledge Base Article No. 159560

You can use the same procedure to Bus Master your CD-ROM Drive.

Note: You do not need to install Bus Master drivers, they are already build in the Windows 98 system.


It seems that when using this method (as opposed to buying a system which had DMA (properly) enabled by the OEM), an entry of the registry is not updated. To check, Open the file Mshdc.inf (found in \Windows\Inf), and look for the header [ESDI_AddReg], it should look like:

[ESDI_AddReg]
HKR,,DriverDesc,,"ESDI Port Driver"
HKR,,DevLoader,,*IOS
HKR,,PortDriver,,ESDI_506.pdr
HKR,,IDEDMADrive0,3,01
HKR,,IDEDMADrive1,3,01

If the two bold-faced lines shown above appear (with the other 3 lines), you are set. If not, add the 2 (bold) lines, and manually remove all IDE devices from Device Manager (Control Panel > System, Device Manager tab), the system will tell you to re-boot, and it will re-detect the controller, and set them up in DMA mode.


To determine whether your IDE hard disk supports multiple-word DMA protocol, you can test the primary IDE drive and the secondary IDE drive using debug.

To test the primary IDE drive:

  1. Restart the computer. Press the CTRL key to get the Windows 98 Startup menu, and then choose Command Prompt Only
  2. At the command prompt, type debug
  3. At the hyphen prompt, type the following lines, pressing Enter after each line. Do not type the comment

    Note: The first character of each line is the letter o, not the numeral zero

    Type Comment
    o 1f6 a0 a0 (a-zero) is for a master drive; use b0 for a slave
    o 1f2 22 22 is for DMA mode 2; use 21 for DMA mode 1
    42 is for UDMA mode 2; use 41 for UDMA mode 1 and 40 for UDMA mode 0
    o 1f1 03 03 (zero-3) is to program the hard disk timing
    o 1f7 ef ef is the set feature command for the hard disk
    i 1f1 Reads in the error status; a value is returned

    If the number returned after entering i 1f1 is 00, the hard disk accepts the DMA protocol timing that you entered with the o 1f2 statement, and the hard disk supports DMA. A return value of 04 indicates that the hard disk does not support a DMA multiple-word protocol. If the value returned is not 00 or 04, you may not have typed the characters correctly, or you may need to quit Windows.

    PIO mode 3 hard disks may support multiple-word DMA mode 1. PIO mode 4 hard disks should support multiple-word DMA mode 2. If you have a PIO mode 4 drive that does not support multiple-word DMA mode 2, it is possible that the hard disk has a firmware problem. Contact the hard disk manufacturer, and verify the firmware version.

  4. To quit Debug, type q and press Enter

To test the secondary IDE drive:

  1. Restart the computer. Press the CTRL key to get the Windows 98 Startup menu, and then choose Command Prompt Only
  2. At the command prompt, type debug
  3. At the hyphen prompt, type the following lines, pressing Enter after each line. Do not type the comment

    Note: The first character of each line is the letter o, not the numeral zero

    Type Comment
    o 176 a0 a0 (a-zero) is for a master drive; use b0 for a slave
    o 172 22 22 is for DMA mode 2; use 21 for DMA mode 1
    42 is for UDMA mode 2; use 41 for UDMA mode 1 and 40 for UDMA mode 0
    o 171 03 03 (zero-3) is to program the hard disk timing
    o 1f7 ef ef is the set feature command for the hard disk
    i 171 Reads in the error status; a value is returned

    If the number returned after entering i 171 is 00, the hard disk accepts the DMA protocol timing that you entered with the o 172 statement, and the hard disk supports DMA. A return value of 04 indicates that the hard disk does not support a DMA multiple-word protocol.

    If your drive does support a DMA multiple-word protocol and the DMA check box will not remain enabled, the IDE controller may not be compatible with the Microsoft IDE bus mastering driver.

  4. To quit Debug, type q and press Enter


If you're having problems with Standby - Resume, see Microsoft Knowledge Base Article No. 193473

E-mail This Page




  SITE LINKS

InfiniSource
InfiniSource, About Us, Advertising, Contact Us, Employment, Feedback, Links, Link to Us, Press Releases, Privacy Policy, Recommend, What's New?, IRC Info, Search Engines, Shareware Links, Web Design, Win3.x Support, Win95/98 Support, Veterans Corner, 'Net Humor


RoseCitySoftware
RoseCitySoftware, Software Products, Spotlight of the Week, Partners, RCS newsletter, Corporate Sales, List with us

HelpWithWindows
HelpWithWindows, Guestbook, Links, Privacy Policy, Windows 95, Windows 98, Windows ME, Windows 2000, Windows XP, Windows TechFiles, WindowsBBS, WindowsNewsletter



InfiniSource.com   RoseCitySoftware.com
HelpWithWindows.com   WindowsBBS.com   WindowsNewsletter.com
 


at: http://www.helpwithwindows.com/windows98/tune-35.html