SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
I/O Management
     Intro
    Chapter 5




                 1
I/O Devices
• There exists a large variety of I/O devices:
  – Many of them with different properties
  – They seem to require different interfaces to
    manipulate and manage them
     • We don’t want a new interface for every device
     • Diverse, but similar interfaces leads to code
       duplication
• Challenge:
  – Uniform and efficient approach to I/O
                                                        2
Categories of I/O Devices (by usage)

• Human interface
  – Used to communicate with the user
  – Printers, Video Display, Keyboard, Mouse
• Machine interface
  – Used to communicate with electronic equipment
  – Disk and tape drives, Sensors, Controllers, Actuators
• Communication
  – Used to communicate with remote devices
  – Ethernet, Modems, Wireless

                                                       3
I/O Device Handling
• Data rate
  – May be differences of several orders of
    magnitude between the data transfer rates

  – Example: Assume 1000 cycles/byte I/O
     • Keyboard needs 10 KHz processor to keep up
     • Gigabit Ethernet needs 100 GHz processor…..




                                                     4
5
Sample Data Rates




              USB 3.0 625 MB/s (5 Gb/s)
              Thunderbolt 2.5MB/sec (20 Gb/s)
              PCIe v3.0 x16 16GB/s




                                     6
I/O Device Handling Considerations
• Complexity of control
• Unit of transfer
  – Data may be transferred as a stream of bytes for a
    terminal or in larger blocks for a disk
• Data representation
  – Encoding schemes
• Error conditions
  – Devices respond to errors differently
     • lp0: printer on fire!
  – Expected error rate also differs


                                                         7
I/O Device Handling Considerations
• Layering
  – Need to be both general and specific, e.g.
  – Devices that are the same, but aren’t the
    same
     • Hard-disk, USB disk, RAM disk
  – Interaction of layers
     • Swap partition and data on same disk
     • Two mice
  – Priority
     • Keyboard, disk, network

                                                 8
Accessing I/O Controllers




a)   Separate I/O and memory space
     –   I/O controller registers appear as I/O ports
     –   Accessed with special I/O instructions
b)   Memory-mapped I/O
     –   Controller registers appear as memory
     –   Use normal load/store instructions to access
c)   Hybrid
     –   x86 has both ports and memory mapped I/O
     –   Linux Device Drivers; Jonathan Corbet, Alessandro Rubini,
         and Greg Kroah-Hartman
                                                                9
Bus Architectures




(a) A single-bus architecture
(b) A dual-bus memory architecture
                                     10
Intel IXP420




               11
Interrupts




• Devices connected to an Interrupt Controller via
  lines on an I/O bus (e.g. PCI)
• Interrupt Controller signals interrupt to CPU and
  is eventually acknowledged.
• Exact details are architecture specific.
                                                  12
I/O Interation




                 13
Programmed I/O
• Also called polling, or busy
  waiting
• I/O module (controller) performs
  the action, not the processor
• Sets appropriate bits in the I/O
  status register
• No interrupts occur
• Processor checks status until
  operation is complete
  – Wastes CPU cycles

                                     14
Interrupt-Driven I/O
• Processor is interrupted when I/O
  module (controller) ready to
  exchange data
• Processor is free to do other work
• No needless waiting
• Consumes a lot of processor time
  because every word read or
  written passes through the
  processor

                                       15
Direct Memory Access
• Transfers data directly between Memory and Device
• CPU not needed for copying




         CPU         Memory         Device




                                                      16
Direct Memory Access
• Transfers a block of data
  directly to or from memory
• An interrupt is sent when
  the task is complete
• The processor is only
  involved at the beginning
  and end of the transfer


                               17
DMA Considerations
  Reduces number of interrupts
   – Less (expensive) context switches or kernel entry-exits
  Requires contiguous regions
   – Copying
   – Scatter-gather
• Synchronous/Asynchronous
• Shared bus must be arbitrated
   – CPU cache reduces (but not eliminates) CPU need for bus




            CPU            Memory              Device


                                                               18
