Open In App

Direct memory access with DMA controller 8257/8237

Suppose any device which is connected to input-output port wants to transfer data to memory, first of all 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. 
 



 



Suppose a floppy drive that is connected at input-output port wants to transfer data to memory, the following steps are performed: 
 

Modes of DMAC: 

           1. Single Mode – In this only one channel is used, means only a single DMAC is connected to the bus system. 

 

            2. Cascade Mode – In this multiple channels are used, we can further cascade more number of DMACs. 

 

 

Advantages:

Improved performance: DMA improves system performance by freeing up the CPU to perform other tasks while data is being transferred between memory and I/O devices. This allows for faster and more efficient data transfer.
Reduced CPU overhead: With DMA, the CPU is not required to be involved in data transfer, which reduces the CPU overhead and allows it to focus on other tasks. This is particularly useful in real-time systems where low latency and fast response times are important.
Support for high-bandwidth devices: DMA can support high-bandwidth devices such as graphics cards and network interfaces that require fast data transfer rates.
Efficient use of system resources: DMA allows multiple devices to access memory simultaneously, which makes more efficient use of system resources.
 

Disadvantages:

Complexity: DMA requires specialized hardware and software to function, which can add to the complexity of a system. This can make it difficult to implement and troubleshoot.
Security risks: DMA can be a security risk if not properly configured or secured. Hackers can exploit vulnerabilities in DMA to gain unauthorized access to a computer system or steal data.
Limited control: Since the CPU is not involved in data transfer with DMA, it has limited control over the transfer process. This can lead to data corruption or errors if the transfer process is not properly managed.
Resource conflicts: DMA can lead to resource conflicts if multiple devices attempt to access memory simultaneously. This can cause system instability and performance issues if not properly managed.
 

Article Tags :