You are on page 1of 15

IKB20803 - COMPUTER ORGANIZATION

I/O Accessing
Technique -
Direct Memory Access
(DMA) Controllers
AZ DANIEL EDRYSHAH BIN ZAMRI (52215121990)
ALYA SABRINA BINTI ADMAN RIZAL (52224121801)
MUHAMMAD HAZIQ SYAUQI BIN ZAIDON (52215109016)
Table of Content

DMA
INTRODUCTION
CONCEPT
WHAT IS DMA?
OVERALL PROCESS IN DIRECT
MEMORY ACCESS (DMA) CONTROLLERS
(WITH EXAMPLE)
- FUNCTION
- ADVANTAGES AND DISADVANTAGES
OF DMA CONTROLLER

DIRECT MEMORY ACCESS EXAMPLE OF DMA USAGE


CONCLUSION
REFERRENCE
Introduction
DIRECT MEMORY ACCESS (DMA) is a
feature in a computer system that assists
the CPU in completing certain tasks by
allowing access to primary memory
without the CPU. DMA has several
funtions proving it to be incredibly
significant especially with emerging
technology that need to perform multiple
tasks at the same time with high speeds
and efficiency .Let's discuss this topic !.
What is DMA concept ?
Direct memory access (DMA) is a mode of data transfer between the memory
and I/O devices. This happens without the involvement of the processor. We
have two other methods of data transfer, programmed I/O and Interrupt driven
I/O. DMA controller completes this task at a faster rate and is also effective for
transfer of large data block.
What is Direct
Memory Access Controllers (DMAC)?
What is Direct
Memory Access Controllers (DMAC)?
DMA CONTROLLER IS A HARDWARE
DEVICE THAT ALLOWS I/O DEVICES TO
DIRECTLY ACCESS MEMORY WITH
LESS PARTICIPATION OF THE
PROCESSOR. DMA CONTROLLER
NEEDS THE SAME OLD CIRCUITS OF
AN INTERFACE TO COMMUNICATE
WITH THE CPU AND INPUT/OUTPUT
DEVICES.

Overall process in
Direct Memory Access
(DMA) Controllers
How does the DMA & DMAC 3. ACKNOWLEDGEMENT

Function? 2. TRANSFER
Once that is done,
Disk controller
will send signal to
1. REQUEST Disk Controller then
DMAC stating that
stores this data
The CPU initiates process is done.
into the BUFFER
the data transfer
(temporary storage When that is
by setting up the
unit). This allows acknowledged, DMAC
DMAC's registers,
the DMA to read and
aka ADDRESS, COUNT reduces count and
write external
& CONTROL SIGNALS. repeats process until
devices.
The CPU then byte count = 0.
An interrupt is then
instructs the Disk DMAC request Disk
sent to CPU and CPU
Controller to read Controller to
sends a message to
data from external transfer data from
user saying data
storage. buffer to Memory.
transfer is complete.
Modes of Function
Burst Mode Cycle Stealing Mode
- Entire block of data is transferred in one
- Used in systems where CPU should not be
sequence
disabled for the length of time needed for
- Once the DMAC is granted access to the
burst transfer
system bus by the CPU, it transfers all bytes
- After one unit of data transfer, the control
of data in the data block before releasing
of the system bus is deasserted to the CPU via
control of the system buses back to the CPU.
Bus Grant.
- It is then continually requested again via
Transparent Mode Bus Request until the entire block of data has
been transferred.
- Takes most time but is effficient in overall - Not as quick but CPU is not left idled for
performance. such a long time.
- DMAC transfers data only when the CPU is
performing operations that don't use system
buses
To access memory, Input-output need to
go to CPU first before go to memory.
Which this require 2 cycles.

The direct connection between input-


output to memory is implemented. Which
can be done in 1 cycle.
1. CPU will program DMA controller by
setting its registers.
2. Then CPU give instruction to disk
controller to read data from drive
and store in buffer.
3. When there is data in buffer, DMA
controller will request Disk Controller
to transfer data to the memory.
4. Disk controller sent
acknowledgement to DMA Controller
where it will decrease the Count and
it will check whether bit count equal
to 0 or not.
5. The final step, DMA controller sent
interrupt to CPU to tell the transfer
have been done.
Advantages and Disadvantages of DMA Controller

Advantages:
Transferring the info while not the involvement of the processor will speed up the
scan-write task.
DMA reduces the clock cycle requires to read or write a block of data.
Implementing DMA also reduces the overhead of the processor.

Disadvantages :
As it’s a hardware unit, it would cost to implement a DMA controller within the
system.
Cache coherence problem can occur whereas mistreatment DMA controller.
Disk Controller Examples Graphics Card

of
DMA
Network Card usage in Sound Card

devices
Conclusions
Direct Memory Access (DMA) allows peripheral devices
(PCI) to write/read from memory without requiring the CPU
to copy/move the data (one of the reasons old computers
simply cannot handle too much network traffic, or storage
devices, etc). DMA works by the CPU simply pointing the
starting address and size of a memory block to the target
device, then firing a command for it to consume the data
and do its thing on its own, then raising an interrupt when
it's finished. If a device wishes to write to memory, it sends a
message asking for a specified block size, the CPU specifies
the block, the device copies the data, and an interrupt is
raised.
References
1. Computer Organization and Architecture
(Designing for Performance ) Eight Edition
by William Stallings
2. Wikipedia - Direct Memory Access
(https://en.wikipedia.org/wiki/Direct_memo
ry_access)
3. binaryterms - Direct Memory Access
(DMA) (https://binaryterms.com/direct-
memory-access-dma.html)
4. sciencedirect - Direct Memory Access
(https://www.sciencedirect.com/topics/comp
uter-science/direct-memory-access)

You might also like