The Process to Perform DMA
         Transfer




                             19
Device Evolution - Complexity
      and Performance




                            20
Evolution of the I/O Function
 • Processor directly controls a peripheral
   device
      – Example: CPU controls a flip-flop to
        implement a serial line



                        Flip
       CPU    Memory
                        Flop
                                    Serial
                                     Line
Bus
                                               21
Evolution of the I/O Function
 • Controller or I/O module is added
      – Processor uses programmed I/O without interrupts
      – Processor does not need to handle details of external devices
      – Example: A Universal Asynchronous Receiver Transmitter
         • CPU simply reads and writes bytes to I/O controller
         • I/O controller responsible for managing the signaling




       CPU       Memory         UART
                                                  Serial
                                                   Line
Bus
                                                                    22
Evolution of the I/O Function
   • Controller or I/O module with interrupts
       – Processor does not spend time waiting for an
         I/O operation to be performed

Interrupt
  Line


            CPU   Memory   UART
                                   Serial
                                    Line
Bus
                                                   23
Evolution of the I/O Function
   • Direct Memory Access
       – Blocks of data are moved into memory
         without involving the processor
       – Processor involved at beginning and end only
Interrupt
  Line


            CPU   Memory   UART
                                   Serial
                                    Line
Bus
                                                   24
Evolution of the I/O Function
   • I/O module has a separate processor
       – Example: SCSI controller
             • Controller CPU executes SCSI program code out
               of main memory
Interrupt
  Line                      CPU
                              SCSI
            CPU   Memory     Controller
                                          SCSI

Bus                                       Cable

                                                          25
Evolution of the I/O Function
 • I/O processor
      – I/O module has its own local memory, internal bus, etc.
      – Its a computer in its own right
      – Example: Myrinet 10 gigabit NIC

Interrupt
  Line                     CPU     RAM
                              Myrinet
            CPU   Memory     Controller


Bus
                                                            26

Contenu connexe

Tendances

Co module1a introdctnaddressingmodes
Co module1a introdctnaddressingmodesCo module1a introdctnaddressingmodes
Co module1a introdctnaddressingmodesManu Jose
 
microprocessor-and-microcontroller
microprocessor-and-microcontrollermicroprocessor-and-microcontroller
microprocessor-and-microcontrollerjhcid
 
Computer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyComputer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyBudditha Hettige
 
Microprocessors8085
Microprocessors8085Microprocessors8085
Microprocessors8085Vikas Kumar
 
Computer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsComputer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsBudditha Hettige
 
Computer Architecture
Computer  ArchitectureComputer  Architecture
Computer ArchitectureAmit Kumar
 
Book on nptel microcontroller
Book on nptel microcontrollerBook on nptel microcontroller
Book on nptel microcontrollerSouvik Dutta
 
The central processing unit by group 5 2015
The central processing unit by group 5 2015The central processing unit by group 5 2015
The central processing unit by group 5 2015Tendai Karuma
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitmariolinov
 

Tendances (20)

PILOT Session for Embedded Systems
PILOT Session for Embedded Systems PILOT Session for Embedded Systems
PILOT Session for Embedded Systems
 
Co module1a introdctnaddressingmodes
Co module1a introdctnaddressingmodesCo module1a introdctnaddressingmodes
Co module1a introdctnaddressingmodes
 
Arm processor
Arm processorArm processor
Arm processor
 
Cpu
CpuCpu
Cpu
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
microprocessor-and-microcontroller
microprocessor-and-microcontrollermicroprocessor-and-microcontroller
microprocessor-and-microcontroller
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Computer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyComputer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technology
 
In out system
In out systemIn out system
In out system
 
Microprocessors8085
Microprocessors8085Microprocessors8085
Microprocessors8085
 
Computer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsComputer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentals
 
Computer Architecture
Computer  ArchitectureComputer  Architecture
Computer Architecture
 
Chapter12
Chapter12Chapter12
Chapter12
 
