Computersight > Hardware > Memory

Direct Memory Access: DMA

(contd.)

Page 2 of 2 | «Prev12 Next

DMA Controllers

We all know that for any process such as the one that I have just outlined above something somewhere must be orchestrating the affair. First of all a whole bunch of additional traces (wires embedded into a PCB) were built into motherboards. Some were devoted to controller functions and others were dedicated to the actual data transfers.

At first this was an add-on or expansion card which in time became integrated into silicon and embedded into the motherboard and then finally absorbed into the motherboard's chip set support capabilities which is where it has remained to this very day.

The other half of the system also needed the same supporting controllers and devices such as hard disk drives underwent the same integration process as the motherboard and so their side of the DMA has been absorbed by integrated controllers built into the drives supporting silicon and the controlling logic is now part of the devices firmware.

Implementing DMA

Here are the system requirements for DMA to work. You need:

  • Peripheral devices such as a hard disk drive or optical disk drives that support DMA
  • A motherboard which supports DMA
  • An operating system and specialty applications that comply with the DMA standards specifications
  • A motherboard system BIOS that supports DMA functionality as well

Note:

  • DMA channels are to be found on the ISA bus & its derivatives EISA & VLB
  • PCI devices do not use standard DMA channels at all

Third-Party DMA Bus Mastering

Standard DMA is also known as "third party" DMA meaning that the system DMA controller is actually doing the transfer and the first two parties are the sender and the receiver of the transfer.

First-Party DMA Bus Mastering

Here we have the peripheral device that is doing the transfer actually taking over control of the system bus to perform the transfer.

  • This is also called bus mastering and provides much better performance than regular DMA because modern devices have much smarter and faster DMA circuitry built into them than what exists in the older standard ISA DMA controller
  • Newer DMA modes; such UDMA - Ultra DMA (mode 3 or DMA-33) are now available and they provide much faster transfer rates

Limitations of Standard DMA

While DMA provided a significant improvement over CPU controlled data transfers, it too eventually reached a point where its performance had become a limiting factor.

  • DMA on the ISA bus has been stuck at the same performance level for over 10 years
  • For old 10 MB XT hard disks, DMA was a top performer

PCI Bus

As computers evolved the PCI bus was introduced by Intel® and hard disk drives capacities started to get large and continue to do so. But a few years back HDD capacities started to exceed 80 GB and the drive itself was capable of transferring data at many megabytes per second standard DMA was not able to keep up to the task and had become more of a mill stone than a plus. This was when we started to see new technologies come into being in the mass market including:

  • PIO - Programmed I/O or 1st Party DMA bus mastering on the PCI bus to control hard drives as opposed to using the standard ISA DMA that was used for devices like sound cards. This freed these drives from the older ISA DMA controllers which meant that they could access the bandwidth they need for optimal performance.
  • Over the next couple of years many of the devices that used to use DMA on the ISA bus jumped ships and were now using PCI bus. Mastering over the PCI bus meant far superior performance. Some of these devices were: new high-end SCSI cards, Network Interface Cards, Video Cards and many more.

DMA Controllers

For those who are serious about passing their A+ certification exam here is a list which you are bound to get a couple exam questions about:

  • On new PCs the standard DMA controller has been integrated into the system chipset
  • The original PC & XT had one of these controllers that supported 4 DMA channels, 0 to 3
  • With IBM's launch of the AT form factor a 2ND DMA controller was added
  • To ensure backwards compatibility and greater uniformity the IBM design engineers decided to use the same cascade technique employed with the introduction of the 2ND IRQ controller to cascade the 1ST DMA controller to the 2nd DMA controller
  • The big difference here though was that where the 2ND interrupt controller is cascaded to the 1ST interrupt controller the exact opposite is the case for the 2 DMA controllers. With the 1ST DMA controller cascaded to the 2ND
  • The result is that although there are 8 DMA channels numbered 0 to 7, DMA 4 is not usable
  • There is no rerouting as was the case with IRQ2 and IRQ9
  • All of the original DMA channels (0 to 3) are still usable directly

DMA Channels and the System Bus

  • Except for DMA 4 all other DMA channels are available to devices on the ISA system bus because channel 4 is used to cascade the 2 controllers together
  • PCI devices do not use any of these standard DMA channels
  • The 2ND DMA controller was added when the ISA bus was expanded to 16-bit with the introduction of the AT
  • The traces to access these extra DMA channels were incorporated into the extra part of the expansion slot on the model AT PC and so only 16-bit devices can access the extra DMA channels (5,6,7)

2 Signals/DMA Channel

  1. DRQ - DMA Request
  2. DACK - DMA Acknowledgment

Some peripheral cards have separate jumpers for these instead of a single DMA channel jumper so ensure that the DRQ & DACK are set to the same number, otherwise the device won't work

Table 1: Typical DMA Configuration & Resource Allocation

DMABus LineTypical

Default Use

Common Uses
0NoMemory RefreshNone
18/16-bitSound Card (low DMA)SCSI host adapters, ECP parallel ports, tape accelerator cards, network cards, voice modems
28/16-bitFloppy disk controllerTape accelerator cards
38/16-bitNoneECP parallel ports, SCSI host adapters, tape accelerator cards, sound card (low DMA), network cards, voice modems, hard disk controller on old PC/XT
4NoNone; cascade for DMA 0-3None
516-bit onlySound Card (high DMA)SCSI host adapters, network cards
616-bit onlyNoneSound cards (high DMA), network cards
716-bit onlyNoneSound cards (high DMA), network cards

DMA Details Summary

  • DMA channels 0-4 which were originally 8-bit had a maximum of 64KB per transfer
  • Then starting with the AT 0, 5, 6 and 7 were 16-bit channels capable of 128KB per transfer but still only one transfer at a time
  • DMA must reside in conventional memory and not many ISA based cards could take advantage of the new DMA channels
  • DMA channel 3 is the one most likely to experience conflicts resulting in very strange and erratic behaviour
  • Although DMA was standardised at this point PCI does not use DMA in the same way as the other expansion bus slots. Instead PCI usually implements DMA as bus mastering with the device taking control of the bus
Page 2 of 2 | «Prev12 Next
4
Liked It
I Like It!
Related Articles
Server  |  10 Computer Shopping Tips That Won't Make You Regret
Comments (0)
Post Your Comment:
Name:  
Copy the code into this box:  
Post comment with your Triond credentials?
Inside Computersight

Communication & Networks

 /

Computers

 /

Hardware

 /

Operating Systems

 /

Programming

 /

Software


Popular Tags
Popular Writers
Powered by
Computersight
About Us
Terms of Use
Privacy Policy
Services
Submit an Article
Advertise with Us
Contact

© 2007 Copyright Stanza Ltd. All Rights Reserved.