OVERVIEW OF INPUT–OUTPUT (I/O) ORGANIZATION

OVERVIEW OF INPUT–OUTPUT (I/O) ORGANIZATION  

INPUT–OUTPUT (I/O) ORGANIZATION

Introduction

Define how a computer system communicates with external devices, such as:

  • Keyboard
  • Mouse
  • Printer
  • Hard disk
  • Display
  • Network devices

Basic Components of the I/O System

Main Components

  1. CPU
  2. Main Memory
  3. I/O Devices
  4. I/O Interface (Controller / Module)
  5. System Bus

Need for I/O Organization

Bridges the gap between CPU and devices because:-

  • CPU speed is very high
  • I/O devices are slow
  • Data formats differ
  • Error handling required
  • Multiple devices need CPU access

I/O Interface (I/O Module)

Functions of the I/O Interface

  • Device selection
  • Data buffering
  • Speed matching
  • Error detection
  • Control & status reporting

Types of I/O Devices

Input Devices

  • Keyboard
  • Mouse
  • Scanner
  • Microphone

Output Devices

  • Monitor
  • Printer
  • Speaker
  • Plotter

Storage Devices

  • Hard Disk
  • SSD
  • USB Drive

 I/O Addressing Techniques

(a) Memory-Mapped I/O

  • I/O devices treated as memory locations
  • Same address space for memory & I/O
  • Uses normal memory instructions

(b) Isolated (Port-Mapped) I/O

  • Separate address space for I/O
  • Special instructions (IN, OUT)

I/O Data Transfer Techniques


1. Programmed I/O

CPU actively controls data transfer.

 

Working

CPU Ă send command Ă I/O Module Ă  connect withĂ  DeviceĂ  status activeĂ  data transfer.  


2. Interrupt-Driven I/O

I/O device interrupts the CPU when ready.

 

Working

  1. CPU starts I/O
  2. CPU performs other work
  3. The device sends an interrupt
  4. CPU executes ISR (Interrupt Service Routine)

3. Direct Memory Access (DMA)

DMA controller transfers data directly between memory and the device.

 

Working Steps

  1. CPU initializes the DMA controller
  2. DMA takes control of the bus
  3. Data transfer without CPU
  4. DMA interrupts the CPU after completion

Modes of DMA Transfer

  1. Burst Mode – DMA transfers entire block
  2. Cycle Stealing – DMA steals CPU cycles
  3. Transparent Mode – DMA works when the CPU is idle

I/O Bus and System Bus

System Bus

  • Data Bus
  • Address Bus
  • Control Bus

 

I/O Bus

  • Dedicated bus for I/O devices
  • Reduces CPU load

Interrupt Handling Mechanism

Interrupt Types

  • Hardware Interrupt
  • Software Interrupt
  • Maskable Interrupt
  • Non-Maskable Interrupt

Interrupt Sequence

  1. Save PC
  2. Jump to ISR
  3. Execute ISR
  4. Return to the main program

Advantages of Proper I/O Organization

Efficient data transfer
Better CPU utilization
Faster system performance
Supports multiple devices

 

Bottlenecks in I/O Organization

  • Slow I/O devices
  • Bus contention
  • Interrupt overhead
  • Limited buffer size

 

Post a Comment

0 Comments