Book on nptel microcontroller
Book on nptel microcontrollerBook on nptel microcontroller
Book on nptel microcontroller
 
The central processing unit by group 5 2015
The central processing unit by group 5 2015The central processing unit by group 5 2015
The central processing unit by group 5 2015
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Cpu
CpuCpu
Cpu
 
Esd mod 3
Esd mod 3Esd mod 3
Esd mod 3
 
ARM AAE - Architecture
ARM AAE - ArchitectureARM AAE - Architecture
ARM AAE - Architecture
 
Unit vi (1)
Unit vi (1)Unit vi (1)
Unit vi (1)
 

En vedette

Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Onderzoek naar het werkelijk gebruik van de ELO in het VO
Onderzoek naar het werkelijk gebruik van de ELO in het VOOnderzoek naar het werkelijk gebruik van de ELO in het VO
Onderzoek naar het werkelijk gebruik van de ELO in het VOwimdboer
 
Leermiddelen en leerlijnen
Leermiddelen en leerlijnenLeermiddelen en leerlijnen
Leermiddelen en leerlijnenwimdboer
 
ICT in (Dutch) schools
ICT in (Dutch) schoolsICT in (Dutch) schools
ICT in (Dutch) schoolswimdboer
 
Rollup presentation
Rollup presentationRollup presentation
Rollup presentationmemco-int
 
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?Abul Bashar
 
Memco profile
Memco profileMemco profile
Memco profilememco-int
 
Why bother with Fracking?
Why bother with Fracking?Why bother with Fracking?
Why bother with Fracking?onthewight
 
Tele3113 wk3tue
Tele3113 wk3tueTele3113 wk3tue
Tele3113 wk3tueVin Voro
 
Five star introduction
Five star introductionFive star introduction
Five star introductiontranduyen76
 
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...Kira Zhestkova
 
ICT to support learning programs
ICT to support learning programsICT to support learning programs
ICT to support learning programswimdboer
 
Portfolio 2011
Portfolio 2011Portfolio 2011
Portfolio 2011suehoeft
 
আত্ম সচেতনতা অর্জনের সূত্র
আত্ম সচেতনতা অর্জনের সূত্র আত্ম সচেতনতা অর্জনের সূত্র
আত্ম সচেতনতা অর্জনের সূত্র Abul Bashar
 
TEC CONTAINER - DELIVERED 2013 - 2016
TEC CONTAINER - DELIVERED 2013 - 2016TEC CONTAINER - DELIVERED 2013 - 2016
TEC CONTAINER - DELIVERED 2013 - 2016teccontainer
 
What is Email Marketing (by Ruslead)
What is Email Marketing (by Ruslead)What is Email Marketing (by Ruslead)
What is Email Marketing (by Ruslead)Kira Zhestkova
 
Marketing kisi2-2014
Marketing kisi2-2014Marketing kisi2-2014
Marketing kisi2-2014Smp Al-Hadi
 

En vedette (20)

Anna col
Anna colAnna col
Anna col
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Onderzoek naar het werkelijk gebruik van de ELO in het VO
Onderzoek naar het werkelijk gebruik van de ELO in het VOOnderzoek naar het werkelijk gebruik van de ELO in het VO
Onderzoek naar het werkelijk gebruik van de ELO in het VO
 
Leermiddelen en leerlijnen
Leermiddelen en leerlijnenLeermiddelen en leerlijnen
Leermiddelen en leerlijnen
 
ICT in (Dutch) schools
ICT in (Dutch) schoolsICT in (Dutch) schools
ICT in (Dutch) schools
 
Rollup presentation
Rollup presentationRollup presentation
Rollup presentation
 
Anna col
Anna colAnna col
Anna col
 
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?
মাধ্যমিক শিক্ষক প্রশিক্ষণ প্রয়োজন কেন?
 
Memco profile
Memco profileMemco profile
Memco profile
 
Why bother with Fracking?
Why bother with Fracking?Why bother with Fracking?
Why bother with Fracking?
 
