Input-Output Organization
I/O Module
Interfaces between system bus/central switch and peripheral devices.
Contains logic for communication between peripheral and bus.
Reasons for I/O modules:
Wide variety of peripherals.
Data transfer rate mismatch.
Different data formats and word lengths.
Peripheral Devices
Exchange data between external environment and computer.
Categories:
Human-readable (e.g., VDTs, printers).
Machine-readable (e.g., magnetic disks/tapes, sensors/actuators).
Communication (for remote devices).
Peripheral Device Components
Control logic: controls device operation.
Transducer: converts data between electrical and other forms.
Buffer: temporarily holds data; basic unit is character (e.g., IRA code).
I/O Module Functions
Interface to processor/memory via system bus.
Interface to peripheral devices via data links.
Signals: control, data, and status.
I/O Module Components
Data register: buffers data.
Status register: provides status information.
Logic: interacts with processor via control lines.
I/O Module Types
I/O channel/processor: high-level interface.
I/O controller/device controller: requires detailed control.
Modes of Transfer
Programmed I/O
Processor directly controls I/O operation.
Processor waits for I/O module to complete.
I/O Commands
Control: activates peripheral.
Test: tests status conditions.
Read: obtains data from peripheral.
Write: transmits data to peripheral.
Interrupt-Driven I/O
Processor issues I/O command and continues other work.
I/O module interrupts processor when ready.
Interrupt Processing Steps
Device sends interrupt request signal.
Processor finishes current instruction.
Processor tests for interrupt and sends acknowledgment.
Processor saves current program context (PSW, PC) to stack.
Processor loads PC with interrupt handler address.
Save processor registers on stack.
Interrupt handler processes interrupt.
Restore register values from stack.
Restore PSW and PC values from stack.
Direct Memory Access (DMA)
I/O module and memory exchange data directly.
Processor not involved in data transfer.
Cycle stealing: DMA module temporarily suspends processor operation.
Input-Output Controller (IOC)
Handles I/O channel functions.
I/O channel executes I/O instructions.
Types of I/O Channels
Selector channel: controls multiple high-speed devices; dedicated to one device at a time.
Multiplexor channel: handles I/O with multiple devices simultaneously.
Types of Interfaces
Parallel: multiple lines, multiple bits transferred simultaneously.
Serial: one line, bits transmitted one at a time.