0% found this document useful (0 votes)
219 views

Direct Memory Access (DMA)

Direct Memory Access (DMA) allows data to be transferred directly between peripheral devices and memory without intervention from the CPU. The DMA controller handles the transfer by reading/writing data to memory based on commands from the CPU. During a transfer, the DMA controller takes control of the memory bus to move data in blocks while the CPU performs other tasks. Handshaking between the DMA controller and device controller coordinates the transfer of each data block. When complete, the DMA controller interrupts the CPU.

Uploaded by

loffycraze
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
219 views

Direct Memory Access (DMA)

Direct Memory Access (DMA) allows data to be transferred directly between peripheral devices and memory without intervention from the CPU. The DMA controller handles the transfer by reading/writing data to memory based on commands from the CPU. During a transfer, the DMA controller takes control of the memory bus to move data in blocks while the CPU performs other tasks. Handshaking between the DMA controller and device controller coordinates the transfer of each data block. When complete, the DMA controller interrupts the CPU.

Uploaded by

loffycraze
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 7

Introduction of

Direct Memory Access (DMA)


Why is DMA?
• It is wasteful to feed data into a controller
register 1 bytes at a time. (PIO)
• The DMA unit is word.
• In the high loading environment, a system
with DMA has better improvement.
DMA transfer
1.device driver told to transfer disk
data to buffer ataddress X
C PU
2.device driver tells disk controller to
5.D M A controller transfers bytes transfer C bytes from disk to buffer at
to buffer X ,increasing m em ory address X
address and decreasing C untilC =0 cache
6.w hen C =0,D M A interrupts C PU
to signaltransfer com pletion D M A /bus/ X
interrupt C PU m em ory bus M em ory buffer
controller

PC I bus

3.disk controller initiates


ID E disk D M A transfer
controller 4.disk controller sends each
byte to D M A controller

disk disk

disk disk
DMA Progress
• To initiate a DMA transfer, the host writes a
DMA command into memory:
– A pointer to the source of a transfer
– A count of the number of bytes to be transferred
– ……..
• The CPU writes the address of the DMA
command block to the DMA controller.
DMA Progress (cont.)
• The DMA controller proceeds to operate the
memory bus directly without CPU help.
• Handshaking exists between DMA
controller and device controller.
• When the entire transfer is finished, the
DMA controller will interrupts the CPU.
Handshaking
• DMA-request and DMA_acknowledge
– When a word of data is available, the device
controller places a signal on the DMA-request
wire.
– The signal causes the DMA controller to seize
the memory bus,
• To place the desired address on the memory-address
wire
• To place a signal on the DMA-acknowledge wire
Handshaking (cont.)
• When the device controller receives the
DMA-acknowledge signal,
– it transfer the word of data to memory
– and remove the DMA_request signal.

You might also like