Next: Spooling
Up: No Title
Previous: Interrupt Handling for devices
Unbuffered I/O
- Data transfered from (to) user directly to (from) device (no intermediate
storage)
- Each read or write causes an actual (physical) I/O operation
-
run file manager and device handler for each transfer, could
cause very high process switching overheads (when transferring characters for
instance - possible to get process switch per character)
- Not the best way - clearly - any alternatives ?
Buffered I/O
- No direct transfer from (to) user to (from) I/O device
- Used to smooth peaks in I/O traffic
- Particularly useful for dealing with scenarios where there is a difference
in data transfer rates - linking fast devices to slow ones for instance
- Also useful for storing data temporarily ...
- OUTPUT : User's output data transferred to OS output buffer.
User continues operation, and is only suspended when the buffer becomes full
- INPUT : OS reads ahead for user. Read normally satisfied from buffer.
User is blocked if buffer is empty
Double buffering :
![figure158](img9.gif)
Figure 8: Double Buffering between OS and User
The Spooler :
![figure163](img10.gif)
Figure 9: The Spooler Process
Omer F Rana
Fri Feb 14 18:33:29 GMT 1997