IO Layers

Device Types

Device Controller

Interrupts

  1. device asserts signal on bus line assigned to it
  2. interrupt controller notices that, decides which interrupt is handled first
  3. issues interrupt to cpu for this device | number referenceing the device in a interrupt vector is attached

Interrupt Handling

Precise and Imprecise Interrupts

Programmed IO

Interrupt-Driven IO

IO using DMA

IO Software Design

Interrupt Handlers

  1. save registers
  2. set up context for interrupt service procedure
  3. set up stack for interrupt service procedure
  4. acknowledge interrput controller
  5. copy registers from where saved to process table
  6. run interrupt service procedure
  7. choose which process to run next
  8. set up MMU context for process to run next
  9. load new process' registers, including PSW
  10. start running new process

Device Drivers

Role of Device Drivers

Device-Independent IO Software

Uniform interfacing for Device Drivers

IO Buffering

User-Space IO Software