Input/Output Organisation and Interrupt Initiated I/O

Computer Architecture: Input/Output Organisation

In this tutorial we will learn about how Input and Output is handled in a computer system.

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 outised world to computer) as well as, output(from computer to the outside world). Example: Touch screen etc.

Interfaces

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.
A boundary across which two independent systems meet and act on or communicate with each other. In computer technology, there are several types of interfaces.
  • user interface - the keyboard, mouse, menus of a computer system. The user interface allows the user to communicate with the operating system. i.e. GUI, Command line Interface.
  • software interface - the languages and codes that the applications use to communicate with each other and with the hardware.
  • hardware interface - the wires, plugs and sockets that hardware devices use to communicate with each other.

Let's understand the I/O Interface in details,

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.
transfer information between internal storage(CPU & memory) and external storage(peripherals devices)
Peripherals is electromechanical or electromagnetic devices.
CPU is an electronic device.
i/o devices have low rate of data transfer.


The data bus, address bus and control bus that arise out of the processor and are intended to communicate with I/O devices are called I/O bus. The communication link between the processor and several peripherals is shown in the given figure. The I/O bus is connected to all peripheral interfaces. To communicate with a particular device, the processor places a device address on the address bus. Each interface attached to the I/O bus contains an address decoder that monitorsthe address lines. When the interface detects an address to be its own, it activates the path between the bus and the device that it controls. All other peripherals are disabled. At the same time, a function code is provided to the control bus which is called I/O command. The types of I/O commands that are given out by the processor are:
  1. Control Commands: This is the function code that activates the corresponding peripherals and informs them about what to do.
  2. Status Commands: A status command is used to test various status conditions in the interface and the peripheral devices like BUSY, ERROR, data available or not in the buffer etc .
  3. Data Output Command: A data output command causes the interface to respond by transferring the data from the processor to the peripheral. The data is sent from the CPU to the buffer of interface after this command is provided.
  4. Data Input Command: This command is sent by the CPU if the data is to be read from the peripheral. After this command is issued, the data of peripheral are extracted into the buffer of the interface and are read by the CPU.


Data, address, and control bus.

Modes of I/O Data Transfer

Data transfer between the central unit and I/O devices can be handled in generally three types of modes which are given below:
  1. Programmed I/O
  2. Interrupt Initiated I/O
  3. Direct Memory Access

Programmed I/O

Programmed I/O instructions are the result of I/O instructions written in computer program. Each data item transfer is initiated by the instruction in the program.
Usually the program controls data transfer to and from CPU and peripheral. Transferring data under programmed I/O requires constant monitoring of the peripherals by the CPU.

Interrupt Initiated I/O

In the programmed I/O method the CPU stays in the program loop until the I/O unit indicates that it is ready for data transfer. This is time consuming process because it keeps the processor busy needlessly.
This problem can be overcome by using interrupt initiated I/O. In this when the interface determines that the peripheral is ready for data transfer, it generates an interrupt. After receiving the interrupt signal, the CPU stops the task which it is processing and service the I/O transfer and then returns back to its previous processing task.

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.




Serial Data Communication

Lets' start by understanding what Data communication processors are,

Data Communication Processor

A data communication processor is an I/O processor that distributes and collects data from numerous remote terminals connected through telephone and other communication lines to the computer. It is a specialized I/O processor designed to communicate with data communication networks.
Such a communication network consists of variety of devices such as printers, display devices, digital sensors etc. serving many users at once. The data communication processor communicates with each terminal through a single pair of wire. It also communicates with CPU and memory in the same manner as any I/O processor does.

What is Modem?

In a Data Communication Network, the remote terminals are connected to the data communication processor through telephone lines or other wires. Such telephone lines are specially designed for voice communication and computers use them to communicate in digital signals, therefore some conversion is required. These conversions are called modem (modulator-demodulator).
A modem converts digital signal into audio tones to be transmitted over telephone lines and also converts audio tones into digital signal for machine use.

Modes Of Transmission

Data can be transmitted between 2 points by three different modes:

Simplex

A simplex line carries information in one direction only. In this mode receiver cannot communicate with the sender to indicate the occurrence of errors that means only sender can send data but receiver cannot. For example: Radio and Television Broadcasting.
Simplex mode of transmission

Half Duplex

In half duplex mode, system is capable of transmitting data in both directions but data can be transmitted in one direction only at a time. A pair of wires is needed for this mode. For example:Walkie - Talkie.
Half Duplex mode of transmission


Comments

Popular posts from this blog

WHAT ETHICAL, SOCIAL, AND POLITICAL ISSUES ARE RAISED BY INFORMATION SYSTEMS?

Porter’s Value Chain Analysis

General Register organization & Components of CPU and their functions: