0% found this document useful (0 votes)
61 views8 pages

Report On DMA Transfer

Report on DMA Transfer: Modes, Examples, Advantages, and Disadvantages DIRECT MEMORY ACCESS TRANSFER

Uploaded by

rm.caunca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views8 pages

Report On DMA Transfer

Report on DMA Transfer: Modes, Examples, Advantages, and Disadvantages DIRECT MEMORY ACCESS TRANSFER

Uploaded by

rm.caunca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Table of Contents

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

What Does Direct Memory Access Mean?


Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data
directly to or from the main memory, bypassing the CPU to speed up memory operations.
It is the process of transferring data without the involvement of the processor itself. It is often used for
transferring data to/from input/output devices. A separate DMA controller is required to handle the transfer.
The controller notifies the DSP processor that it is ready for a transfer.

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.

Specialized DMA Controllers


Highlight that the DMA controllers embedded in these devices are typically specialized for specific tasks
and are not intended as general system DMA controllers. Emphasize their role in enhancing data transfer
efficiency within the respective devices.

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.

Pros: Fastest mode of DMA Transfer


Cons: Less user friendly because during the DMA transfer CPU will be blocked.

Cycle Stealing Mode –


Slow IO device will take some time to prepare data (or word) and within that time CPU keeps the control of
the buses.
Once the data or the word is ready, CPU gives back control of system buses to DMAC for 1-cycle in which
the prepared word is transferred to memory.
As compared to Burst mode, this mode is little bit slowest since it requires little bit of time which is actually
consumed by IO device while preparing the data.
Pros: Most Efficient way for DMA Transfer.
Cons: Rate of DMA Transfer will be less.
CPU won’t be blocked entire time.

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

1. Speed up data transfer and memory operations.

2. Don't involve CPU during data transfer.

3. The workload is appropriately distributed.

4. Helps in decreasing the load on the CPU.

5. Needs only a few numbers of clock cycles while transferring data.

6. Efficient in facilitating direct data transfer between two devices operating at different speeds.

7. Allows efficient use of interrupts.

Disadvantages

1. Requires to carry out the additional operations, which increases the cost.

2. The added complexity of the software

3. Additional cost of the hardware. Suffers from cache coherence problem.

4. The device initiating the transfer must be able to communicate with other devices.

5. Both devices must be able to initiate the data transfer independently

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.

HOLD – hold signal

HLDA – hold acknowledgment

DREQ – DMA request

DACK – DMA acknowledgment

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|

You might also like