Overview
This chapter discusses the management and operation of Input/Output (I/O) systems in operating systems. It covers the role of device drivers, data movement, polling, interrupts, Direct Memory Access (DMA), kernel I/O subsystems, and their components.
I/O Structure in Computer Systems
Key Points:
- Managing I/O devices is a critical component of operating system design.
- Operating systems use device drivers to manage and interact with various I/O devices.
- Device drivers are modular components that handle a device or a similar category of devices.
Device Communication:
- Data transfer between devices and the computer occurs through device controllers.
- For each device controller, there is a corresponding device driver within the operating system.
Communication Between Host and Devices
Polling and Interrupts:
- The host and device controller communicate to process I/O requests.
- Polling:
- The host actively checks the device's readiness for data transfer.
- Efficient for fast devices.
- Inefficient if the device is rarely ready, as the host spends time checking unnecessarily.
- Interrupts:
- Used when polling is inefficient.
- The device interrupts the host when it is ready, eliminating unnecessary checks.
Direct Memory Access (DMA)
Definition:
- DMA is a special-purpose processor used for transferring large quantities of data (e.g., between disk controllers and memory) without continuous CPU involvement.