Input & Output Hardware
Operating Systems
Input & Output 1CSE-2018
Overview
 What is I/O?
 Categories of I/O Devices
 Device drivers & Device controllers
 Communication in I/O devices
 Polling & Interrupts
Input & Output 2CSE-2018
What is I/O Device ?
 An input device sends information to a computer system for
processing, and an output device reproduces or displays the
results of that processing
Input & Output 3CSE-2018
Categories
 Block Devices
 Character Devices
Input & Output 4CSE-2018
Block Devices Character Devices
 Driver communicates by
sending entire block of data
 Ex- Harddisk ,Usb
Cameras..etc  Driver communicates by
sending
characters(Bytes,Octets)
 Ex- Serial ports, Parralel
ports
Input & Output 5CSE-2018
Device driver Device controllers
 Software modules that
handles a particular device.
 OS needs it to handle all
I/O devices.
 Works as interface b/w
device & device drivers.
 It converts serial bit streams
into block of bytes.
Input & Output 6CSE-2018
Synchronous Vs Asynchronous OS
 CPU execution waits while
I/O proceeds.
 I/O proceeds concurrently
with CPU execution
Input & Output 7CSE-2018
Communication to I/O devices
 Three approaches…
 Special Instruction I/O
 Memory-mapped I/O
 DMA (Direct Memory access)
Input & Output 8CSE-2018
Special instruction I/O
CPU instructions , specially made to control I/O devices.
Memory-mapped I/O
The device is connected directly to certain main memory
locations
OS allocates buffer in memory and informs I/O device to use
that buffer to send data to the CPU.
Memory mapped IO is used for most high-speed I/O devices
like disks, communication interfaces.
Input & Output 9CSE-2018
Direct Memory Access (DMA)
 DMA means CPU grants I/O module authority to
read from or write to memory without involvement.
 DMA module itself controls exchange of data
between main memory and the I/O device.
Input & Output 10CSE-2018
Polling
 Polling is the simplest way for an I/O device to
communicate with the processor.
 The I/O device simply puts the information in a
Status register, and the processor must come and get
the information.
 This is an inefficient method and much of the
processors time is wasted on unnecessary polls.
Input & Output 11CSE-2018
Interrupts
 An interrupt is a signal to the microprocessor from a
device that requires attention.
 When the interrupting device has been dealt with,
the CPU continues with its original task as if it had
never been interrupted.
Input & Output 12CSE-2018

Input output hardware of operating system

  • 1.
    Input & OutputHardware Operating Systems Input & Output 1CSE-2018
  • 2.
    Overview  What isI/O?  Categories of I/O Devices  Device drivers & Device controllers  Communication in I/O devices  Polling & Interrupts Input & Output 2CSE-2018
  • 3.
    What is I/ODevice ?  An input device sends information to a computer system for processing, and an output device reproduces or displays the results of that processing Input & Output 3CSE-2018
  • 4.
    Categories  Block Devices Character Devices Input & Output 4CSE-2018
  • 5.
    Block Devices CharacterDevices  Driver communicates by sending entire block of data  Ex- Harddisk ,Usb Cameras..etc  Driver communicates by sending characters(Bytes,Octets)  Ex- Serial ports, Parralel ports Input & Output 5CSE-2018
  • 6.
    Device driver Devicecontrollers  Software modules that handles a particular device.  OS needs it to handle all I/O devices.  Works as interface b/w device & device drivers.  It converts serial bit streams into block of bytes. Input & Output 6CSE-2018
  • 7.
    Synchronous Vs AsynchronousOS  CPU execution waits while I/O proceeds.  I/O proceeds concurrently with CPU execution Input & Output 7CSE-2018
  • 8.
    Communication to I/Odevices  Three approaches…  Special Instruction I/O  Memory-mapped I/O  DMA (Direct Memory access) Input & Output 8CSE-2018
  • 9.
    Special instruction I/O CPUinstructions , specially made to control I/O devices. Memory-mapped I/O The device is connected directly to certain main memory locations OS allocates buffer in memory and informs I/O device to use that buffer to send data to the CPU. Memory mapped IO is used for most high-speed I/O devices like disks, communication interfaces. Input & Output 9CSE-2018
  • 10.
    Direct Memory Access(DMA)  DMA means CPU grants I/O module authority to read from or write to memory without involvement.  DMA module itself controls exchange of data between main memory and the I/O device. Input & Output 10CSE-2018
  • 11.
    Polling  Polling isthe simplest way for an I/O device to communicate with the processor.  The I/O device simply puts the information in a Status register, and the processor must come and get the information.  This is an inefficient method and much of the processors time is wasted on unnecessary polls. Input & Output 11CSE-2018
  • 12.
    Interrupts  An interruptis a signal to the microprocessor from a device that requires attention.  When the interrupting device has been dealt with, the CPU continues with its original task as if it had never been interrupted. Input & Output 12CSE-2018

Editor's Notes

  • #2 Assumptions: Graduate level Operating Systems Making Choices about operation systems Why a micro-century? …just about enough time for one concept