iTechtalk

Quick Search

Go Advanced

Member Login

Not registered? | Forgot Password
 
Register
Welcome
 
iTechtalk > Tutorials > Operating systems » Direct Memory Access
Reply
Old 10-10-2008, 10:49 AM   #1 (permalink)
 
ghost's Avatar
 
Junior Member
Join Date: Oct 2008
Posts: 8
Post Direct Memory Access

Direct Memory Access:-

Direct Memory Access (DMA) is the capability to transfer data from a peripheral to main memory without the CPU's intervention. DMA boosts the performance of peripherals manyfold, because it doesn't burn CPU cycles to move data. PCI networking cards and IDE disk drives are common examples of peripherals relying on DMA for data transfer.

DMA is initiated by a DMA master. The PC motherboard has a DMA controller on the South Bridge that can master the I/O bus and initiate DMA to or from a peripheral. This is usually the case for legacy ISA cards. However, buses such as PCI can master the bus and initiate DMA transfers. CardBus cards are similar to PCI and also support DMA mastering. PCMCIA devices, on the other hand, do not support DMA mastering, but the PCMCIA controller, which is usually wired to a PCI bus, might have DMA mastering capabilities.

The issue of cache coherency is synonymous with DMA. For optimum performance, processors cache recently accessed bytes, so data passing between the CPU and main memory streams through the processor cache. During DMA, however, data travels directly between the DMA controller and main memory and, hence, bypasses the processor cache. This evasion has the potential to introduce inconsistencies because the processor might work on stale data living in its cache. Some architectures automatically synchronize the cache with main memory using a technique called bus snooping. Many others rely on software to achieve coherency, however.

DMA can occur synchronously or asynchronously. An example of the former is DMA from a system frame buffer to an LCD controller. A user application writes pixel data to a DMA-mapped frame buffer via /dev/fbX, while the LCD controller uses DMA to collect this data synchronously at timed intervals. An example of asynchronous DMA is, transmit and receive of data frames between the CPU and a network card.

System memory regions that are the source or destination of DMA transfers are called DMA buffers. If a bus interface has addressing limitations, that'll affect the memory range that can hold DMA buffers. So, DMA buffers suitable for a 24-bit bus such as ISA can live only in the bottom 16MB of system memory called ZONE_DMA PCI buses are 32-bits wide by default, so you won't usually face such limitations on 32-bit platforms.
ghost is offline   Reply With Quote
 
Reply

Bookmarks

Tags
direct memory access

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct and indirect Recursion in OOP apne Programming 0 11-05-2008 09:48 AM
Memory Barriers designer Operating systems 0 10-07-2008 11:31 AM
Ever got the chance to know about your Local Memory mahimuddin.delaxo Programming 0 08-18-2008 11:17 AM
Virtual Memory priti Operating systems 0 08-14-2008 06:25 AM
Virtual Memory priti Operating systems 0 08-14-2008 04:58 AM


 

Content Relevant URLs by vBSEO 3.3.0