Documente Academic
Documente Profesional
Documente Cultură
INPUT-OUTPUT ORGANIZATION
3.1 EXTERNAL DEVICES:
I/O,
provides
an
efficient
mode
of
temporarily
hold
data
being
Input Device
1. Keyboard
2. Optical input devices
COA
Page 2
transferred
UNIT-3
Card Reader
(OCR)
devices.
Optical
Bar
code
reader
(OBR)
Digitizer
Magnetic
Ink
Character
devices.
Recognition (MICR)
4. Screen Input Devices
Touch Screen
Light Pen
Mouse
Plotter
Analog
Voice
bus.
I/O
modules
communication
perform
between
system
Page 3
UNIT-3
I/O Module Functions
device.
The I/O module returns the device
status.
If the device is operational and ready
to transmit, the processor requests the
I/O transformation
The detailed functions of I/O modules are;
1. Control & Timing: I/O module includes
control and timing to coordinate the flow
one
unique
Communication:
It
involves
Detection:
I/O
module
is
commands
processor.
Data: Data
are
from
the
exchanged
recognize
Page 4
UNIT-3
Control device functions or leave for CPU
modes.
Some modes use CPU as an intermediate path,
peripheral interfaces
I.
address bus.
II.
III.
Memory
Access (DMA)
Programmed I/O
input data.
Support
multiple
or
device
COA
transfer
in
initiated
by
the
UNIT-3
the CPU is in the continuous
monitoring of the interface.
Input
instruction
is
used
to
status register.
transfer
bit to zero
data
from
CPU
to
(a)
I/O Commands:
processor:
COA
Page 6
UNIT-3
unit may be instructed to rewind or to move
forward one record.
Test: Used to test various status conditions
associated with an I/O module and its
peripherals.
To know that the peripheral of interest
is powered on and available for use
and also to know if the most recent
I/O operation is completed and if any
errors occurred.
Read: Causes the I/O module to obtain an
item of data from the peripheral and place it in
an internal buffer (depicted as a data register
in Figure 7.3).The processor can then obtain
the data item by requesting that the I/O
module place it on the data bus.
Write: Causes the I/O module to take an item
of data (byte or word) from the data bus and
subsequently transmit that data item to the
peripheral.
I/O Instructions:
There will be many I/O devices connected
through I/O modules to the system. Each
device is given a unique identifier or address.
When the processor issues an I/O command,
the command contains the address of the
desired device.
Thus, each I/O module must interpret the
address lines to determine if the command is
for itself.
When the processor, main memory, and I/O share a
common bus, two modes of addressing are possible:
i.
Memory mapped :
There is a single address space for
memory locations and I/O devices.
COA
Page 7
UNIT-3
The processor treats the status and
data registers of I/O modules as
memory locations and uses the same
machine instructions to access both
total
of
2^10=
1024
II.
INTERRUPT DRIVEN I/O: (a)
The problem with programmed I/O is that the
processor has to wait a long time for the I/O
module
of
concern
to
be
ready
for
transmission of data.
In Interrupt driven I/O the processor issues an
I/O command to a module and then go on to
do some other useful work.
The I/O module will then interrupt the
processor to request service when it is ready to
exchange data with processor.
The processor then executes the data transfer,
and then resumes its former processing. The
interrupt can be initiated either by software or
by hardware.
COA
Page 8
UNIT-3
b. I/O module gets data from peripheral
whilst CPU does other work
c. I/O module interrupts CPU
d. CPU requests data
e. I/O module transfers data
(a)
Interrupt Design Issues:
First, because of
multiple
I/O
COA
instruction cycle
If interrupted:a) Save context (registers)
b) Process interrupt
c) Fetch data & store
Page 9
UNIT-3
The
requesting
module
typically
modules
The problem in this technique is even
will
I/O modules
attached to it.
So any one of the other three
vectored interrupt
d) Bus Arbitration (vectored):
Bus arbitration uses vector technique
An I/O module must first gain control
have
multiple
the
highest-priority
at a time.
When the
sequence
The highest-priority source is tested
first
Flexible since it is established by
software
Low cost since it needs a very little
hardware
Very slow
c) Daisy Chain:
I/O modules share a common interrupt
request line.
The interrupt acknowledge line is
COA
Page 10
processor
detects
the
acknowledge line.
The requesting module then places its
vector on the data lines.
I/O transfers
DMA Function
UNIT-3
may
DMA Operation:
The processor issues a command to DMA
module
Read or write
I/O device address using data lines
Starting memory address using data
register
The processor then continues with other work
DMA module transfers the entire block of data
context.
The processor executes more slowly,
but this is still far more efficient that
either programmed or interrupt-driven
I/O.
DMA Configurations:
DMA to memory
Processor suspended twice
UNIT-3
memory
Processor suspended once
memory
Processor suspended once
program in memory
Program specifies
Device or devices
Area or areas of memory
Priority
Error condition actions
Two type of I/O channels:
Selector channel:
Controls multiple high-speed devices
Dedicated to the transfer of data with
architecture.(5 M)
III.4.
I/O Channels and Processors:
The Evolution of the I/O Function
or I/O module
I/O channel
controls
these
I/O
controllers
Multiplexor channel:
Can handle multiple devices at the
same time
Byte multiplexor used for low-speed
devices
Block multiplexor interleaves blocks
of data from several devices.
Page 12
UNIT-3
COA
Page 13