Character devices (keyboard, mouse, serial port) transfer data as a stream of bytes, one at a time, with no random access. The driver must handle sequential, unbuffered transfers.
A character driver handles byte-stream devices, managing sequential data transfer one character/byte at a time, without seeking or block structure.
- OS sends read/write request for character data
- Driver reads/writes bytes sequentially from device
- Typically uses small buffers (one character or small FIFO)
- Interrupt per character (or small group) is common
- No seeking — data is a sequential stream
- Transfers one byte or small buffers at a time
- No seeking — sequential access only
- Examples: keyboard, mouse, serial port, printer
- Often uses interrupts per character (can be high overhead)
- Built from: Device Driver, O Devices
- Builds into: O Software Structure
- Related: Block Driver, Interrupt Handler
- Contrasts with: Block Driver (random access vs sequential)
- High interrupt rate for fast character streams (use FIFO buffers)
- Some character devices support limited “seek” (e.g., tape drives)
- Character devices don’t support memory-mapped I/O typically