SlideShare a Scribd company logo
DMA Versus
Polling or Interrupt Driven I/O
• Polling and Interrupt driven I/O concentrates on data
transfer between the processor and I/O devices.
• An instruction to transfer (mov datain,R0) only occurs
after the processor determines that the I/O device is
ready
– Either by polling a status flag in the device interface or
– Waits for the device to send an interrupt request.
• Considerable overhead is incurred, because several
program instructions must be executed for each data
word transferred.
• Instructions are needed to increment memory address
and keeping track of work count.
• With interrupts, additional overhead associated with
saving and restoring the program counter and other state
information.
Direct Memory Access (DMA)
• To transfer large blocks of data at high
speed, an alternative approach is used.
• Blocks of data are transferred between an
external device and the main memory,
without continuous intervention by the
processor.
DMA Controller
• DMA controller is part of the I/O interface.
• Performs the functions that would normally
be carried out by the processor when
access main memory. For each word
transferred, it provides the memory
address and all the bus signals that control
data transfer.
DMA Controller
• Although DMAC can transfer data without
intervention by the processor, it’s operation must
be under the control of a program executed by
the processor.
• To initiate the transfer of a block of data, the
processor sends the starting address, the
number of words in the block, and direction of
the transfer. Once information is received, the
DMAC proceeds to perform the requested
operation. When the entire block has been
transferred, the controller informs the processor
by raising an interrupt signal.
Processor Main Memory
Disk
Printer Keyboard
DMA
Controller
Disk
Use of DMA Controllers in a Computer
System
Network
Interface
Disk/DMA
Controller
How is 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.
Registers in a DMA Interface
Status and Control
Starting Address
Word Count
31 30 1 0
IRQ
IE
Done
R / W’
Cycle Stealing
• Requests by DMA devices for using the bus are alwas
given higher priority than processor requests.
• Among different DMA devices, top priority is given to
high-speed peripherals (disks, high-speed network
interface, graphics display device)
• Since the processor originates most memory access
cycles, it is often stated that DMA steals memory cycles
from the processor (cycle stealing).
• If DMA controller is given exclusive access to the main
memory to transfer a block of data without interruption,
this is called block or burst mode..
Buffers and Arbitration
• Most DMACs have a data storage buffer –
network interfaces receive data from main
memory at bus speed, send data onto
network at network speed.
• Bus Arbitration is needed to resolve
conflicts with more than one device (2
DMACs or DMA and processor, etc..) try
to use the bus to access main memory.
Bus Arbitration
• Bus Master – the device that is allowed to
initiate bus transfers on the bus at any
given time. When the current master
relinquishes control, another device can
acquire this status.
• Bus Arbitration – the process by which the
next device to become bus master is
selected and bus mastership is transferred
to it.
Arbitration Approaches
• Centralized – a single arbiter performs the
arbitration.
• Distributed – all devices participate in the
selection of the next bus master.
Centralized Arbitration
• Bus arbiter may be processor or a
separate unit connected to the bus.
Processor
DMA
Controller
1
DMA
Controller
2BG1 BG2
BR
BBSY
Distributed Arbitration
• No central arbiter used
• Each device on bus is assigned a 4-bit
identification number.
• When one or more devices request the bus, they
assert the Start-Arbitration signal and place their
4-bit ID number on ARB[3..0].
• The request that has the highest ID number
ends up having the highest priority.
• Advantages – offers higher reliability (operation
of the bus is not dependent on any one device).
• SCSI bus is an example of distributed
(decentralized) arbitration.

More Related Content

What's hot

Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionCésar de Souza
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
mahalakshmimalini
 
