You are on page 1of 12

Input-Output Organization

Prepared by:
Ms. Ruby Dahiya
Peripheral Devices
• The equipments that are attached to the computer
system externally i.e., that are not part of the
motherboard are termed as peripheral devices.

• An I/O operation can be divided three areas:


 Input/output devices themselves that convert data
into a form.
 The interface circuit that actually moves the data
into or out of the computer.
 The technique which data is moved in or out of the
computer.
Input/Output (I/O) Interface
• An I/O interface is an entity that controls
the data transfer from external device,
main memory and/ or CPU registers.
• It is responsible for managing the use of
all devices that are peripheral to a
computer system.
• It attempts to make an efficient use of all
available devices while retaining the
integrity of the data.
Problems in I/O Device Management
• Most of the peripheral devices are either
electromechanical or electromagnetic whereas
the computer is an electronic device.
• The data transfer rate of peripherals is usually
slower than thee transfer rate of CPU, so a
synchronization mechanism may be needed.
• Data codes and formats in peripherals differ
from the word format in the CPU and memory.
• The operating modes of peripherals are
different from each other and they need not to
disturb the operation of other peripherals
connected to the CPU.
Aims of I/O Module

• Achieve device independence


• Handle errors
• Speed up transfer of data
• Handle deadlocks
• Enable multi-user systems to use
dedicated devices
Functions of I/O Interface
• Control and timing signals
• Processor Communication
i. Command decoding
ii. Data
iii. Status reporting
iv. Address recognition
• Device communication
• Data buffering
• Error detection
Command Received by an Interface

1. Control command: issued to activate the


peripheral and to inform it what to do.
2. Status command: used to test various status
conditions in the interface and the peripheral.
3. Data output command: transfers the data from
the bus into one of the interface registers.
4. Data input command: forwards the data
received from the peripheral and stored in the
buffer register to the processor by putting it on
the data lines.
I/O versus Memory Bus
There are three ways that computer buses
can be used to communicate with memory
and I/O:
1. Use two separate buses, one for memory and
the other for I/O. (IOP)
2. Use one common bus for both memory and
I/O but have separate control lines for each.
(Isolated I/O)
3. Use one common bus for memory and I/O
with common control lines. (Memory-mapped)
Isolated I/O
• A separate address space is used for both
memory and I/O devices.

• The CPU has distinct input and output


instructions.

• It’s advantages are:


a) Small no. of I/O instructions.
b) Commonly usable.
Isolated I/O (cont’d)
• The steps taken for communication are:
a.CPU decodes the operation for i/p or o/p.
b.The address of associated device is
placed on the common address bus.
c.It enables I/O read (for input) and I/O write
( for output).
d.External device now knows that the
address on the bus is meant for the
interface and not for memory.
Memory-Mapped I/O
• It is a single address space for storing
both memory and I/O devices.
• It employs one set of read and write
signals and have no specific input or
output instructions.
• The computer treats an interface register
as being part of the memory system.
• The assigned addresses for interface
registers cannot be used for memory
words,
Memory-Mapped I/O (cont’d)
• Advantages:
a) More efficient programming allowed.
b) Single read line and single write lines
needed.
• Disadvantages:
a) Valuable memory address space used up.
b) I/O module registers treated as memory
addresses.
c) Same machine instructions used to
access both memory and I/O devices.

You might also like