0% found this document useful (0 votes)
6 views3 pages

DMA

Direct Memory Access (DMA) allows hardware subsystems to access system memory independently of the CPU, enhancing performance during I/O operations. The DMA controller manages data transfers between I/O devices and memory, freeing the CPU for other tasks and signaling completion via interrupts. Additionally, the memory management system organizes memory allocation, paging, virtual memory, protection, and swapping to optimize program execution.

Uploaded by

Jenisha K R
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)
6 views3 pages

DMA

Direct Memory Access (DMA) allows hardware subsystems to access system memory independently of the CPU, enhancing performance during I/O operations. The DMA controller manages data transfers between I/O devices and memory, freeing the CPU for other tasks and signaling completion via interrupts. Additionally, the memory management system organizes memory allocation, paging, virtual memory, protection, and swapping to optimize program execution.

Uploaded by

Jenisha K R
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/ 3

**Direct Memory Access (DMA)** is a feature in computer systems that

allows certain hardware subsystems to access the system memory


independently of the CPU. The primary purpose of DMA is to enable devices
like hard drives, sound cards, and network cards to send or receive data
directly to or from memory without the need for constant CPU intervention.
This greatly improves system performance, especially in I/O operations.

### **Working of DMA:**

1. **CPU Initiates the Transfer**: The CPU initiates the DMA transfer by
informing the DMA controller (DMAC) about the source, destination
addresses, and the size of the data to be transferred.

2. **DMA Controller Takes Over**: Once the transfer is set up, the DMA
controller takes over the responsibility of handling the data transfer,
freeing the CPU to perform other tasks.

3. **Data Transfer**: The DMAC then handles the data transfer directly
between the I/O device and the memory. It uses the system’s data bus
to transfer data.

4. **Interrupt to CPU**: Once the transfer is complete, the DMA controller


interrupts the CPU, signaling that the transfer is done. This allows the
CPU to continue with post-transfer processing if necessary.

### **Diagram of DMA Working:**

```

+----------------+ +-------------------+
| CPU | | Memory |

+-------^--------+ +-------------------+

| ^

V |

+----------------+ +-------+--------+

| DMA Controller | >| I/O Device |

| | | (e.g., HDD) |

+----------------+ +----------------+

```

- The **CPU** only sets up the transfer and the **DMA Controller** handles
the bulk of the data movement between **I/O Devices** (such as hard drives
or network cards) and the **Memory**.

- Once the transfer is complete, the DMA controller sends an interrupt signal
to the CPU, informing it that the data transfer is done.

### **Types of DMA Transfers**:

1. **Burst Mode**: The DMA controller transfers a block of data all at once
and then relinquishes control of the system bus.

2. **Cycle Stealing**: The DMA controller takes control of the bus for each
data transfer cycle, temporarily pausing the CPU.

3. **Transparent Mode**: The DMA controller transfers data only when the
CPU is not using the system bus, effectively making the DMA transfer
“invisible” to the CPU.

### **Memory Management System**:


The memory management system in a computer handles the organization
and allocation of memory resources during program execution. The main
responsibilities of the memory management system are:

1. **Memory Allocation**: Assigning memory space to programs and


ensuring each process has its own private memory space.

2. **Paging and Segmentation**: Dividing memory into pages or


segments to ensure efficient use of RAM and allowing processes to be
loaded into different physical locations.

3. **Virtual Memory**: Extending the available physical memory by using


disk space, enabling systems to run larger programs than the physical
memory would allow.

4. **Memory Protection**: Ensuring that processes cannot interfere with


each other by accessing memory regions they don’t own.

5. **Swapping**: Temporarily moving processes out of physical memory


to disk storage when there’s insufficient memory, and bringing them
back when needed.

In conclusion, DMA offloads data transfer tasks from the CPU to the DMA
controller, improving system efficiency during data transfers. The memory
management system plays a crucial role in handling memory allocation,
protection, and optimization for efficient program execution.

You might also like