knowledge

Overview

Input and Output (I/O) refers to how a computer system communicates with external devices and transfers data between hardware components. It includes data transfer methods, communication protocols, and hardware interfaces.


Terminology

TermDefinition
BusLogical pathway for data transfer between components
TracePhysical wiring on the motherboard
Bus MasterDevice that currently controls the bus
Bus ArbiterComponent that determines which device becomes the bus master
InterfaceConnection point between an external device and the system bus
InterruptSignal from hardware requesting CPU attention
ExceptionInternal event triggered during execution
DMA (Direct Memory Access)Transfers data directly to/from memory without CPU involvement

Core Concepts

Bus Arbitration

Bus arbitration determines which device gains control of the system bus.

TypeDescription
Centralized ArbitrationSingle arbiter controls access
Daisy ChainDevices share a line; priority based on position
Independent RequestEach device has its own request line
PollingPriority rotates dynamically
Distributed ArbitrationDevices collectively determine access using identifiers

Bus Communication

  • Serial Communication – One bit at a time; asynchronous (uses handshaking)
  • Parallel Communication – Multiple bits at once; synchronous (uses clock signal); limited to short distances

Bus Lines

LineFunction
Address LineSpecifies memory location
Data LineTransfers data
Control LineSends commands
Power LineSupplies power

I/O Control Methods

MethodDescription
Programmed I/OCPU continuously checks device status
Interrupt-Driven I/ODevice signals CPU when ready
Direct Memory Access (DMA)Transfers data directly to/from memory without CPU involvement
Channel I/OUses dedicated hardware for data transfer (common in mainframes)

Direct Memory Access (DMA)

DMA allows devices to transfer data directly to memory without CPU involvement.

  1. Device sends request to DMA controller
  2. DMA requests CPU to pause
  3. CPU grants access
  4. DMA transfers data between device and memory

Common in devices like USB and sound cards.

Interrupts and Exceptions

TypeDescription
TrapIntentional, software-generated interrupt
FaultRecoverable error
AbortSevere, non-recoverable error
Maskable InterruptCan be ignored by the CPU
Non-Maskable Interrupt (NMI)Cannot be ignored; used for critical errors

System Architecture (x86 Example)

  • Northbridge – Handles communication with memory
  • Southbridge – Handles I/O devices
  • Bridges act as communication translators between components

Common Interfaces

InterfacePurpose
SCSIMulti-device parallel interface (older storage systems)
SATAConnects storage devices
PCIeHigh-speed expansion bus
USBGeneral-purpose peripheral interface
RS-232Serial communication standard

Display Interfaces

InterfaceDescription
VGAAnalog video
DVIDigital video
HDMIAudio + video (modern standard)
DisplayPortHigh bandwidth, multi-display support


References / Images

  • Bus diagrams
  • DMA flow diagrams
  • Interface comparison charts