In computing, I/O (pronounced “eye-oh”) stands for input/output and describes any program, device or operation that transfers data to or from a computing system. In other words, I/O is the way we transfer data from the system to the user and vice versa. Typical I/O devices include keyboards and printers.
Input is the data we send to the system, while output is the data that comes from the system. Without I/O, there would be no way for us to interact with our many computing and technological systems.
Types of I/O
We can split I/O into two broad categories: hard I/O and soft I/O.
- Hard I/O refers to data transfer between a computer and a physical device, like a keyboard or mouse.
- Soft I/O refers to input and output that occurs over a network, for example, when a computer communicates with other computers, streams media or transfers files.
I/O Control Methods
In order for a system to communicate with external devices and other computers, it uses controllers to transfer data between the various components of a computer. Within a computer system, a controller is a device or program that manages or directs the operations of other devices or programs. Typical computer systems contain both hardware- and software-based controllers that serve as intermediaries between I/O devices.
There are four control method types.
1. Programmed I/O
With programmed I/O, the processor executes a program instruction for every I/O data transfer. This control method is the slowest but simplest to program.
2. Interrupt-Driven I/O
A processor is interrupted when an I/O device needs to transfer data. The processor will halt its normal processing to execute the device’s instructions, then resume normal processing afterward. In this case, a processor, also known as CPU (central processing unit), interprets and executes instructions it receives from a computer program. Processors are physical devices within a computer system that perform calculations and process input data. Processors act as the brains of the computer and supply the computing power needed for a system to manage the constant stream of instructions it receives.
This control method is faster than programmed I/O, but also is more difficult to program.
3. Direct Memory Access (DMA)
This occurs when the processor only has to initiate the data transfer and the DMA controller takes over to complete it. This control method is very fast compared to programmed and interrupt-driven I/O, and also more efficient because it requires minimal processor involvement.
4. Advanced Programmable Interrupt Controller (APIC)
In this method, when the processor receives notification that a device is ready to transfer data, it sends a signal to the APIC. The APIC then sends an interrupt to the processor so it can execute the program. This control method is the fastest of the four, but is most complex in terms of programming.
Examples of I/O
There are several different examples of input/output. Here are some of the most common ones.
I/O Device Examples
- Keyboard Input: When a user enters data into a system using a keyboard
- Mouse Input: When a user interacts with a system through a mouse
- Touchscreen Input: When a user interacts with a system by touching the screen
- Voice Input: When a user speaks into a system to enter data or perform an action
- Printer Output: When a system sends data to a printer
- Speaker Output: Used to send data from a system to a user through an audio output
- Video Output: When a system sends data to a monitor or TV for display
As you may have noticed, I’ve described the above I/O examples as either input or output but it’s important to note that some devices may support both. While keyboards and mice are input-only devices, there are other examples of I/O that can send data to a system and also receive it. Consider voice-activated systems on smart devices like Siri, Amazon Alexa or Google Home. These devices can receive voice commands (input) and respond back to the user (output).
Other examples of devices that are both input and output include hard drives and writable CD-ROMs. These can each receive data from a system (when they’re being written to) or send data to the system (if they have data loaded on them already).
As technology has become more integrated with our lives, the amount of I/O devices continues to grow. Although the concept of I/O has been around since the inception of the computer, it remains important to understand due to its importance for modern-day technology. Without I/O devices, we wouldn’t be able to do simple things like participate in video conference calls, remotely lock our cars or ask Alexa to add eggs to our shopping list.