Tele3113 wk3tue
Tele3113 wk3tueTele3113 wk3tue
Tele3113 wk3tue
 
Five star introduction
Five star introductionFive star introduction
Five star introduction
 
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...
РИФ+КИБ 2013 // Как создать персонализированный маркетинг? // OZON.ru (Кира Ж...
 
ICT to support learning programs
ICT to support learning programsICT to support learning programs
ICT to support learning programs
 
JAXB
JAXBJAXB
JAXB
 
Portfolio 2011
Portfolio 2011Portfolio 2011
Portfolio 2011
 
আত্ম সচেতনতা অর্জনের সূত্র
আত্ম সচেতনতা অর্জনের সূত্র আত্ম সচেতনতা অর্জনের সূত্র
আত্ম সচেতনতা অর্জনের সূত্র
 
TEC CONTAINER - DELIVERED 2013 - 2016
TEC CONTAINER - DELIVERED 2013 - 2016TEC CONTAINER - DELIVERED 2013 - 2016
TEC CONTAINER - DELIVERED 2013 - 2016
 
What is Email Marketing (by Ruslead)
What is Email Marketing (by Ruslead)What is Email Marketing (by Ruslead)
What is Email Marketing (by Ruslead)
 
Marketing kisi2-2014
Marketing kisi2-2014Marketing kisi2-2014
Marketing kisi2-2014
 

Similaire à Lect16

Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollersdundappabhangari
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureKumar
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollersnehapvs
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureKumar
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Harshit Srivastava
 
Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller Nitesh Kumar
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input outputrisal07
 
I/O systems chapter 12 OS
I/O systems chapter 12 OS I/O systems chapter 12 OS
I/O systems chapter 12 OS ssuser45ae56
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 
IoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiIoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiDamien Magoni
 

Similaire à Lect16 (20)

Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
5120224.ppt
5120224.ppt5120224.ppt
5120224.ppt
 
lb.pptx
lb.pptxlb.pptx
lb.pptx
 
Microcontroller
Microcontroller Microcontroller
Microcontroller
 
Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollers
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
Ch12 io systems
Ch12   io systemsCh12   io systems
Ch12 io systems
 
Lect 1 Into.pptx
Lect 1 Into.pptxLect 1 Into.pptx
Lect 1 Into.pptx
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
07 input output
07 input output07 input output
07 input output
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2
 
Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input output
 
I/O systems chapter 12 OS
I/O systems chapter 12 OS I/O systems chapter 12 OS
I/O systems chapter 12 OS
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
IoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiIoT Programming on the Raspberry Pi
IoT Programming on the Raspberry Pi
 

Plus de Vin Voro

Tele3113 tut6
Tele3113 tut6Tele3113 tut6
Tele3113 tut6Vin Voro
 
Tele3113 tut5
Tele3113 tut5Tele3113 tut5
Tele3113 tut5Vin Voro
 
Tele3113 tut4
Tele3113 tut4Tele3113 tut4
Tele3113 tut4Vin Voro
 
Tele3113 tut1
Tele3113 tut1Tele3113 tut1
Tele3113 tut1Vin Voro
 
Tele3113 tut3
Tele3113 tut3Tele3113 tut3
Tele3113 tut3Vin Voro
 
Tele3113 tut2
Tele3113 tut2Tele3113 tut2
Tele3113 tut2Vin Voro
 
Tele3113 wk11tue
Tele3113 wk11tueTele3113 wk11tue
Tele3113 wk11tueVin Voro
 
Tele3113 wk10wed
Tele3113 wk10wedTele3113 wk10wed
Tele3113 wk10wedVin Voro
 
Tele3113 wk10tue
Tele3113 wk10tueTele3113 wk10tue
Tele3113 wk10tueVin Voro
 
Tele3113 wk11wed
Tele3113 wk11wedTele3113 wk11wed
Tele3113 wk11wedVin Voro
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Tele3113 wk9tue
Tele3113 wk9tueTele3113 wk9tue
Tele3113 wk9tueVin Voro
 
