Application I/O Interface
We can further divide devices into the following categories:
- Block vs. Character devices.
- This is about the size of data that the OS can access within the device at once.
- Block devices can be accessed one block at a time. A block is a fixed size of data, usually standing at a multiple of 512 bytes. Block sizes of 4k (= 4096) and 8k (= 8192) bytes are common.
- Examples of block devices include hard disk drives, solid-state drives, and USB flash drives.
- Character devices can be accessed one byte at a time (remember that 1 byte can store exactly one character or a small integer between 0-255.)
- Examples of character devices include the mouse, the keyboard, and the monitor.
- As a general rule, every peripheral I/O device is a character device.