Direct Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and ImplementationDirect Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and Implementation
Shubham Kumar
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
UART
UARTUART
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
SharmilaChidaravalli
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
Kamal Acharya
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organizationchidabdu
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
Sanjay Saluth
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
cs19club
 
Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory system
Mazin Alwaaly
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
Kamal Acharya
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Chapter 7 memory & i/o
Chapter 7  memory & i/oChapter 7  memory & i/o
Chapter 7 memory & i/o
SHREEHARI WADAWADAGI
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
Sandesh Jonchhe
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
Andhra University
 
Bus aribration
Bus aribrationBus aribration
Bus aribration
Saiyam Agrawal
 
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
MOHIT AGARWAL
 
Cache memory
Cache memoryCache memory
Cache memory
George Thomas
 

What's hot (20)

Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 
Direct Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and ImplementationDirect Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and Implementation
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
UART
UARTUART
UART
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organization
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory system
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Chapter 7 memory & i/o
Chapter 7  memory & i/oChapter 7  memory & i/o
Chapter 7 memory & i/o
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Bus aribration
Bus aribrationBus aribration
Bus aribration
 
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
 
Cache memory
Cache memoryCache memory
Cache memory
 

Viewers also liked

DPA
DPADPA
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
Vijay Kumar
 
I/O Channel IBM 370
I/O Channel IBM 370I/O Channel IBM 370
I/O Channel IBM 370
Äkshäý M S
 
8051 memory
8051 memory8051 memory
8051 memory
Mayank Garg
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its typesNehal Naik
 
8085 interrupt.....
8085 interrupt.....8085 interrupt.....
8085 interrupt.....
Sanjoy Kumar Das
 
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
Shinya Takamaeda-Y
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
Ramasubbu .P
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
Ankit Bhatnagar
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
Nitin Ahire
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
daniemol
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
Vijay Kumar
 
Introduction to Interfacing Technique
Introduction to Interfacing TechniqueIntroduction to Interfacing Technique
Introduction to Interfacing Technique
Mabeth MaRiyah Ramos
 

Viewers also liked (20)

DPA
DPADPA
DPA
 
DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
I/O Channel IBM 370
I/O Channel IBM 370I/O Channel IBM 370
I/O Channel IBM 370
 
8051 memory
8051 memory8051 memory
8051 memory
 
Interrupts
InterruptsInterrupts
Interrupts
 
Fpga 02-memory-and-pl ds
Fpga 02-memory-and-pl dsFpga 02-memory-and-pl ds
Fpga 02-memory-and-pl ds
 
Input output module
Input output moduleInput output module
Input output module
 
Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
 
Dma
DmaDma
Dma
 
8085 interrupt.....
8085 interrupt.....8085 interrupt.....
8085 interrupt.....
 
memory 8051
memory  8051memory  8051
memory 8051
 
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
PyCoRAM: Yet Another Implementation of CoRAM Memory Architecture for Modern F...
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
 
07 Input Output
07  Input  Output07  Input  Output
07 Input Output
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
 
8086 Interrupts & With DOS and BIOS by vijay
8086 Interrupts &  With DOS and BIOS  by vijay8086 Interrupts &  With DOS and BIOS  by vijay
8086 Interrupts & With DOS and BIOS by vijay
 
Introduction to Interfacing Technique
Introduction to Interfacing TechniqueIntroduction to Interfacing Technique
Introduction to Interfacing Technique
 

Similar to Direct memory access

DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
sathish sak
 
A transfer from I/O device to memory requires the execution of several instru...
A transfer from I/O device to memory requires the execution of several instru...A transfer from I/O device to memory requires the execution of several instru...
A transfer from I/O device to memory requires the execution of several instru...
rsaravanakumar13
 
Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
Manoharan Ragavan
 
DMA operation
DMA operationDMA operation
DMA operation
Imran Khan
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
JavedIqbal549896
 
DMA Controller Presentation
DMA Controller PresentationDMA Controller Presentation
DMA Controller Presentation
WaddaMalik
 
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
Kashinathvpillai
 
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhjfathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
fathima.pptxjhvjhvjhvjhvhvjhchvhvjvjhvjhj
Kashinathvpillai
 
coadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptxcoadma-150401131446-conversion-gate01.pptx
coadma-150401131446-conversion-gate01.pptx
Kashinathvpillai
 
DMA
DMADMA
Direct access memory
Direct access memoryDirect access memory
Direct access memory
maliksiddique1
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzation
daxesh chauhan
 
computer system structure
computer system structurecomputer system structure
computer system structure
HAMZA AHMED
 
I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptx
webip34973
 
DMA
DMADMA
Ch 7 io_management & disk scheduling
Ch 7 io_management & disk schedulingCh 7 io_management & disk scheduling
Ch 7 io_management & disk scheduling
madhuributani
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4
Dr.MAYA NAYAK
 
Direct Memory Access ppt
Direct Memory Access pptDirect Memory Access ppt
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237Ashwini Awatare
 

Similar to Direct memory access (20)

DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
 
A transfer from I/O device to memory requires the execution of several instru...
A transfer from I/O device to memory requires the execution of several instru...A transfer from I/O device to memory requires the execution of several instru...
A transfer from I/O device to memory requires the execution of several instru...
 
Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
 
DMA operation
DMA operationDMA operation
DMA operation
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
DMA Controller Presentation
DMA Controller PresentationDMA Controller Presentation
DMA Controller Presentation
 
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
RIO DE JENERIO.pptxUIYYGUGUYUYGYGUYGUYGUYUYGUYGUYGUYGYUYG87H3IH8IU34THTGYGUYG...
 
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
 
DMA
DMADMA
DMA
 
Direct access memory
Direct access memoryDirect access memory
Direct access memory
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzation
 
computer system structure
computer system structurecomputer system structure
computer system structure
 
I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptx
 
DMA
DMADMA
DMA
 
Ch 7 io_management & disk scheduling
Ch 7 io_management & disk schedulingCh 7 io_management & disk scheduling
Ch 7 io_management & disk scheduling
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4
 
07 input output
07 input output07 input output
07 input output
 
Direct Memory Access ppt
Direct Memory Access pptDirect Memory Access ppt
Direct Memory Access ppt
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
 

More from WBUTTUTORIALS

Software testing-and-analysis
Software testing-and-analysisSoftware testing-and-analysis
Software testing-and-analysis
WBUTTUTORIALS
 
Query optimisation
Query optimisationQuery optimisation
Query optimisation
WBUTTUTORIALS
 
Fuzzy logic-introduction
Fuzzy logic-introductionFuzzy logic-introduction
Fuzzy logic-introduction
WBUTTUTORIALS
 
Failure mode-and-effects-analysis
Failure mode-and-effects-analysisFailure mode-and-effects-analysis
Failure mode-and-effects-analysis
WBUTTUTORIALS
 
Cost volume-profit-relationships
Cost volume-profit-relationshipsCost volume-profit-relationships
Cost volume-profit-relationships
WBUTTUTORIALS
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
WBUTTUTORIALS
 
Relational model
Relational modelRelational model
Relational model
WBUTTUTORIALS
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimization
WBUTTUTORIALS
 
Data communications-concepts
Data communications-conceptsData communications-concepts
Data communications-concepts
WBUTTUTORIALS
 
Ajax workshop
Ajax workshopAjax workshop
Ajax workshop
WBUTTUTORIALS
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-framework
WBUTTUTORIALS
 

More from WBUTTUTORIALS (12)

Software testing-and-analysis
Software testing-and-analysisSoftware testing-and-analysis
Software testing-and-analysis
 
Query optimisation
Query optimisationQuery optimisation
Query optimisation
 
Fuzzy logic-introduction
Fuzzy logic-introductionFuzzy logic-introduction
Fuzzy logic-introduction
 
Failure mode-and-effects-analysis
Failure mode-and-effects-analysisFailure mode-and-effects-analysis
Failure mode-and-effects-analysis
 
