Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
Co-Processor | Computer Architecture
Next article icon

Direct Memory Access (DMA) Controller in Computer Architecture

Last Updated : 18 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

In modern computer systems, transferring data between input/output devices and memory can be a slow process if the CPU is required to manage every step. To address this, a Direct Memory Access (DMA) Controller is utilized.

A Direct Memory Access (DMA) Controller solves this by allowing I/O devices to transfer data directly to memory, reducing CPU involvement. This increases system efficiency and speeds up data transfers, freeing the CPU to focus on other tasks. DMA controller needs the same old circuits of an interface to communicate with the CPU and Input/Output devices. 

DMA Controller

Direct Memory Access (DMA) uses hardware for accessing the memory. This hardware is called a DMA Controller. It has the work of transferring the data between input, output devices and main memory with very less interaction with the processor. The Direct Memory Access Controller is a control unit, which has the work of transferring data.

DMA Controller in Computer Architecture

DMA Controller is a type of control unit that works as an interface for the data bus and the I/O Devices. As mentioned, DMA Controller has the work of transferring the data without the intervention of the processors, processors can control the data transfer. DMA Controller also contains an address unit, which generates the address and selects an I/O device for the transfer of data. Below is the block diagram of the DMA Controller.

DMA_
Block Diagram of DMA Controller

Types of Direct Memory Access (DMA)

There are four popular types of DMA.

  • Single-Ended DMA: In this type, the DMA controller is connected only to one device (usually either the memory or the I/O device), and it directly controls data transfer.
  • Dual-Ended DMA: The DMA controller is connected to both the source and the destination, typically memory and an I/O device.
  • Arbitrated-Ended DMA: In systems with multiple DMA devices or masters, arbitration is needed to decide which device gets control of the bus. It is more advanced than Dual-Ended DMA.
  • Interleaved DMA: Interleaved DMA are those DMA that read from one memory address and write from another memory address.

Working of DMA Controller

The DMA controller registers have three registers as follows.

  • Address register: It contains the address to specify the desired location in memory.
  • Word count register: It contains the number of words to be transferred.
  • Control register: It specifies the transfer mode.

All registers in the DMA appear to the CPU as I/O interface registers. Therefore, the CPU can both read and write into the DMA registers under program control via the data bus.

The figure below shows the block diagram of the DMA controller. The unit communicates with the CPU through the data bus and control lines. Through the use of the address bus and allowing the DMA and RS register to select inputs, the register within the DMA is chosen by the CPU.

RD and WR are two-way inputs. When BG (bus grant) input is 0, the CPU can communicate with DMA registers. When BG (bus grant) input is 1, the CPU has relinquished the buses and DMA can communicate directly with the memory.

Working Diagram of DMA Controller
Working Diagram of DMA Controller

The CPU initializes the DMA by sending the given information through the data bus.

  • The starting address of the memory block where the data is available (to read) or where data are to be stored (to write).
  • It also sends word count which is the number of words in the memory block to be read or written.
  • Control to define the mode of transfer such as read or write.
  • A control to begin the DMA transfer

Modes of Data Transfer in DMA

There are 3 modes of data transfer in DMA that are described below.

Burst Mode

  • In Burst Mode, the DMA controller takes full control of the system bus and transfers the entire block of data in one go.
  • The bus is not handed back to the CPU until the entire data transfer is complete.
  • This mode is efficient for large data transfers but can delay CPU operations.

Transparent Mode

  • In Transparent Mode, the DMA controller transfers data only when the CPU is not using the system bus.
  • It effectively sneaks in transfers during idle CPU cycles, ensuring the CPU is never interrupted.
  • Best when CPU performance is critical and some delay in data transfer is acceptable.

Cycle Stealing Mode

  • In Cycle Stealing Mode, the DMA controller transfers one byte (or word) at a time and then releases control of the bus back to the CPU.
  • This mode generates frequent bus requests but allows the CPU to execute instructions in between DMA transfers.
  • Useful when the DMA task is important but should not entirely block the CPU, such as in audio or video streaming.

Advantages of DMA Controller

  • DMA speeds up memory operations and data transfers by allowing peripherals to communicate directly with memory, bypassing the CPU.
  • During data transfer, the CPU is not involved, which significantly reduces its workload.
  • Operates efficiently, requiring very few clock cycles to complete data transfers.
  • It distributes workload very appropriately.
  • By offloading data movement tasks from the CPU, DMA distributes the overall system workload more effectively

Disadvantages of DMA Controller

  • Costly operation due to the need for additional hardware and control logic.
  • Suffers from Cache-Coherence Problems.
  • It increases the overall cost of the system.
  • It increases the complexity of the software.

Next Article
Co-Processor | Computer Architecture
author
tarunsinghwap7
Improve
Article Tags :
  • Computer Organization & Architecture
  • Computer Organization and Architecture

Similar Reads

  • 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 transfe
    3 min read
  • Computer Organization and Architecture Tutorial
    In this Computer Organization and Architecture Tutorial, you’ll learn all the basic to advanced concepts like pipelining, microprogrammed control, computer architecture, instruction design, and format. Computer Organization and Architecture is used to design computer systems. Computer architecture i
    5 min read
  • Differences between Computer Architecture and Computer Organization
    Computer Architecture refers to the design and functional aspects of a computer system, such as the instruction set and processor. Computer Organization deals with the physical implementation and interconnection of hardware components. Computer ArchitectureComputer architecture is the functional des
    4 min read
  • Co-Processor | Computer Architecture
    Introduction :If in microprocessor chip, new circuitry can be added with special purpose to perform special tasks or to perform operations on numbers in order to offload the work of the core CPU. The CPU can then work faster. We may use a conveyor belt to do some extra work while motor is running. S
    4 min read
  • Memory Organisation in Computer Architecture
    Memory organization is essential for efficient data processing and storage. The memory hierarchy ensures quick access to data by the CPU, while larger, slower storage devices hold data for the long term. Effective memory management ensures the system operates efficiently, providing programs with the
    3 min read
  • Computer Organization - Von Neumann architecture
    Computer Organization is like understanding the "blueprint" of how a computer works internally. One of the most important models in this field is the Von Neumann architecture, which is the foundation of most modern computers. Named after John von Neumann, this architecture introduced the concept of
    6 min read
  • 68000 Family Registers and Addressing In Computer Architecture
    The 68000 processor is characterized by a 16-bit external word length as the processor chip has 16 data pins for connection to the memory. However, data are manipulated inside the processor in registers that contain the 32 bits. Other models for this family are 68020, 68030, and 68040 processors., w
    5 min read
  • Handler's Classification in Computer Architecture
    In 1977, Wolfgang Handler presented a computer architectural classification scheme for determining the degree of parallelism and pipelining built into the computer system hardware. Parallel systems are complicated to the program as compared to the single processor system because parallel system arch
    3 min read
  • Difference between Von Neumann and Harvard Architecture
    Von Neumann and Harvard architectures are the two basic models in the field of computer architecture, explaining the organization of memory and processing units in a computer system. For those involved in Computer Science or working in companies providing computing technologies, it is essential to u
    5 min read
  • Hardware architecture (parallel computing)
    Let's discuss about parallel computing and hardware architecture of parallel computing in this post. Note that there are two types of computing but we only learn parallel computing here. As we are going to learn parallel computing for that we should know following terms. Era of computing - The two f
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences