SlideShare a Scribd company logo
1 of 21
2
DIRECT MEMORY ACCESS
(DMA)
GROUP MEMBERS:
ZUBAIR KHALID 15-CP-41
SYED MUHAMMAD NOOR-UL-HUDA SHAH 15-CP-97
SARFRAZ SAJJAD 15-CP-109
M&I PRESENTATION:
“DIRECT MEMORY ACCESS (DMA) IS A FEATURE OF
COMPUTERIZED SYSTEMS THAT ALLOWS CERTAIN
HARDWARE SUBSYSTEMS TO ACCESS MAIN
SYSTEM MEMORY INDEPENDENTLY OF
THE CENTRAL PROCESSING UNIT (CPU).”
-WIKIPEDIA
“Direct memory access (DMA) is a
means of having a peripheral device
control a processor's memory bus
directly.”
• The direct memory access (DMA) I/O technique provides direct
access to the memory while the microprocessor is temporarily
disabled.
• I/O devices are connected to system bus via a special interference
circuit known as “DMA Controller”.
• In DMA, both CPU and DMA controller have access to main
memory via a shared system bus having data, address and control
lines.
• It is sometimes referred to as a channel. In an alternate
configuration, the DMA controller may be incorporated directly
into the I/O device.
What is DMA?
• A DMA controller temporarily borrows the address bus, data bus,
and control bus from the microprocessor and transfers the data
bytes directly between an I/O port and a series of memory
locations.
• The DMA transfer is also used to do high-speed memory-to
memory transfers.
• DMA transfer can be done in tow ways. A) DMA Transfer Blocks.
B) Cycle Stealing
What is DMA?
Processor Main Memory
Disk
Printer Keyboard
DMA
Controller
Disk
USE OF DMA CONTROLLERS IN A
COMPUTER SYSTEM
Network
Interface
Disk/DMA
Controller
• An important aspect of governing the Computer System
performance is the transfer of data between memory and I/O
devices.
• The operation involves loading programs or data files from disk
into memory, saving file on disk, and accessing virtual memory
pages on any secondary storage medium.
• The process would be much quicker if we could bypass the CPU &
transfer data directly from the I/O device to memory. Direct
Memory Access does exactly that.
• During DMA transfer, the CPU is idle and no control of the
memory buses.
Why DMA?
DMA VS. NO DMA
Without DMA With DMA
When the CPU is using programmed
input/output, it is typically fully
occupied for the entire duration of
the read or write operation, and is
thus unavailable to perform other
work.
The CPU initiates the transfer, does
other operations while the transfer
is in progress, and receives
an interrupt from the DMA
controller when the operation is
done.
This feature is useful any time the CPU cannot
keep up with the rate of data transfer, or where
the CPU needs to perform useful work while
waiting for a relatively slow I/O data transfer.
DMA INITIALIZATION
DMA controllers require initialization by software.
Typical setup parameters include the base address of
the source area, the base address of the destination
area, the length of the block, and whether the DMA
controller should generate a processor interrupt once
the block transfer is complete.
TYPES OF DMA TRANSFER:
1. DMA TRANSFER BLOCK
• In this DMA mode , DMA controller is master of memory bus.
• This mode is needed by the secondary memory like disk drives,
that have data transmission and are no to be stopped or slowed
without any loss of data transfer of blocks.
• Block DMA transfer supports faster I/O data transfer rates but
the CPU remains inactive for relatively long period by tieing up
the system bus.
2.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
• It is completely eliminated by designing DMA interface so that
system bus cycles are stolen only when CPU is not actually
using system bus.
• This is also called as Transparent DMA
DMA DATA TRANSFER: BLOCK DIAGRAM
DATA TRANSFER: BLOCK COMPONENTS
• Two control signals are used to request and acknowledge a DMA
transfer .
• The HOLD signal is a bus request (BR) signal which asks the
microprocessor to release control of the buses after the current bus
cycle.
• The HLDA signal is a bus grant (BG) signal which indicates that the
microprocessor has indeed released control of its buses by placing
the buses at their high-impedance states.
• DREQi (DMA request): Used to request a DMA transfer for a particular
DMA channel.
• DACKi (DMA channel acknowledge): Acknowledges a channel DMA
INTERNAL CONFIGURATION OF
DMA CONTROLLER
The DMA controller includes several internal registers :-
• The DMA Address Register contains the memory address to be used
in the data transfer. The CPU treats this signal as one or more output
ports.
• The DMA Count Register, also called Word Count Register, contains
the number of bytes of data to be transferred. Like the DMA address
register, it too is treated as an O/P port (with a different address) by
the CPU.
• The DMA Control Register accepts commands from the CPU. It is
also treated as an O/P port by the CPU.
DMA DATA TRANSFER
Data transfer technique directly between memory and I/O device
Steps:
1. I/O device asserts DREQ signal.
2. DMA controller sends HOLD signal to CPU
3. CPU sends HLDA back to DMA controller
4. DMA controller give DMA acknowledgment back to I/O.
DMA DATA TRANSFER
5. DMA controller places memory address on address bus
6. DMA controller updates memory address register and word
counter register
7. When DC register becomes zero ,DMA controller sets
HOLD=0
8. Data transfer process terminates and processor regain control
of system
bus.
OS INVOLVED
• I/O operations are always performed by the OS in response to a request
from an application program.
• OS is also responsible for suspending the execution of one program and
starting another.
OS puts the program that requested the transfer in the Blocked state,
initiates the DMA operation,
starts execution of another program.
• When the transfer is complete, the DMA controller informs the processor by
sending an interrupt request.
OS puts suspended program in the Runnable state so that it can be
selected by the scheduler to continue execution.
ADVANTAGES OF DMA
• DMA allows a peripheral device to read from/write to memory
without going through the CPU
• DMA allows for faster processing since the processor can be
working on something else while the peripheral can be
populating memory.
DISADVANTAGES OF DMA
• DMA transfer requires a DMA controller to carry out the
operation, hence cost of the system increases.
• Cache Coherence problems.
CACHE COHERENCE PROBLEM
Cache coherency refers to the inconsistency of data stored in
local caches of a shared resource and data stored in memory.

More Related Content

What's hot

Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationMOHIT AGARWAL
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transferpriya Nithya
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Stack organization
Stack organizationStack organization
Stack organizationchauhankapil
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulationSanjeev Patel
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitabdosaidgkv
 

What's hot (20)

Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output Organization
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Asynchronous data transfer
Asynchronous data transferAsynchronous data transfer
Asynchronous data transfer
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Memory management
Memory managementMemory management
Memory management
 
Interrupts
InterruptsInterrupts
Interrupts
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Stack organization
Stack organizationStack organization
Stack organization
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 

Similar to Direct memory access (dma)

fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhjfathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhjKashinathvpillai
 
coadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptxcoadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptxKashinathvpillai
 
Direct Memory Access (DMA).pptx
Direct Memory Access (DMA).pptxDirect Memory Access (DMA).pptx
Direct Memory Access (DMA).pptxAbidShahriar3
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237Ashwini Awatare
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessWBUTTUTORIALS
 
DMA airctecture.pptx
DMA airctecture.pptxDMA airctecture.pptx
DMA airctecture.pptxsuryansh85
 
Module 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingModule 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingDeepak John
 
discuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfdiscuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfinfo998421
 
DMA Controller Presentation
DMA Controller PresentationDMA Controller Presentation
DMA Controller PresentationWaddaMalik
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257MdFazleRabbi18
 
Dma data transfer
Dma data transferDma data transfer
Dma data transferchemjor83
 

Similar to Direct memory access (dma) (20)

fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhjfathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
 
coadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptxcoadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptx
 
Direct Memory Access (DMA).pptx
Direct Memory Access (DMA).pptxDirect Memory Access (DMA).pptx
Direct Memory Access (DMA).pptx
 
Direct access memory
Direct access memoryDirect access memory
Direct access memory
 
Direct access memory
Direct access memoryDirect access memory
Direct access memory
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
ppppptttt.pdf
ppppptttt.pdfppppptttt.pdf
ppppptttt.pdf
 
1 STM32's DMA.ppt
1 STM32's DMA.ppt1 STM32's DMA.ppt
1 STM32's DMA.ppt
 
DMA airctecture.pptx
DMA airctecture.pptxDMA airctecture.pptx
DMA airctecture.pptx
 
Module 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingModule 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacing
 
DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]
 
discuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfdiscuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdf
 
DMA Controller Presentation
DMA Controller PresentationDMA Controller Presentation
DMA Controller Presentation
 
Dma
DmaDma
Dma
 
DMA
DMADMA
DMA
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
Dma data transfer
Dma data transferDma data transfer
Dma data transfer
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

