DMA mode vs PIO mode

- these are called transfer modes - for transfer of data from Device to RAM -

DMA (Direct Memory Access) 

DMA can dramatically speed up a hard drive.  It allows the drive controller to access the memory directly without having to request it from the CPU.  There are 8 DMA channels provided (0 through 7) which are managed by two DMS controllers.  This way, so that multiple devices can be accessing the memory concurrently.  All of the DMA channels except channel 4 are accessible to devices on the ISA system bus. Channel 4 is used to cascade the two DMA controllers together.

Standard DMA channels (3rd party DMA) are only on the ISA bus (and EISA and VLB, since they are derivatives of it). PCI devices do not use standard DMA channels and require bus mastering for DMA to work.

Bus Mastering (1st party DMA) allows devices, such as hard drives - to take over the bus and perform the transfers.  Ultra DMA uses bus mastering.

DMA Mode

Maximum Transfer Rate (MB/s)

Defining Standard

Single Word Mode 0

2.1

ATA

Single Word Mode 1

4.2

ATA

Single Word Mode 2

8.3

ATA

Multiword
Mode 0

4.2

ATA

Multiword
Mode 1

13.3

ATA-2

Multiword
Mode 2

16.7

ATA-2

Old DMA Modes

Ultra DMA
Mode (all double-word)

Maximum Transfer Rate (MB/s)

Defining Standard

Mode 0

16.7

ATA/ATAPI-4

Mode 1

25.0

ATA/ATAPI-4

Mode 2

33.3

ATA/ATAPI-4

Mode 3

44.4

ATA/ATAPI-5

Mode 4

66.7

ATA/ATAPI-5

Mode 5

100.0

ATA/ATAPI-6?

Modern DMA (Ultra DMA)

 

PIO (Programmed Input/Output) mode

PIO is an old method of transferring data between two devices that uses the computer's CPU as part of the data path.  There are 5 modes:

PIO Mode Data Transfer Rate (MBps) Standard
0 3.3 ATA
1 5.2 ATA
2 8.3 ATA
3 11.1 ATA-2
4 16.6 ATA-2

 

PIO is enabled by default for ATAPI read-only devices (tape drives, CD-ROM drives, and ATAPI removable drives such as magneto-optical (MO) drives).

For ATAPI recordable devices, such as DVD and CD-R/RW drives - DMA is enabled by default.

The user can, however, enable DMA on any ATAPI device through Device Manager.

Which is Faster ?

DMA is faster than PIO mode, so use DMA if possible.  For CDROM drives, PIO is plenty fast enough since their transfer rates are much slower than hard drives.

Windows XP and Transfer Modes

Even if you set your device to use DMA, Windows XP will turn off DMA mode and revert tp PIO for a device after encountering certain errors during data transfer operations. If more that six DMA transfer timeouts occur, Windows will turn off DMA and use only PIO mode on that device.

In this case, the user cannot turn on DMA for this device. The only option for the user who wants to enable DMA mode is to uninstall and reinstall the device.

The Microsoft® Windows® XP operating system enables DMA by default on most of the ATA or ATAPI (IDE) devices. To ensure system stability, however, PIO mode will be selected for DMA-capable devices under some circumstances. This article explains the reasons for an ATA or ATAPI device to be in PIO mode on systems running Windows XP.

PIO mode is enabled by default in the following situations:

For ATAPI devices, except DVD and CD-R/RWW drives. Windows XP enables PIO by default on ATAPI tape drives, CD-ROM drives, and ATAPI removable drives such as magneto-optical (MO) drives. The user can, however, enable DMA on an ATAPI device through Device Manager.

Windows XP enables DMA by default on ATAPI DVD and CD-RW/CD-R drives.

For ATA or ATAPI devices that do not work properly in DMA mode. Compatibility testing at Microsoft has shown that enabling DMA on certain drives could cause data corruption or reduced system stability. There is no way for the user to enable DMA on these devices.

For certain IDE chipsets that cause data corruption. For ATA or ATAPI devices using chipsets that are known to cause problems running in the DMA mode, Windows will enable PIO by default.

System manufacturers can override this default behavior by implementing the _GTM and _STM methods in the ACPI BIOS. Also, the user can enable DMA using the Device Manager.

For repeated DMA errors. Windows XP will turn off DMA mode for a device after encountering certain errors during data transfer operations. If more that six DMA transfer timeouts occur, Windows will turn off DMA and use only PIO mode on that device.

In this case, the user cannot turn on DMA for this device. The only option for the user who wants to enable DMA mode is to uninstall and reinstall the device.

Windows XP downgrades the Ultra DMA transfer mode after receiving more than six CRC errors. Whenever possible, the operating system will step down one UDMA mode at a time (from UDMA mode 4 to UDMA mode 3, and so on).

If the mini-IDE driver for the device does not support stepping down transfer modes, or if the device is running UDMA mode 0, Windows XP will step down to PIO mode after encountering six or more CRC errors. In this case, a system reboot should restore the original DMA mode settings.

All CRC and timeout errors are logged in the system event log. These types of errors could be caused by improper mounting or improper cabling (for example, 40-pin instead of 80-pin cable). Or such errors could indicate imminent hardware failure, for example, in a hard drive or chipset.

To enable DMA mode using the Device Manager

1. Open Device Manager.

2. Double-click IDE ATA/ATAPI Controllers to display the list of controllers and channels.

3. Right-click the icon for the channel to which the device is connected, select Properties, and then click the Advanced Settings tab.

4. In the Current Transfer Mode drop-down box, select DMA if Available if the current setting is "PIO Only."
If the drop-down box already shows "DMA if Available" but the current transfer mode is PIO, then the user must toggle the settings. That is: