- devices
- information repositories
- devices differ in their ability to handle information
- input (mouse), output (audio), input-output (disk)
- transfer rates, quantities, qualities
- device management objectives
- protection - devices are shared objects; they handle unshared
information
- convenience - devices are gnarly, varied, and always changing
- efficiency - devices are bottle-necks; they are abstract
- the central conflict - abstraction vs. control; convenience vs. efficiency
- device management - efficient data transfer between device and system
- io system organization - the device driver, the resource manager
- provide interfaces - application, kernel, and device
- operate the device
- keep track of pending requests
- enforce the resource policy
- general device operation
- establish data and parameters; kick off the operation; wait for completion;
determine status; handle results; repeat
- which does what - cpu vs. device; the trend is to move function from
the cpu to the device
- cpu-device interactions
- the cpu directs the device, and possibly helps with some functions -
error recovery
- polling
- cpu continually tests for completion
- doesn't scale well, difficult to get right, wastes cpu
- interrupt driven io - efficiently waiting for completion
- the device informs the cpu when completed
- scales well, relatively easy to program, efficient cpu use
- direct memory access - moving data between the device and system
- devices may have buffers to store data
- the cpu can do it - expensive
- the device can do it - needs access to memory; capable devices
- buffering
- amortize operations over more data - n 1-byte operations vs 1
n-byte operation
- smooth out bursty data transmissions
even out the speed disparity - double buffering
- memory-mapped io - how do the cpu and devices communicate
- special cpu instructions
- writing locations memory - memory-mapped io
- device drivers
- interface - uniformity, abstraction vs. control
- application interface
- allocate, deallocate, specify information
- read, write, sense status
- control, manipulate, query
- kernel interface
- loadable kernel modules
- initialize, decommission, status
- device interface
- varies with the devices; a back-end to the device driver
- another interface, this one internal and messier
- io optimization
- why optimize - overcome performance disparities; allow greater
capacity; offload function; exploit hardware capability
- what optimizes
- application - specific knowledge; difficult
- os - reasonable historic knowledge; fragile and complex
- device - no special knowledge; simple and universal; not as
effective and may get in the way
- examples
- serial devices - bit-by-bit (not addressable); slow; limited
capacity;
fully automated - modems
- sequential storage devices - bi- or uni-directionally addressable;
slow; high capacity
- random access storage devices - randomly addressable; slow to fairly
fast; low to high capacity
This page last modified on 9 October 2003.