Direct Memory Access Last Updated : 20 Jan, 2025 Comments Improve Suggest changes Like Article Like Report Direct Memory Access (DMA) is a technique used in computers and other electronic devices to allow peripherals (like hard drives, network cards, and sound cards) to communicate directly with the main memory (RAM) without involving the CPU. This process speeds up data transfer and frees up the CPU to perform other tasks, improving overall system performance. The peripheral device sends a request to the DMA controller to initiate a data transfer.The DMA controller takes control of the system’s memory bus and accesses memory directly, either reading data from it or writing data to it.After the transfer is complete, the DMA controller signals the CPU that the task is finished, and the CPU can continue with other tasks.Working of DMA TransferBelow diagram represents a Direct Memory Access (DMA) controller and its components in a typical DMA system. Working of DMA SystemDMA Controller ComponentsControl Logic: The Control Logic is the central component that manages the overall DMA operation. It processes control signals and directs data transfers between the peripherals and memory. It receives commands from other components and determines how and when data should be moved.DMA Select and DMA Request: DMA Select is used by the DMA controller to select the appropriate data transfer request. DMA Request is initiated by a peripheral device when it needs to perform a data transfer. The request tells the DMA controller that the device is ready to either read or write data.DMA Acknowledge: The DMA Acknowledge signal is sent back from the control logic to the peripheral device to confirm that the DMA operation has been initiated and the device can proceed with the data transfer.Bus Request and Bus Grant: Bus Request is generated by the DMA controller when it needs access to the system's bus for data transfer. The Bus Grant signal is sent from the CPU or the system’s bus controller to give the DMA controller permission to use the bus for transferring data.Address Bus and Data Bus: The Address Bus and Data Bus are used to transfer data and memory addresses between the DMA controller, memory, and peripherals. The Data Bus Buffer temporarily holds data being transferred, while the Address Bus Buffer holds memory addresses.Registers:Address Register: This stores the memory address where data will be written or read from.Word Count Register: This keeps track of the number of words or units of data that need to be transferred.Control Register: This contains control information, including the direction of data transfer (read or write), and any other control signals necessary to manage the DMA operation.Internal Bus: The Internal Bus connects all the components inside the DMA controller, allowing them to communicate and pass data efficiently.Interrupt: The Interrupt signal is used to inform the CPU once the DMA operation is completed. After the data has been transferred, the DMA controller sends an interrupt to notify the CPU, so the CPU can resume processing or handle other tasks.Working:The DMA controller facilitates the transfer of data between memory and peripherals without involving the CPU for each individual data operation, as mentioned in the article.The DMA Select and DMA Request initiate the process when a peripheral wants to transfer data, similar to how DMA allows peripherals to operate independently of the CPU.Address Bus and Data Bus handle the flow of data and memory addresses during the transfer, improving system efficiency by bypassing the CPU.The Registers (Address Register, Word Count Register, Control Register) store the necessary information to control the transfer, as described in the article, where DMA controls the movement of data between the device and memory.The Interrupt is triggered once the transfer is completed, similar to how the CPU is notified in the article that DMA operations have been finished.Types of DMAThere are several types of DMA, each with its own way of transferring data:Burst Mode DMA:In this mode, the DMA controller takes control of the memory bus and transfers a block of data in one go.The CPU is temporarily locked out of memory access while the DMA controller completes the data transfer.Cycle Stealing DMA:In this mode, the DMA controller transfers one data item at a time but allows the CPU to access memory between each transfer.This allows the CPU and DMA controller to share the memory bus and work more collaboratively.Block Mode DMA:The DMA controller transfers a block of data without interruption, but it uses a more organized approach than burst mode, allowing for more efficient transfers.The CPU is locked out of memory access during the transfer.Demand Mode DMA:In this mode, the DMA controller transfers data only when the CPU is not using the memory bus, essentially waiting for an idle time to perform the transfer. Comment More infoAdvertise with us Next Article Direct Memory Access malirevdwm7 Follow Improve Article Tags : Operating Systems Geeks Premier League Geeks Premier League 2023 Similar Reads Direct Memory Access in OS During transferring the data process, involves processors, memory, and input-output devices. The transfer starts when the processor initiates it and ends upon storage of the data. Therefore, the processorâs load increases and should be constant to keep its efficiency high. While a station master ass 7 min read Ultra Direct Memory Access Ultra Direct Memory Access (UDMA) is a protocol used as part of high-speed technology for data transfer from a computer's memory to the hard drive, SSD, or other storage media. In this way, data rates and system performance are greatly maximized by using a direct channel between storage and main mem 6 min read What is Secure Remote Access? Secure remote access, As the name suggests secure means it secures our applications or business-related information. It prevents the loss of sensitive information or data. In this article, we will cover a brief explanation of secure remote access and how it works, What technologies are used for Secu 9 min read Access Types in DBMS Access is a database management system that is a part of the Microsoft 365 suite and a database in Access is comprised of four objects: table, query, form, and report. In this article, we will discuss all these objects in brief and will understand what is the contribution of each object type in a re 3 min read Access Matrix in Operating System An Access Matrix is a digital model utilized to control and manage permissions. This model defines the rights each user has for different resources. In simple terms, itâs a table that shows what actions an individual or a group of users can perform on specific objects within a system.It represents t 6 min read AWS Direct Connect AWS Direct Connect enables a direct, dedicated connection between your internal network and AWS, bypassing internet service providers for a faster, more secure link. This setup uses a high-speed Ethernet fiber-optic cable which connects directly from your network's router to an AWS Direct Connect ro 9 min read What is Network Access Control? Network Access Control (NAC) is a security solution that uses a set of protocols to prevent unauthorized users and devices from accessing a private network or to grant restricted access to devices that comply with network security policies. It is also known as Network Admission Control.NAC is respon 5 min read File Access Modes in COBOL COBOL an acronym for Common Business Oriented Language is a computer programming language, which was designed for business use. In COBOL, file access modes are used to specify how to access data from various file organizations according to requirements. In COBOL, there are 3 types of file organizati 3 min read File Access Methods in Operating System File access methods in an operating system are the techniques and processes used to read from and write to files stored on a computer's storage devices. There are several ways to access this information in the file. Some systems provide only one access method for files. Other systems, such as those 10 min read File Accessing Models in Distributed System In Distributed File Systems (DFS), multiple machines are used to provide the file systemâs facility. Different file system utilize different conceptual models of a file. The two most usually involved standards for file modeling are structure and modifiability. File models in view of these standards 4 min read Like