Tele3113 wk8wed
Tele3113 wk8wedTele3113 wk8wed
Tele3113 wk8wedVin Voro
 
Tele3113 wk9wed
Tele3113 wk9wedTele3113 wk9wed
Tele3113 wk9wedVin Voro
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tueVin Voro
 
Tele3113 wk6wed
Tele3113 wk6wedTele3113 wk6wed
Tele3113 wk6wedVin Voro
 
Tele3113 wk6tue
Tele3113 wk6tueTele3113 wk6tue
Tele3113 wk6tueVin Voro
 
Tele3113 wk5tue
Tele3113 wk5tueTele3113 wk5tue
Tele3113 wk5tueVin Voro
 
Tele3113 wk4wed
Tele3113 wk4wedTele3113 wk4wed
Tele3113 wk4wedVin Voro
 

Plus de Vin Voro (20)

Tele3113 tut6
Tele3113 tut6Tele3113 tut6
Tele3113 tut6
 
Tele3113 tut5
Tele3113 tut5Tele3113 tut5
Tele3113 tut5
 
Tele3113 tut4
Tele3113 tut4Tele3113 tut4
Tele3113 tut4
 
Tele3113 tut1
Tele3113 tut1Tele3113 tut1
Tele3113 tut1
 
Tele3113 tut3
Tele3113 tut3Tele3113 tut3
Tele3113 tut3
 
Tele3113 tut2
Tele3113 tut2Tele3113 tut2
Tele3113 tut2
 
Tele3113 wk11tue
Tele3113 wk11tueTele3113 wk11tue
Tele3113 wk11tue
 
Tele3113 wk10wed
Tele3113 wk10wedTele3113 wk10wed
Tele3113 wk10wed
 
Tele3113 wk10tue
Tele3113 wk10tueTele3113 wk10tue
Tele3113 wk10tue
 
Tele3113 wk11wed
Tele3113 wk11wedTele3113 wk11wed
Tele3113 wk11wed
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Tele3113 wk9tue
Tele3113 wk9tueTele3113 wk9tue
Tele3113 wk9tue
 
Tele3113 wk8wed
Tele3113 wk8wedTele3113 wk8wed
Tele3113 wk8wed
 
Tele3113 wk9wed
Tele3113 wk9wedTele3113 wk9wed
Tele3113 wk9wed
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tue
 
Tele3113 wk6wed
Tele3113 wk6wedTele3113 wk6wed
Tele3113 wk6wed
 
Tele3113 wk6tue
Tele3113 wk6tueTele3113 wk6tue
Tele3113 wk6tue
 
Tele3113 wk5tue
Tele3113 wk5tueTele3113 wk5tue
Tele3113 wk5tue
 
Tele3113 wk4wed
Tele3113 wk4wedTele3113 wk4wed
Tele3113 wk4wed
 

