Applications need to perform I/O (read files, write data, print) but shouldn’t talk directly to hardware — that would require every program to know every device’s details.
The topmost layer of I/O software that provides system calls and library functions (read(), write(), fopen()) for applications to request I/O operations.
- Application calls I/O functions (
fopen("file.txt", "r")) - These functions invoke system calls that switch to kernel mode
- Library handles formatting (printf/scanf), buffering in user space
- Spooling for devices like printers is managed at this layer
- Request is passed down to device-independent I/O software
- Runs in user space (unprivileged mode)
- Provides familiar APIs (stdio.h in C)
- Handles user-space buffering and formatting
- Spooling for shared devices (printers) happens here
- Built from: O Software Structure, System Call
- Builds into: O Request to Hardware Operation
- Related: O System, O Software
- Contrasts with: Device Driver (kernel space, hardware-specific)
- User-space buffering can delay writes (must flush explicitly)
- System call overhead for each I/O operation (mitigated by buffering)
- Library functions may mask errors — always check return values