What is IO?

February 13, 2024

Overview

I/O (or IO) stands for Input / Output. It can be interpreted in two contexts:

  1. Devices and their communication to/from outside a computer or machine.
  2. Devices and their communication that play a role in data exchange.

The first interpretation is simple as it includes your keyboard, mouse, etc. However, the second interpretation is more nuanced. In this second interpretation, any device other than the CPU + Memory that can transmit data (outside the scope of the motherboard) could be considered an I/O device. An internal HDD (Hard Disk Drive), for example, could be considered I/O because data travels to/from the CPU + Memory. As such, any HDD has latencies that are orders of magnitude greater than RAM. This communication path is often explicitly defined as asynchronous by developers to increase performance.

A GPU (Graphics Processing Unit) could be considered an I/O device given that it interfaces with I/O devices (such as monitors). However, it can also perform calculations that do not impact any monitors.

Table of Contents

I/O Devices
Not I/O
I/O
I/O Operation
I/O Management
Distributed Systems
Conclusion

I/O Devices
^

Below is a non-exhaustive list of computer devices (inside and outside) that are or are not considered I/O components:

Not I/O
^

  • CPU (Central Processing Unit)
  • RAM (Random Access Memory)
  • Internal Hard Drive (when considered as internal component rather than data exchange)
  • SSD (Solid-State Drive) (when considered as internal component rather than data exchange)
  • Motherboard (although it hosts I/O ports, its primary role is to connect internal components)
  • GPU (Graphics Processing Unit) (primarily considered a processing unit, though it interfaces with output devices like monitors)

I/O
^

  • Keyboard
  • Mouse
  • Scanner
  • Digital Camera
  • Microphone
  • Gamepad/Joystick
  • Touchscreen
  • Webcam
  • Monitor
  • Printer
  • Speakers
  • Headphones
  • Projector
  • Network Interface Card (NIC)/Network Adapter (typically always considered an I/O device given that any signal that reaches this physical device is destined to be I/O communication)
  • USB Flash Drive
  • Touchscreen (when considering both input and output capabilities)
  • Modem
  • Internal Hard Drive (when considered data exchange)
  • SSD (Solid-State Drive) (when considered data exchange, even if it's an NVMe and attached to the motherboard)
  • GPU (Graphics Processing Unit) (when considered for its interfacing with output devices like monitors)

I/O Operation
^

In the context of data exchange, an I/O operation is any operation where data is transferred to/from the CPU + Memory. This could be expanded to include the entire motherboard (most developers don't have access to data exchange at the motherboard level). Data moving between the CPU and Memory has nanosecond latency whereas data moving between even an internal SSD has millisecond latency (microsecond if the SSD is NVMe).

I/O communication can be either asynchronous or synchronous.

I/O Management
^

All I/O devices and their communication are managed by the operating system. Many drivers run with the highest level of system privileges in the Kernel, while others are able to leverage existing Kernel functionality.

Distributed Systems
^

One important theme in distributed systems is the inherent commonality of network communications. Each microservice is its own container, so each request between them traverses the operating system's network stack. Some containers are on different virtual machines, and others are on completely different machines, requiring actual physical communication across network cables. Learn more at What is Kubernetes?.

Conclusion
^

Given the rise of distributed systems (that will continue), awareness of the nuances of I/O is more important than ever.

Updated: 2024-02-14