Computersight > Hardware > Memory

Direct Memory Access: DMA

Faster, longer, stronger, bigger, smarter, cheaper and with heightened reliability are all goals that computer technologies both hardware and software have their sights squarely set on.

Page 1 of 2 | Prev 12Next»

The reason for this resides in the simple concept of optimisation and performance tweaking. These are the topics that this series of articles is all about.

Introducing Direct Memory Access - DMA

Optimizing CPU time and making the most out of what you've got with the least amount of effort and expenditure. These are the objectives of many technologies including Direct Memory Access (DMA).

So what is DMA?

Direct Memory Access or DMA is a process whereby data is moved from a device such as a hard disk drive into system memory without the direct control or indeed any other involvement on the part of the Central Processing Unit - CPU. This "frees` the CPU to do other tasks. However; before we can begin to understand DMA and its implications we need to take a short trip down memory lane in order to give the entire subject some perspective.

Back in the good old days when PCs were young the CPU really did do it all. Every process that took place in a computer happened under the direct watchful scrutiny of the CPU. Nothing happened unless the CPU was involved. The CPU ran all programs and took responsibility for the transfer of data from point A to point B as well as to and fro from peripherals.

This meant that while the CPU was engaged in these menial tasks it could not be used for anything else. Attending to purely data transfers was a big waste of resources and the machines of the day were most definitely not over-endowed on the resources side of things.

Well it wasn't too long before IBM's engineers realized that they should be able to get a major performance boost from the hardware they already had simply by working "smarter`. Their research had shown that it is more efficient to have peripheral devices look after their own transfers rather than the CPU. Let us take a quick look at how this can happen by examining the print process:

  • The CPU dumps data to a set range of addresses in system memory, initiates the transfer of the data through the traces on the motherboard to the correct interface port and on to the print device
  • With this done the CPU is quite satisfied that it has completed its task and the print job has been printed
  • In reality however; nothing could be further from the truth because the CPU along with the rest of those components that were involved in transmitting the print job data actually sent the print job data to the print device at a rate which far exceeds the maximum printing speed of the device
  • What is really taking place is the print device (or even a print server) has accepted the print job data as fast as it could receive the data, placed it into a temporary holding memory (printer cache memory) and placed the request to print at the end of its jobs-to-do list (print queue)
  • If already engaged in printing another job the printer continues printing that job until it has been completed. It then moves to the print job at the top of its print queue and prints that. Eventually the printer will get to our job and print it.
  • In the meantime the CPU has been on a quick world tour courtesy of the Internet, played some music and done a whole bunch of other tasks that the user requested

The lesson to be learned here is that had the CPU only been able to send the data at a rate equal to the printer"s maximal printing speed it would have been tied up doing so for the duration of the printing process and most certainly would not have played the music, surfed the net or done anything else.

So what actually took place was that the CPU dumped the print job into memory, notified the printer that a job was ready and went off to have some fun leaving the printer and print device to handle the actual printing process and even the transfer of the data to be printed from memory to the printer's own cache memory and all at a speed that the printer was comfortable with.

It is the methodology of permitting the end device to control the transfer of data intended for its self that is known as Direct Memory Access - DMA and it is bi-directional procedure. This means that in the event of another peripheral device having a task that the CPU must perform the peripheral device will transfer its job into system memory and once done send a message to the CPU informing it that there is now a job in memory ready to be executed.

In summary we now have a system whereby end devices can receive data from system memory of transfer it into system memory (RAM - Random Access Memory) and all without any help or direct guidance from the CPU.

Page 1 of 2 | Prev 12Next»
4
Liked It
I Like It!
Related Articles
Server  |  10 Computer Shopping Tips That Won't Make You Regret
More Articles by TechDoc
Common Protocol Exploitation Attacks  |  Layer Two Error Handling
Latest Articles in Memory
CD-ROM - A Small Introduction  |  Backing Up Memory with a Flash Drive
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.