(Direct Memory Access) : RAM CPU
(Direct Memory Access) : RAM CPU
2)
Without DMA, using programmed input/output (PIO) mode for communication with
peripheral devices, or load/store instructions in the case of multi core chips, the CPU is
typically fully occupied for the entire duration of the read or write operation, and is thus
unavailable to perform other work. With DMA, the CPU would initiate the transfer, do other
operations while the transfer is in progress, and receive an interrupt from the DMA controller
once the operation has been done. This is especially useful in real-time
computing applications where not stalling behind concurrent operations is critical. Another
and related application area is various forms of stream processing where it is essential to
have data processing and transfer in parallel, in order to achieve sufficient throughput.
3) For example, a sound card may need to access data stored in the computer's
RAM, but since it can process the data itself, it may use DMA to bypass the CPU.
Video cards that support DMA can also access the system memory and process
graphics without needing the CPU. Ultra DMA hard drives use DMA to transfer
data faster than previous hard drives that required the data to first be run through
the CPU.
4) In order for devices to use direct memory access, they must be assigned to a
DMA channel. Each type of port on a computer has a set of DMA channels that
can be assigned to each connected device. For example, a PCI controller and
a hard drive controller each have their own set of DMA channels.