TOPIC : DIRECT ACCESS MEMORY
GOVERNMENT COLLEGE WOMEN UNIVERSITY
FAISALABAD
DMA Definition
 DMA stands for Direct memory access and is a
method of transferring data from the computers RAM
to another part of the computer without processing it
using the CPU.
 Direct memory access (DMA) is a feature of
computer systems that allows certain hardware
subsystems to access main system memory.
 DMA normally occur between an I/O device and
memory.
12/18/2017
2
Functions of DMA
 DMA read transfers data from the memory to the I/O
device.
 A DMA write transfers data from an I/O device to memory.
 Memory & I/O are controlled simultaneously.
 DMA can save processing time and it is a more efficient way
to move data from the computer's memory to other devices.
12/18/2017
3
WORKING OF DMA
 In order to transfer data ,each type of port on a
computer has a set of DMA channels that can be
assigned to each connected device.
 For example, a PCI controller and a hard drive
controller each have their own set of DMA
channels.
 PCI stands for Peripheral Component
Interconnect and is an industry standard bus for
attaching peripheral devices to a computer
4
I/O controller
 To provide control signals to the I/O device a I/O controller
is required.
 No I/O device is directly connected to the CPU.
 I/O controller is located between the CPU and the I/O
device.
 The keyboard is not directly connected to CPU rather
its connected to a keyboard controller and the
keyboard controller is connected to the CPU.
5
12/18/2017
6
The HOLD pin is an input used to request a DMA action.
The HLDA pin is an output that acknowledges the DMA action •
7 DMA controller send HOLD signal to microprocessor
 Microprocessor Send HLDA to DMA Controller& DMA
Takes charge of system bus.
 DMA give DMAACK(back) signal to I/O devices
 Now, DMA controller places memory address on address
bus and data bytes from memory transfer to I/O .
 DMA Controller updates memory address register and
word count register.
 When internal count = 0 then DMA Controller sets
HOLD=0
 Now DMA controller send HLDA message to CPU of
task completion.
 The DMA Controller has several options available for the
transfer of data.
1. Cycle steal.
2. Burst transfer Hidden.
Cycle Stealing
In this method, system allows DMA controller to
use system bus to transfer one word, after which it should
return back control of bus to CPU.
This method reduces maximum I/O transfer rates.
It also reduces interference of DMA controller in CPU
memory access.
8
Burst transfer
 The DMA controller keeps control of the bus until all the
data buffered by the requesting device has been
transferred to memory.
9
ADVANTAGES OF DMA
 DMA enables more efficient use of interrupts.
 High transfer rates.
 Increases data throughput
 DMA supports faster CPUs than those devices without DMA
support.
 DMA-capable device can communicate directly with memory.
10
DISADVANTAGES OF DMA
 DMA hardware is complicated.
 Memory conflict between CPU and DMA.
 DMA transfer require a DMA controller to carry out
operation hence cost of system increase.
12/18/2017
11

Direct access memory

  • 1.
    TOPIC : DIRECTACCESS MEMORY GOVERNMENT COLLEGE WOMEN UNIVERSITY FAISALABAD
  • 2.
    DMA Definition  DMAstands for Direct memory access and is a method of transferring data from the computers RAM to another part of the computer without processing it using the CPU.  Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory.  DMA normally occur between an I/O device and memory. 12/18/2017 2
  • 3.
    Functions of DMA DMA read transfers data from the memory to the I/O device.  A DMA write transfers data from an I/O device to memory.  Memory & I/O are controlled simultaneously.  DMA can save processing time and it is a more efficient way to move data from the computer's memory to other devices. 12/18/2017 3
  • 4.
    WORKING OF DMA In order to transfer data ,each type of port on a computer has a set of DMA channels that can be assigned to each connected device.  For example, a PCI controller and a hard drive controller each have their own set of DMA channels.  PCI stands for Peripheral Component Interconnect and is an industry standard bus for attaching peripheral devices to a computer 4
  • 5.
    I/O controller  Toprovide control signals to the I/O device a I/O controller is required.  No I/O device is directly connected to the CPU.  I/O controller is located between the CPU and the I/O device.  The keyboard is not directly connected to CPU rather its connected to a keyboard controller and the keyboard controller is connected to the CPU. 5
  • 6.
    12/18/2017 6 The HOLD pinis an input used to request a DMA action. The HLDA pin is an output that acknowledges the DMA action •
  • 7.
    7 DMA controllersend HOLD signal to microprocessor  Microprocessor Send HLDA to DMA Controller& DMA Takes charge of system bus.  DMA give DMAACK(back) signal to I/O devices  Now, DMA controller places memory address on address bus and data bytes from memory transfer to I/O .  DMA Controller updates memory address register and word count register.  When internal count = 0 then DMA Controller sets HOLD=0  Now DMA controller send HLDA message to CPU of task completion.
  • 8.
     The DMAController has several options available for the transfer of data. 1. Cycle steal. 2. Burst transfer Hidden. Cycle Stealing In this method, system allows DMA controller to use system bus to transfer one word, after which it should return back control of bus to CPU. This method reduces maximum I/O transfer rates. It also reduces interference of DMA controller in CPU memory access. 8
  • 9.
    Burst transfer  TheDMA controller keeps control of the bus until all the data buffered by the requesting device has been transferred to memory. 9
  • 10.
    ADVANTAGES OF DMA DMA enables more efficient use of interrupts.  High transfer rates.  Increases data throughput  DMA supports faster CPUs than those devices without DMA support.  DMA-capable device can communicate directly with memory. 10
  • 11.
    DISADVANTAGES OF DMA DMA hardware is complicated.  Memory conflict between CPU and DMA.  DMA transfer require a DMA controller to carry out operation hence cost of system increase. 12/18/2017 11