SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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)
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

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