Professional Documents
Culture Documents
What Is Direct Memory Access (DMA) Controllers
What Is Direct Memory Access (DMA) Controllers
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
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.
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)