I/O
also: input/output
Input/Output (I/O) refers to the transfer of data between a computer and external devices, including reading from and writing to files, disks, networks, and peripherals.
I/O encompasses all operations that move data in and out of the CPU and memory. This includes reading data from disk, writing to a file, sending packets over a network, or printing to a device. Linux abstracts most I/O through the filesystem, treating devices as files.
Common I/O operations include read(), write(), open(), and close() system calls. For example, cat /etc/passwd performs disk I/O to read file contents, while echo "hello" > file.txt performs I/O to write data to disk.
I/O performance is often a system bottleneck. Tools like iostat and iotop monitor disk I/O activity, while strace traces system calls including I/O operations. Buffering and caching mechanisms help optimize I/O by reducing the number of physical disk accesses.