Cost volume-profit-relationships
Cost volume-profit-relationshipsCost volume-profit-relationships
Cost volume-profit-relationships
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
 
Relational model
Relational modelRelational model
Relational model
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimization
 
Data communications-concepts
Data communications-conceptsData communications-concepts
Data communications-concepts
 
Ajax workshop
Ajax workshopAjax workshop
Ajax workshop
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-framework
 
Ajax
AjaxAjax
Ajax
 

Recently uploaded

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 

Direct memory access

  • 1. DMA Versus Polling or Interrupt Driven I/O • Polling and Interrupt driven I/O concentrates on data transfer between the processor and I/O devices. • An instruction to transfer (mov datain,R0) only occurs after the processor determines that the I/O device is ready – Either by polling a status flag in the device interface or – Waits for the device to send an interrupt request. • Considerable overhead is incurred, because several program instructions must be executed for each data word transferred. • Instructions are needed to increment memory address and keeping track of work count. • With interrupts, additional overhead associated with saving and restoring the program counter and other state information.
  • 2. Direct Memory Access (DMA) • To transfer large blocks of data at high speed, an alternative approach is used. • Blocks of data are transferred between an external device and the main memory, without continuous intervention by the processor.
  • 3. DMA Controller • DMA controller is part of the I/O interface. • Performs the functions that would normally be carried out by the processor when access main memory. For each word transferred, it provides the memory address and all the bus signals that control data transfer.
  • 4. DMA Controller • Although DMAC can transfer data without intervention by the processor, it’s operation must be under the control of a program executed by the processor. • To initiate the transfer of a block of data, the processor sends the starting address, the number of words in the block, and direction of the transfer. Once information is received, the DMAC proceeds to perform the requested operation. When the entire block has been transferred, the controller informs the processor by raising an interrupt signal.
  • 5. Processor Main Memory Disk Printer Keyboard DMA Controller Disk Use of DMA Controllers in a Computer System Network Interface Disk/DMA Controller
  • 6. How is 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.
  • 7. Registers in a DMA Interface Status and Control Starting Address Word Count 31 30 1 0 IRQ IE Done R / W’
  • 8. Cycle Stealing • Requests by DMA devices for using the bus are alwas given higher priority than processor requests. • Among different DMA devices, top priority is given to high-speed peripherals (disks, high-speed network interface, graphics display device) • Since the processor originates most memory access cycles, it is often stated that DMA steals memory cycles from the processor (cycle stealing). • If DMA controller is given exclusive access to the main memory to transfer a block of data without interruption, this is called block or burst mode..
  • 9. Buffers and Arbitration • Most DMACs have a data storage buffer – network interfaces receive data from main memory at bus speed, send data onto network at network speed. • Bus Arbitration is needed to resolve conflicts with more than one device (2 DMACs or DMA and processor, etc..) try to use the bus to access main memory.
  • 10. Bus Arbitration • Bus Master – the device that is allowed to initiate bus transfers on the bus at any given time. When the current master relinquishes control, another device can acquire this status. • Bus Arbitration – the process by which the next device to become bus master is selected and bus mastership is transferred to it.
  • 11. Arbitration Approaches • Centralized – a single arbiter performs the arbitration. • Distributed – all devices participate in the selection of the next bus master.
  • 12. Centralized Arbitration • Bus arbiter may be processor or a separate unit connected to the bus. Processor DMA Controller 1 DMA Controller 2BG1 BG2 BR BBSY
  • 13. Distributed Arbitration • No central arbiter used • Each device on bus is assigned a 4-bit identification number. • When one or more devices request the bus, they assert the Start-Arbitration signal and place their 4-bit ID number on ARB[3..0]. • The request that has the highest ID number ends up having the highest priority. • Advantages – offers higher reliability (operation of the bus is not dependent on any one device). • SCSI bus is an example of distributed (decentralized) arbitration.