Software → Operating Systems
Input/Output
Communication between a computer program and external systems such as files, devices, networks, or users.
Motivation
Input/output solves the problem of communicating with the outside world: disks, networks, terminals, files, devices, and other processes.
Where it fits
I/O sits between programming, operating systems, storage, and networking. Many performance problems are actually I/O problems, not CPU problems.
Subconcepts
Blocking I/O
The program waits until the I/O operation finishes.
Non-blocking I/O
The program can continue doing other work while the operation is pending.
Disk I/O
Reads and writes involving persistent storage. It is usually much slower than memory access.
Common mistakes
- Optimizing CPU work while ignoring slow I/O.
- Assuming async code always makes work faster. Async mainly helps avoid waiting idle.