I/O Devices (Page 3-6)
I/O devices are crucial elements in operating system design, often presenting challenges due to their variety and complexity. Devices are categorized into three types:
- Human-readable: Devices that communicate with users (e.g., printers, terminals).
- Machine-readable: Devices for communication with electronic equipment (e.g., disk drives, USB keys).
- Communication devices: Used to connect with remote devices (e.g., modems).
Key differences among these device types include:
- Data rate: Speed of data transfer varies widely.
- Applications: Different devices require unique OS support (e.g., file management for disks).
- Complexity of control: Some devices are simpler (e.g., printers) than others (e.g., disks).
- Unit of transfer: Data can be transferred in blocks (disk I/O) or streams (terminals).
- Data representation: Varies across devices (e.g., character encoding).
- Error handling: Different devices manage errors in unique ways.
Organization of the I/O Function (Page 8-9)
Three techniques are used for I/O operations:
- Programmed I/O: The processor waits for the operation to complete.
- Interrupt-driven I/O: The processor continues executing other instructions if the I/O command is non-blocking; if blocking, control passes to the OS.
- Direct Memory Access (DMA): A DMA module handles transfers between memory and I/O devices, allowing the processor to work on other tasks until the transfer completes.