Input Output Organization
Input Output Organization
Input Output Organization
ORGANIZATION
Peripheral Devices
• Input output subsystem of computer system provides an efficient
mode of communication between central system and outside system.
• Input and output devices attached to computer are called peripherals.
• Common peripherals are keyboard, monitor, printer, magnetic disks
etc.
• IO devices communicates to and from the device and computer using
alphanumeric characters.
• ASCII(American Standard Code for Information Interchange) is the
standard binary code for the alphanumeric characters.
• ASCII table contains 128 characters
out of which 94 char are printing
and 34 char are non printing.
• 94 Printing characters are:
• 26 uppercase letters A through Z.
• 26 lowercase letters a through z.
• 10 numerals 0 through 9.
• 32 special printable characters like
%, *, @ etc.
• 34 control characters are shown in
the table.
• ASCII is a 7 bit code, but in most
computer they are stored in 8
bit(1 byte).
Input Output Interface
• Input output interface provides a method for transferring information
between internal storage and external I/O devices.
• I/O interface resolves the differences between CPU and peripherals.
• Key differences are :
• Peripherals are electromechanical and electromagnetic devices, CPU and
memory are electronic devices. Therefore conversion of signals may be required.
• Data transfer rate of peripherals is slower than CPU, therefore a synchronisation
mechanism is needed.
• Data code formats in peripherals are different from as in CPU & memory.
• Operating modes of different peripherals is different from each other and each
must be controlled so as not to disturb operation of others connected to CPU.
I/O Bus and Interface Modules
• As the address is made available in address lines, processor provides I/O
command that is executed in the interface and attached peripheral device.
There are four types of commands processor may issue:
• Control command: issued to activate the peripheral and to inform what to do. Ex.
Magnetic tape unit is instructed to rewind or move forward the tape.
• Status command: used to test various status conditions in the interface and peripherals.
Ex. Computer wish to check the status of a peripheral before a transfer is initiated.
• Output data: It causes interface to transfer data from the bus into peripheral’s register.
Ex. Computer starts the tape moving by issuing a control command. Status of tape is
monitored by status command. When tape is in correct position, the processor issues a
data output command. The interface transfers information from bus to its buffer register
and then buffer register to tape using tape controller.
• Input data: The interface receives data from peripheral and places it in its buffer register.
The processor checks availability of data by means of status command and then issues
data input command. The interface places data on the bus, which is accepted by the
processor.
I/O verses Memory Bus
Isolated verses memory mapped I/O
• Computer use common bus to transfer information between memory
or I/O and CPU.
• CPU specify whether the address on address line is for memory or
interface register.
• I/O read or write control lines are enabled during I/O transfer.
• Memory read or write control lines are enabled during memory
transfer.
• This configuration isolates I/O interface addresses from memory
address and called isolated I/O method.
Isolated verses memory mapped I/O
• In isolated I/O, CPU has distinct I/O instruction, and each instruction is
associated with address of interface register.
• When CPU decodes the I/O instruction, it places associated address
into the common address line and at the same time, it enables I/O read
or write control line.
• This informs external unit that address is for an interface register.
• On the other hand, when CPU fetches memory instruction, it places
memory address on the address line and enables memory read or write
control.
• This informs the external unit that the address is for memory.
Isolated verses memory mapped I/O
• Isolated I/O method uses separate address space of I/O and memory.
• In memory mapped method same address space is used for the both.
• In this case only one set of read and write signals are used for both I/o and
memory. This is called memory mapped I/O.
• CPU treats interface registers as a part of memory system.
• The addresses assigned to interface registers can not be used for memory
words.
• In memory mapped I/O, there is no specific I/O instruction.
• Same instructions are used to manipulate data in memory and I/O interface
registers.
An Example of I/O Interface unit
Asynchronous Data Transfer
Strobe Control
• The strobe control method of asynchronous data transfer employs a
single control line to each transfer.
• Strobe may be initiated by either source or destination unit.
Handshaking
Modes of Transfer
Programmed I/O
Interrupt initiated I/O
Direct Memory Access (DMA)
Input Output Processor (IOP)
Direct Memory Access (DMA)
The transfer of data between a fast storage device such as magnetic disk and memory is often
limited by the speed of the CPU. Removing the CPU from the path and letting the peripheral
device manage the memory buses directly would improve the speed of transfer. This transfer
technique is called direct memory access (DMA). During DMA transfer, the CPU is idle and has
no control of the memory buses. A DMA controller takes over the buses to manage the
transfer directly between the I/O device and memory.