Report On DMA Transfer
Report On DMA Transfer
Title Page i
Table of Contents ii
A. Overview 3
B. Examples of DMA 4
C. Modes of DMA 5
D. Advantages and Disadvantages 6
E. Conclusion 7
F. References 7
Report on DMA Transfer: Modes, Examples, Advantages, and Disadvantages
DIRECT MEMORY ACCESS TRANSFER
A. OVERVIEW
Direct Memory Access (DMA) transfer is a crucial aspect of computer architecture that enhances data
transfer efficiency between peripherals and memory without involving the CPU. This report provides an in-
depth discussion of DMA transfer modes, accompanied by examples, and evaluates the advantages and
disadvantages associated with this technology.
DMA is a mechanism that allows peripherals to transfer data directly to or from memory without CPU
intervention. This results in improved system performance and reduced CPU overhead.
2|
Examples of DMA Transfer
Direct Memory Access (DMA) allows devices to transfer data between themselves and main memory
without involving the CPU. Commonly used in devices such as disk controllers, Ethernet controllers, USB
controllers, and video controllers.
Disk Controllers
DMA is utilized in disk controllers to efficiently transfer data between storage
devices (e.g., hard drives, SSDs) and main memory. Enables faster data
transfers without burdening the CPU.
Ethernet Controllers
DMA in Ethernet controllers facilitates the seamless transfer of data between
the network interface and main memory. Improves network performance by
offloading data transfer tasks from the CPU.
USB Controllers
USB controllers employ DMA for efficient data exchange between USB
devices (e.g., keyboards, mice, external drives) and main memory.
Enhances the speed of data transfers without CPU intervention.
Video Controllers
DMA plays a crucial role in video controllers by facilitating the movement
of graphical data between video memory and main memory. Optimizes
multimedia performance and allows smooth video playback.
3|
Modes of DMA Transfer
Burst Mode –
In this mode, burst of data (entire data or burst of block containing data) is transferred before CPU takes
control of the buses back from DMAC.
This is the quickest mode of DMA Transfer since at once a huge amount of data is being transferred.
Since at once only the huge amount of data is being transferred so time will be saved in huge amount.
Interleaving Mode –
Whenever CPU does not require the system buses then only control of buses will be given to DMAC.
In this mode, CPU will not be blocked due to DMA at all.
This is the slowest mode of DMA Transfer since DMAC has to wait. It might be for so long time to just even
get the access of system buses from the CPU itself.
Hence, due to which less amount of data it will be transferred.
Pros: CPU will not be blocked at all.
Cons: Slowest DMA transfer rate.
4|
Advantages of DMA Transfer
6. Efficient in facilitating direct data transfer between two devices operating at different speeds.
Disadvantages
1. Requires to carry out the additional operations, which increases the cost.
4. The device initiating the transfer must be able to communicate with other devices.
6. A computer system connected to a net- work computer (NC) can't use a DMA controller.
5|
Suppose any device which is connected to input-output port wants to transfer data to memory, first it will
send input-output port address and control signal, input-output read to input-output port, then it will send
memory address and memory write signal to memory where data has to be transferred. In normal input-
output technique the processor becomes busy in checking whether any input-output operation is completed
or not for next input-output operation, therefore this technique is slow.
This problem of slow data transfer between input-output port and memory or between two memory is
avoided by implementing Direct Memory Access (DMA) technique. This is faster as the
microprocessor/computer is bypassed and the control of address bus and data bus is given to the DMA
controller.
6|
Suppose a floppy drive that is connected at input-output port wants to transfer data to memory, the
following steps are performed:
Step-1: First of all the floppy drive will send a DMA request (DREQ) to the DMAC, it means the floppy drive
wants its DMA service.
Step-2: Now the DMAC will send a HOLD signal to the CPU.
Step-3: After accepting the DMA service request from the DMAC, the CPU will send hold acknowledgment
(HLDA) to the DMAC, it means the microprocessor has released control of the address bus the data bus to
DMAC and the microprocessor/computer is bypassed during DMA service.
Step-4: Now the DMAC will send one acknowledgement (DACL) to the floppy drive which is connected at
the input-output port. It means the DMAC tells the floppy drive be ready for its DMA service.
Step-5: Now with the help of input-output read and memory write signal the data is transferred from the
floppy drive to the memory.
7|
Conclusion
DMA (Direct Memory Access) transfer plays a pivotal role in computer architecture, elevating data transfer
efficiency by allowing devices to directly access system memory without involving the CPU. This technology
comes with diverse modes tailored to specific application needs, offering versatility and optimization.
For instance, the various modes like cycle stealing, burst mode, and transparent DMA cater to different
scenarios. Cycle stealing mode allows data transfer during CPU idle cycles, while burst mode enables rapid
consecutive data transfers. Transparent DMA operates in the background, reducing CPU intervention.
While DMA significantly boosts system performance and throughput, it's crucial to weigh its complexity and
potential drawbacks when integrating it into a system. Managing DMA controllers, ensuring data integrity,
and handling potential conflicts are some complexities. Moreover, DMA might create security vulnerabilities
if not implemented securely.
This report aims to provide a comprehensive view of DMA, detailing its modes, illustrating examples, and
offering a balanced analysis of its pros and cons to assist in informed decision-making when employing
DMA in computer systems.
References
https://www.geeksforgeeks.org/modes-of-dma-transfer/
https://www.baeldung.com/cs/dma-controllers
https://www.sciencedirect.com/topics/computer-science/direct-memory-access
https://www.geeksforgeeks.org/direct-memory-access-with-dma-controller-8257-8237/
8|