I/O (input/output), pronounced "eye-oh," describes any operation, program or device that transfers data to or from a computer. Common I/O devices include printers, hard disks, keyboards and mice. Input/output devices play a crucial role in computer programming by streamlining how computing devices communicate across a network.
In computer architecture, I/O encompasses a range of tasks that must be executed properly to support sharing data among discrete machines. All types of data movement within a system rely on I/O operations, including audio files, software instruction sets, text and video streams.
Input/output signals carry instructions that a computer's central processing unit (CPU) must execute to initiate data transfer. The input can come from hardware, software or human interaction.
I/O input signals shuttle data from a CPU, storage controller or memory to a storage device. I/O output signals flow from a computer to an output device.
Some I/O devices are input-only devices, meaning they send data but do not receive data; output-only devices do the opposite, receiving input but not able to send data to other machines. Some I/O devices receive input, process the data and produce output.
How do I/O operations occur?
I/O devices are categorized generally as storage, network communications, user interface or related hardware services that use discrete systems to interface with a computer. To communicate, devices use parallel or serial I/O ports, or an over-the-air signal.
Input/output falls into two categories: hard I/O and soft I/O. Hard I/O refers to a straightforward transfer of data that occurs between a computer and an external physical device, such as a keyboard or a mouse. Soft I/O occurs when data is transferred between computers or servers over a network, such as streaming media or file sharing.
I/O operations are calculated based on the number of operations that occur per second, also known as IOPS, or as a measure of transfer speed. I/O performance is affected by the capabilities of the equipment within a computer, including drives, graphics cards and network gear.
What is I/O memory management?
Modern computing systems are often built with an I/O processor situated between the system bus and attached peripherals. I/O processors are specifically equipped to handle the operations associated with data transfer.
To facilitate communication between I/O devices and processors, an I/O interface identifies all addresses generated by the CPU. Controllers are tasked with making sure data is transmitted to the computer's assortment of components. Various control methods are used, including the following:
Programmed I/O (PIO). This method requires the processor to execute commands for every I/O transfer; thus, it is the slowest method. The advantage is that programmed I/O is the simplest to program.
Interrupt-driven I/O. With this method, an I/O device sends a command when it is ready to receive data. The CPU then suspends what it is doing temporarily to carry out the new instructions before resuming its prior activities. In this way, the CPU does not need to check the receiving status of the I/O device.
Advanced Programmable Interrupt Controller (APIC). This variation sends an interrupt signal to the APIC to notify the processor when a device is prepared to send data.
Direct memory access (DMA). DMA bypasses the CPU to send data commands from peripherals to main memory. DMA is the replacement for PIO, also known as programmable I/O, a process in which the CPU manages all data transactions.
Input-output memory machine unit (IOMMU). Designed for virtual machines, IOMMU allows an operating system (OS) to correlate the mapping of physical and virtual devices to efficiently allocate memory resources.
What's the difference between I/O input and I/O output?
I/O devices are categorized as storage, networking, user interface or related hardware-enabled services that connect discrete machines or systems.
Management of I/O devices is handled by the computer's OS via a dedicated subsystem designed to manage device drivers or any attached hardware. Modern computers support a range of devices, including audio and video drives, Bluetooth adapters, disk drives, display adapters, dongles, high-speed printers, modems, USB flash drives and mobile hotspots.
An I/O input device creates an interface between end users and a computer or another information system. The input device sends commands via a hardware component, software or human interaction. In I/O input, data flows from the device to a computer.
I/O output operations refer to data signals sent by the output device in response to the data input. The data flows from the computer to the output device, where it is extracted and processed. The processing ensures the data output is presented in a manner that users will understand.
What are I/O input devices?
I/O input-only devices include the following:
Analog-to-digital converters.
Barcode readers.
Biometric devices.
Computer mice and trackballs.
Digital cameras.
Electronic drum kits.
Joysticks.
Keyboards.
Light pens.
Magnetic stripe readers.
Magnetic tape drives.
Microphones.
Optical character recognition readers.
Scanners.
Sensors.
Stylus pens.
Touchscreens.
Webcams.
What are I/O output devices?
Devices that handle only I/O output include the following:
Braille readers.
Cathode-ray tube monitor displays.
Graphics cards.
Headphones.
Liquid crystal display panels.
Printers and plotters.
Projectors.
Speakers.
Which I/O devices provide data input and data output?
Voice-activated virtual assistants illustrate technologies that handle both input and output of data. When users vocalize search requests, these devices retrieve the requested information and convey the results using natural language processing. The user's request is the input; the device's voice response is the output.
Hard disk drives and solid-state drives (SSDs) can be classified as both input and output devices. Data is written to NAND flash-based drive sectors and can also be fetched from the SSD.
Other devices that are able to send and receive data include the following:
Diskettes.
High-performance computing systems.
Modems.
Network interface cards.
Removable storage devices.
Writable CD-ROMs.
A device driver, or driver, is a special kind of software program that controls a specific hardware device attached to a computer. Device drivers are essential for a computer to work properly. In addition, without a device driver, the respective hardware will fail to work accordingly.
Device drivers provide a software interface for attached hardware that enables the operating system (OS) and other applications to access that hardware's functionalities. There are device drivers for keyboards, mice and printers, for example.
These programs are compact, but they enable a computer to interact with hardware and work with networks, storage and graphics.
Device drivers are hardware dependent and specific to the OS. They communicate with computer hardware through a computer bus or a communications subsystem that's connected to the hardware.
The terms hardware driver and software driver might also be used interchangeably with device driver. However, hardware and software driver are used to emphasize the type of connection.
How do device drivers work?
Device drivers generally run at a high level of privilege within the OS runtime environment. Some device drivers are linked directly to the OS kernel -- a core part of the OS that manages system resources and hardware. These device drivers enable more efficient communication and control over hardware devices.
A portion of an OS -- such as Windows, Linux or macOS -- remains memory resident. This means that a part of the OS stays loaded in the computer's RAM while the system is running and handles execution for all other code, including device drivers. Device drivers relay requests for device access and actions from the OS and its active applications to their respective hardware devices. They also deliver outputs or status messages from the hardware devices to the OS and, thus, to applications.
Most software programs don't need to know how to work directly with hardware because of the work device drivers do. Instead, the program and driver only need to know how to interface with each other.
Most of the time, drivers install automatically and don't require additional attention. However, some drivers require an occasional update.
Purpose of device drivers
Device drivers are necessary to enable a computer to interface and interact with specific devices. They define the messages and mechanisms whereby the computer -- the OS and applications -- can access the device or make requests for the device to fulfill. They also handle device responses and messages for delivery to the computer.
Device drivers essentially act as a translator for hardware devices and the OS and applications connected to it.
Types of device drivers
Invariably, hardware devices belong to a specific class, such as Bluetooth or 802.11xx wireless networking. Creating any specific device driver starts by working within its class framework. Within that class, a particular type of device -- such as Bluetooth audio, keyboards or mice -- also falls within a related driver framework.
Finally, for a specific individual device, within its class and type frameworks, its driver software interacts with that device using its native command set and data handling capabilities, as defined and published by its manufacturer. In addition, device drivers can access physical devices -- actual hardware -- or virtual devices that are emulations of hardware in a software program. The former are called physical drivers, and the latter are called virtual drivers.
There are several different possible types of device drivers, including the following:
BIOS. These drivers are responsible for booting the computer, performing startup tests and providing the drivers for basic hardware. BIOS device drivers are located in read-only memory.
Block drivers. These drivers offer structured access to hardware. They use file system buffers to reduce I/O operations.
Character drivers. These drivers provide unstructured access to the correlating hardware. Data is transferred to and from devices without the use of specific device addresses. They also provide interfaces for I/O control commands, memory mapping and device polling.
Kernel device drivers. These drivers are loaded with the OS for core hardware such as processors. They enable more efficient communication and control over hardware devices. They operate in layers, with higher-level drivers filtering data before passing it to lower-level ones.
Motherboard drivers. These drivers enable basic computer operations and peripheral connectivity in the OS. They're specific to chipset models and might need additional drivers for full functionality.
Open source drivers. These drivers are available for free under an open source license. They're often transparent, as the source code is open to anyone, making it possible to check for any malicious code.
Original equipment manufacturer drivers. OEM drivers are created by the original equipment manufacturers. They're proprietary drivers and installed separately to enable the functionality of additional hardware.
User-mode device drivers. These drivers run in user mode and manage external devices to which users might connect. In Windows, they interface between applications and kernel-mode drivers.
Virtual device drivers. These drivers control virtual machines. Virtual device drivers emulate the hardware of the host device.
There are many different types of devices that can have their own respective drivers as well. Some examples of these more specific drivers include the following:
Bluetooth drivers.
Mouse drivers.
Digital camera drivers.
Graphics card drivers.
Keyboard drivers.
Motherboard drivers.
Network card drivers.
PC chipset drivers.
Printer drivers.
Sound card drivers.
Storage controller drivers.
USB device drivers.
Video card drivers.
You can gather hardware information using the following commands:
cat /proc/cpuinfo
lscpu
cat /proc/meminfo
free -h
lsblk
df -h
fdisk -l
lsusb
lspci
lshw
# Or a summary:
lshw -short
lsblk
lspci | grep VGA
dmidecode
Note: You may need sudo for lshw and dmidecode.