I/O Control Methods
I/O Devices
Modern computer systems have many types of peripherals. Alongside displays, keyboards, printers, tapes, and disks, there are optical discs, plotters, graphics digitizers, mice, laser printers, and audio input/output devices. Peripherals differ considerably, so I/O performance often becomes a system bottleneck.
The goals of operating system device management include:
-
Provide convenient, uniform interfaces to peripherals, control them according to user requests and device types, and complete users' input/output requests. Convenience means users can use a device independently of its complex physical characteristics; uniformity means operating different devices in as similar a manner as possible. This requires hiding the details of specific device I/O operations and presenting a simple logical device with idealized performance. This property is also called device independence.
-
Fully use interrupts, channels, and buffering to improve parallel operation between the CPU and devices, and between devices, making full use of device resources and improving peripheral utilization.
-
Ensure that when multiple processes compete for devices in a multiprogramming environment, devices are allocated and managed according to a policy so that the system operates in an orderly manner.
I/O Control Methods
Early computer designers did not separate CPU execution from I/O operations; many even thought input/output and computation should take comparable amounts of time. Later, they realized the CPU was several orders of magnitude faster than I/O. Hardware and software designers then began seeking techniques that let CPU computation continue without waiting for I/O operations.
I/O control methods include:
-
Programmed I/O: The processor sends an I/O command to an I/O module on behalf of a process. The process busy-waits until the operation completes.
-
Interrupt I/O: The processor sends an I/O command on behalf of a process. If the process's I/O instruction is nonblocking, the processor continues executing its subsequent instructions. If it is blocking, the processor executes operating system instructions that put the current process into the blocked state and schedule another process.
-
Direct Memory Access (DMA): The DMA module controls data exchange between memory and an I/O module. To transfer a block, the processor sends a request to the DMA module, which typically reports completion through an interrupt after the entire block has been transferred.
Follow an I/O transfer
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
KNOWLEDGE QUIZ
Compare CPU work
Advance each Lab mode to its final slot. Record the CPU's busy-wait slots, other-work slots, and interrupt count. Who moves the data in each mode? If an I/O request blocks, must all processes stop?