Direct memory access (dma)

  • 1. 2
  • 2. DIRECT MEMORY ACCESS (DMA) GROUP MEMBERS: ZUBAIR KHALID 15-CP-41 SYED MUHAMMAD NOOR-UL-HUDA SHAH 15-CP-97 SARFRAZ SAJJAD 15-CP-109 M&I PRESENTATION:
  • 3. “DIRECT MEMORY ACCESS (DMA) IS A FEATURE OF COMPUTERIZED SYSTEMS THAT ALLOWS CERTAIN HARDWARE SUBSYSTEMS TO ACCESS MAIN SYSTEM MEMORY INDEPENDENTLY OF THE CENTRAL PROCESSING UNIT (CPU).” -WIKIPEDIA “Direct memory access (DMA) is a means of having a peripheral device control a processor's memory bus directly.”
  • 4. • The direct memory access (DMA) I/O technique provides direct access to the memory while the microprocessor is temporarily disabled. • I/O devices are connected to system bus via a special interference circuit known as “DMA Controller”. • In DMA, both CPU and DMA controller have access to main memory via a shared system bus having data, address and control lines. • It is sometimes referred to as a channel. In an alternate configuration, the DMA controller may be incorporated directly into the I/O device. What is DMA?
  • 5. • A DMA controller temporarily borrows the address bus, data bus, and control bus from the microprocessor and transfers the data bytes directly between an I/O port and a series of memory locations. • The DMA transfer is also used to do high-speed memory-to memory transfers. • DMA transfer can be done in tow ways. A) DMA Transfer Blocks. B) Cycle Stealing What is DMA?
  • 6. Processor Main Memory Disk Printer Keyboard DMA Controller Disk USE OF DMA CONTROLLERS IN A COMPUTER SYSTEM Network Interface Disk/DMA Controller
  • 7. • An important aspect of governing the Computer System performance is the transfer of data between memory and I/O devices. • The operation involves loading programs or data files from disk into memory, saving file on disk, and accessing virtual memory pages on any secondary storage medium. • The process would be much quicker if we could bypass the CPU & transfer data directly from the I/O device to memory. Direct Memory Access does exactly that. • During DMA transfer, the CPU is idle and no control of the memory buses. Why DMA?
  • 8. DMA VS. NO DMA Without DMA With DMA When the CPU is using programmed input/output, it is typically fully occupied for the entire duration of the read or write operation, and is thus unavailable to perform other work. The CPU initiates the transfer, does other operations while the transfer is in progress, and receives an interrupt from the DMA controller when the operation is done. This feature is useful any time the CPU cannot keep up with the rate of data transfer, or where the CPU needs to perform useful work while waiting for a relatively slow I/O data transfer.
  • 9. DMA INITIALIZATION DMA controllers require initialization by software. Typical setup parameters include the base address of the source area, the base address of the destination area, the length of the block, and whether the DMA controller should generate a processor interrupt once the block transfer is complete.
  • 10.
  • 11. TYPES OF DMA TRANSFER: 1. DMA TRANSFER BLOCK • In this DMA mode , DMA controller is master of memory bus. • This mode is needed by the secondary memory like disk drives, that have data transmission and are no to be stopped or slowed without any loss of data transfer of blocks. • Block DMA transfer supports faster I/O data transfer rates but the CPU remains inactive for relatively long period by tieing up the system bus.
  • 12. 2.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 • It is completely eliminated by designing DMA interface so that system bus cycles are stolen only when CPU is not actually using system bus. • This is also called as Transparent DMA
  • 13. DMA DATA TRANSFER: BLOCK DIAGRAM
  • 14. DATA TRANSFER: BLOCK COMPONENTS • Two control signals are used to request and acknowledge a DMA transfer . • The HOLD signal is a bus request (BR) signal which asks the microprocessor to release control of the buses after the current bus cycle. • The HLDA signal is a bus grant (BG) signal which indicates that the microprocessor has indeed released control of its buses by placing the buses at their high-impedance states. • DREQi (DMA request): Used to request a DMA transfer for a particular DMA channel. • DACKi (DMA channel acknowledge): Acknowledges a channel DMA
  • 15. INTERNAL CONFIGURATION OF DMA CONTROLLER The DMA controller includes several internal registers :- • The DMA Address Register contains the memory address to be used in the data transfer. The CPU treats this signal as one or more output ports. • The DMA Count Register, also called Word Count Register, contains the number of bytes of data to be transferred. Like the DMA address register, it too is treated as an O/P port (with a different address) by the CPU. • The DMA Control Register accepts commands from the CPU. It is also treated as an O/P port by the CPU.
  • 16. DMA DATA TRANSFER Data transfer technique directly between memory and I/O device Steps: 1. I/O device asserts DREQ signal. 2. DMA controller sends HOLD signal to CPU 3. CPU sends HLDA back to DMA controller 4. DMA controller give DMA acknowledgment back to I/O.
  • 17. DMA DATA TRANSFER 5. DMA controller places memory address on address bus 6. DMA controller updates memory address register and word counter register 7. When DC register becomes zero ,DMA controller sets HOLD=0 8. Data transfer process terminates and processor regain control of system bus.
  • 18. OS INVOLVED • I/O operations are always performed by the OS in response to a request from an application program. • OS is also responsible for suspending the execution of one program and starting another. OS puts the program that requested the transfer in the Blocked state, initiates the DMA operation, starts execution of another program. • When the transfer is complete, the DMA controller informs the processor by sending an interrupt request. OS puts suspended program in the Runnable state so that it can be selected by the scheduler to continue execution.
  • 19. ADVANTAGES OF DMA • DMA allows a peripheral device to read from/write to memory without going through the CPU • DMA allows for faster processing since the processor can be working on something else while the peripheral can be populating memory.
  • 20. DISADVANTAGES OF DMA • DMA transfer requires a DMA controller to carry out the operation, hence cost of the system increases. • Cache Coherence problems.
  • 21. CACHE COHERENCE PROBLEM Cache coherency refers to the inconsistency of data stored in local caches of a shared resource and data stored in memory.