Input/Output Organisation

Input/Output Subsystem

The I/O subsystem of a computer provides an efficient mode of communication between the central system and the outside environment. It handles all the input-output operations of the computer system.

Peripheral Devices

Input or output devices that are connected to computer are called peripheral devices. These devices are designed to read information into or out of the memory unit upon command from the CPU and are considered to be the part of computer system. These devices are also called peripherals.

For example: Keyboardsdisplay units and printers are common peripheral devices.

There are three types of peripherals:

  1. Input peripherals : Allows user input, from the outside world to the computer. Example: Keyboard, Mouse etc.
  2. Output peripherals: Allows information output, from the computer to the outside world. Example: Printer, Monitor etc
  3. Input-Output peripherals: Allows both input(from outisede world to computer) as well as, output(from computer to the outside world). Example: Touch screen etc.


Interface is a shared boundary btween two separate components of the computer system which can be used to attach two or more components to the system for communication purposes.

There are two types of interface:

  1. CPU Interface
  2. I/O Interrface

Input-Output Interface

Peripherals connected to a computer need special communication links for interfacing with CPU. In computer system, there are special hardware components between the CPU and peripherals to control or manage the input-output transfers. These components are called input-output interface units because they provide communication links between processor bus and peripherals. They provide a method for transferring information between internal system and input-output devices.


Input Output Interface provides a method for transferring information between internal
storage and external I/O devices.
Peripherals connected to a computer need special communication links for interfacing them
with the central processing unit.
The purpose of communication link is to resolve the differences that exist between the
central computer and each peripheral.
The Major Differences are:-
1. Peripherals are electromechnical and electromagnetic devices and CPU and
memory are electronic devices. Therefore, a conversion of signal values may be
2. The data transfer rate of peripherals is usually slower than the transfer rate of CPU
and consequently, a synchronization mechanism may be needed.
3. Data codes and formats in the peripherals differ from the word format in the CPU and
4. The operating modes of peripherals are different from each other and must be
controlled so as not to disturb the operation of other peripherals connected to the
To Resolve these differences, computer systems include special hardware components
between the CPU and Peripherals to supervises and synchronizes all input and out transfers
→ These components are called Interface Units because they interface between the
processor bus and the peripheral devices.

Modes of Transfer

The binary information that is received from an external device is usually stored in the memory unit. The information that is transferred from the CPU to the external device is originated from the memory unit. CPU only processes the information but the source and target is always the memory unit. Data transfer between CPU and the I/O devices may be done in different modes.

Data transfer to and from the peripherals may be done in any of the three possible ways

  1. Programmed I/O.
  2. Interrupt- initiated I/O.
  3. Direct memory access( DMA).

Now let’s discuss each mode one by one.

Programmed I/O

It is due to the result of the I/O instructions that are written in the computer program. Each data item transfer is initiated by an instruction in the program. Usually the transfer is from a CPU register and memory. In this case it requires constant monitoring by the CPU of the peripheral devices.

Example of Programmed I/O: In this case, the I/O device does not have direct access to the memory unit. A transfer from I/O device to memory requires the execution of several instructions by the CPU, including an input instruction to transfer the data from device to the CPU and store instruction to transfer the data from CPU to memory. In programmed I/O, the CPU stays in the program loop until the I/O unit indicates that it is ready for data transfer. This is a time consuming process since it needlessly keeps the CPU busy. This situation can be avoided by using an interrupt facility. This is discussed below.

Interrupt Initiated I/O

Since in the above case we saw the CPU is kept busy unnecessarily. This situation can very well be avoided by using an interrupt driven method for data transfer. By using interrupt facility and special commands to inform the interface to issue an interrupt request signal whenever data is available from any device. In the meantime the CPU can proceed for any other program execution. The interface meanwhile keeps monitoring the device. Whenever it is determined that the device is ready for data transfer it initiates an interrupt request signal to the computer. Upon detection of an external interrupt signal the CPU stops momentarily the task that it was already performing, branches to the service program to process the I/O transfer, and then return to the task it was originally performing.

Direct Memory Access

Removing the CPU from the path and letting the peripheral device manage the memory buses directly would improve the speed of transfer. This technique is known as DMA.

In this, the interface transfer data to and from the memory through memory bus. A DMA controller manages to transfer data between peripherals and memory unit.

Many hardware systems use DMA such as disk drive controllers, graphic cards, network cards and sound cards etc. It is also used for intra chip data transfer in multicore processors. In DMA, CPU would initiate the transfer, do other operations while the transfer is in progress and receive an interrupt from the DMA controller when the transfer has been completed.

Input/Output Organisation

Above figure shows block diagram of DMA


The data transfer between a fast storage media such as magnetic disk and memory unit is limited by the speed of the CPU. Thus we can allow the peripherals directly communicate with each other using the memory buses, removing the intervention of the CPU. This type of data transfer technique is known as DMA or direct memory access. During DMA the CPU is idle and it has no control over the memory buses. The DMA controller takes over the buses to manage the transfer directly between the I/O devices and the memory unit.



NEXT : Difference Between Synchronous and Asynchronous Data Transfer

Author: Team

2 thoughts on “Input/Output Organisation

    1. Three basic techniques are available in current computers systems. From the least efficient to the best performing, we find:

      Programmed I/O where the CPU is strictly tied to the I/O until it is finished.
      Interrupt-driven I/O per character transfer
      DMA (Direct Memory Access) a memory controller mechanism programmed by the OS to exchange data at high rate between main memory and the I/O device; The big win with DMA is twofold. First we reduce the number of interrupts from one per character to one per buffer. Second we benefit from the streaming effect of the data transfer.

      The Operating System is responsible for choosing and managing the right technique for each specific I/O in order to deliver the best overall performance.

Leave a Reply

Your email address will not be published. Required fields are marked *