Dernier

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Dernier (20)

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Lect16

  • 1. I/O Management Intro Chapter 5 1
  • 2. I/O Devices • There exists a large variety of I/O devices: – Many of them with different properties – They seem to require different interfaces to manipulate and manage them • We don’t want a new interface for every device • Diverse, but similar interfaces leads to code duplication • Challenge: – Uniform and efficient approach to I/O 2
  • 3. Categories of I/O Devices (by usage) • Human interface – Used to communicate with the user – Printers, Video Display, Keyboard, Mouse • Machine interface – Used to communicate with electronic equipment – Disk and tape drives, Sensors, Controllers, Actuators • Communication – Used to communicate with remote devices – Ethernet, Modems, Wireless 3
  • 4. I/O Device Handling • Data rate – May be differences of several orders of magnitude between the data transfer rates – Example: Assume 1000 cycles/byte I/O • Keyboard needs 10 KHz processor to keep up • Gigabit Ethernet needs 100 GHz processor….. 4
  • 5. 5
  • 6. Sample Data Rates USB 3.0 625 MB/s (5 Gb/s) Thunderbolt 2.5MB/sec (20 Gb/s) PCIe v3.0 x16 16GB/s 6
  • 7. I/O Device Handling Considerations • Complexity of control • Unit of transfer – Data may be transferred as a stream of bytes for a terminal or in larger blocks for a disk • Data representation – Encoding schemes • Error conditions – Devices respond to errors differently • lp0: printer on fire! – Expected error rate also differs 7
  • 8. I/O Device Handling Considerations • Layering – Need to be both general and specific, e.g. – Devices that are the same, but aren’t the same • Hard-disk, USB disk, RAM disk – Interaction of layers • Swap partition and data on same disk • Two mice – Priority • Keyboard, disk, network 8
  • 9. Accessing I/O Controllers a) Separate I/O and memory space – I/O controller registers appear as I/O ports – Accessed with special I/O instructions b) Memory-mapped I/O – Controller registers appear as memory – Use normal load/store instructions to access c) Hybrid – x86 has both ports and memory mapped I/O – Linux Device Drivers; Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman 9
  • 10. Bus Architectures (a) A single-bus architecture (b) A dual-bus memory architecture 10
  • 12. Interrupts • Devices connected to an Interrupt Controller via lines on an I/O bus (e.g. PCI) • Interrupt Controller signals interrupt to CPU and is eventually acknowledged. • Exact details are architecture specific. 12
  • 14. Programmed I/O • Also called polling, or busy waiting • I/O module (controller) performs the action, not the processor • Sets appropriate bits in the I/O status register • No interrupts occur • Processor checks status until operation is complete – Wastes CPU cycles 14
  • 15. Interrupt-Driven I/O • Processor is interrupted when I/O module (controller) ready to exchange data • Processor is free to do other work • No needless waiting • Consumes a lot of processor time because every word read or written passes through the processor 15
  • 16. Direct Memory Access • Transfers data directly between Memory and Device • CPU not needed for copying CPU Memory Device 16
  • 17. Direct Memory Access • Transfers a block of data directly to or from memory • An interrupt is sent when the task is complete • The processor is only involved at the beginning and end of the transfer 17
  • 18. DMA Considerations Reduces number of interrupts – Less (expensive) context switches or kernel entry-exits Requires contiguous regions – Copying – Scatter-gather • Synchronous/Asynchronous • Shared bus must be arbitrated – CPU cache reduces (but not eliminates) CPU need for bus CPU Memory Device 18
  • 19. The Process to Perform DMA Transfer 19
  • 20. Device Evolution - Complexity and Performance 20
  • 21. Evolution of the I/O Function • Processor directly controls a peripheral device – Example: CPU controls a flip-flop to implement a serial line Flip CPU Memory Flop Serial Line Bus 21
  • 22. Evolution of the I/O Function • Controller or I/O module is added – Processor uses programmed I/O without interrupts – Processor does not need to handle details of external devices – Example: A Universal Asynchronous Receiver Transmitter • CPU simply reads and writes bytes to I/O controller • I/O controller responsible for managing the signaling CPU Memory UART Serial Line Bus 22
  • 23. Evolution of the I/O Function • Controller or I/O module with interrupts – Processor does not spend time waiting for an I/O operation to be performed Interrupt Line CPU Memory UART Serial Line Bus 23
  • 24. Evolution of the I/O Function • Direct Memory Access – Blocks of data are moved into memory without involving the processor – Processor involved at beginning and end only Interrupt Line CPU Memory UART Serial Line Bus 24
  • 25. Evolution of the I/O Function • I/O module has a separate processor – Example: SCSI controller • Controller CPU executes SCSI program code out of main memory Interrupt Line CPU SCSI CPU Memory Controller SCSI Bus Cable 25
  • 26. Evolution of the I/O Function • I/O processor – I/O module has its own local memory, internal bus, etc. – Its a computer in its own right – Example: Myrinet 10 gigabit NIC Interrupt Line CPU RAM Myrinet CPU Memory Controller Bus 26