0% found this document useful (0 votes)
70 views

Module 6 - IO Organization - Final

The document discusses input/output (I/O) organization and techniques. It describes: 1) I/O modules that interface the CPU and memory with peripheral devices, performing functions like control, communication, buffering, and error detection. 2) Modes of I/O data transfer including programmed I/O, interrupt-initiated I/O, and direct memory access. 3) Examples of early I/O processors like the Intel 8089 that handled I/O processing to reduce the CPU's workload.

Uploaded by

jbd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Module 6 - IO Organization - Final

The document discusses input/output (I/O) organization and techniques. It describes: 1) I/O modules that interface the CPU and memory with peripheral devices, performing functions like control, communication, buffering, and error detection. 2) Modes of I/O data transfer including programmed I/O, interrupt-initiated I/O, and direct memory access. 3) Examples of early I/O processors like the Intel 8089 that handled I/O processing to reduce the CPU's workload.

Uploaded by

jbd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Module 6: I/O Organization

Mrs. Minakshi S. Ghorpade


Input / Output systems:
• Inputs are the signals or data received by the system, and outputs are the signals or data sent from it.
• Input/Output modules is interface to CPU and Memory with one or more peripherals.
• An I/O module has two major functions:
i) Interface to the processor and memory via the system bus or central switch
ii) Interface to one or more peripheral devices by tailored data links

The major functions performed by I/O module.


• Control and timing
• Processor communication
• communication with peripherals
• Data buffering between the CPU and Peripherals
• Error detection

Page 2
Generic Model of an I/O Module

The link is used to exchange control, status, and data between the I/O module and the external device.

The interface to the I/O module is in the form of control, data, and status
signals. Control signals determine the function that the device will
perform, such as send data to the I/O module (INPUT or READ), accept
data from the I/O module (OUTPUT or WRITE), report status, or perform
some control function particular The link is used to exchange control,
status, and data between the I/O module and the external device.to the
device.
Data are in the form of a set of bits to be sent to or received from the I/O
Figure : Generic Model of an I/O Module
module. Status signals indicate the state of the device.
Examples are READY/NOT-READY to show whether the device is ready
for data transfer.

Page 3
Input / Output Processor

• An input-output processor (IOP) is a processor with direct memory access capability.

• In this, the computer system is divided into a memory unit and number of processors.

• Each IOP controls and manage the input-output tasks.

• The IOP is similar to CPU except that it handles only the details of I/O processing.

• The IOP can fetch and execute its own instructions.

• These IOP instructions are designed to manage I/O transfers only.

Page 4
I/O Module Structure

Block diagram of an I/O module

Page 5
• The module connects to the rest of the computer through a set of signal lines (e.g., system bus lines).
• Data are transferred to and from the module are buffered in one or more data registers.
• There may also be one or more status registers that provide current status information.
• A status register may also function as a control register, to accept detailed control information from the processor.
• The logic within the module interacts with the processor via a set of control lines. The processor uses the control
lines to issue commands to the I/O module

Page 6
8089 IO Processor

• The Intel 8089 input/output coprocessor was available for


use with the 8086/8088 central processor.
• It used the same programming technique as 8087 for
input/output operations, such as transfer of data from
memory to a peripheral device, and so reducing the load on
the CPU.
• Because IBM didn't use it in IBM PC design, it did not
become well known; later I/O-coprocessors did not keep the
x89 designation the way math coprocessors kept the x87
designation.

Pinout for 8089 Processor

Page 7
Intel 8089 l/0 processor
• The Intel 8089 l/0 processor is contained in a 40-pin integrated circuit package. Within the 8089 are two
independent units called channels. Each channel combines the general characteristics of a processor unit
with those of a direct memory access controller.

• The 8089 is designed to function as an IOP in a microcomputer system where the Intel 8086 microprocessor
is used as the CPU. The 8086 CPU initiates an l/0 operation by building a message in memory that describes
the function to be performed. The 8089 IOP reads the message from memory, carries out the operation, and
notifies the CPU when it has finished.

Page 8
Functions

• The 8086 functions as the CPU and the 8089 as the IOP.

• The two units share a common memory through a bus controller connected to a system bus, which is called
a "multibus" by Intel.

• The IOP uses a local bus to communicate with various interface units connected to l/O devices.

• The CPU communicates with the IOP by enabling the channel attention line.

• The select line is used by the CPU to select one of two channels in the 8089. The IOP gets the attention of
the CPU by sending an interrupt request.

Page 9
Modes of I/O Data Transfer techniques:

• Data transfer between the central unit and I/O devices can be handled in generally three types of
modes which are given below:

• Programmed I/O

• Interrupt Initiated I/O

• Direct Memory Access

Page 10
Programmed I/O

• In this I/O technique, data are exchanged between the processor and the I/O module.
• The processor executes a program that gives it direct control of the I/O operation, including sensing
device status, sending a read or write command, and transferring the data.
• When the processor issues a command to the I/O module, it must wait until the I/O operation is
complete.
• If the processor is faster than the I/O module, this is wasteful of processor time.

Page 11
I/O Commands
To execute an IO-related instruction, the processor issues an address, specifying the particular I/O module and
external device, and an I/O command. There are four types of I/O commands that an I/O module may receive when it is
addressed by a processor:

• Control: Used to activate a peripheral and tell it what to do

• Test: Used to test various status conditions associated with an I/O module and its peripherals.

• Read: Causes the I/O module to obtain an item of data from the peripheral and place it in an internal buffer. 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.

Page 12
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.

Page 13
Programmed I/O process Programmed I/O
· CPU has direct control over I/O for :
· Sensing status
· Read/write commands.
· Transferring data
· CPU waits for I/O module to complete operation.
· Wastes CPU time.

-> Programmed I/O in detail


• CPU requests I/O operation
• I/O module performs operation
• I/O module sets status bits
• CPU checks status bits periodically
• I/O module does not inform CPU directly
• I/O module does not interrupt CPU
• CPU may wait or come back later

-> I/O Commands


· Control - telling module what to do. (e.g. spin up disk)
· Test - check status
Programmed I/O process
· Read/Write
Page 14
Advantages and dis advantages of Programmed I/O

Page 15
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.

Page 16

Interrupt-driven I/O process : Interrupt driven I/O techniques working

Interrupt Driven I/O


· Overcomes CPU waiting
· No repeated CPU checking of device
· I/O module interrupts when ready

-> Interrupt Driven I/O in detail


CPU issues read command
• I/O module gets data from peripheral while CPU does
other work
• I/O module interrupts CPU
• CPU requests data
• I/O module transfers data

Interrupt-driven I/O process

Page 17
Interrupt-driven I/O process : Interrupt driven I/O
techniques working
1.A device driver initiates an I/O request on behalf of a process.

2.The device driver signals the I/O controller for the proper device, which initiates the requested I/O.

3.The device signals the I/O controller that is ready to retrieve input, the output is complete or that an
error has been generated.

4.The CPU receives the interrupt signal on the interrupt-request line and transfer control over the
interrupt handler routine.

5.The interrupt handler determines the cause of the interrupt, performs the necessary processing and
executes a “return from” interrupt instruction.

6.The CPU returns to the execution state prior to the interrupt being signaled.

7.The CPU continues processing until the cycle begins again.

Page 18
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.

• Direct memory access (DMA) is a mode of data transfer between the memory and I/O devices. This
happens without the involvement of the processor. We have two other methods of data transfer ,

Page 19
DMA
•DMA Operation: Registers of DMA

•When the processor wishes read or send a block of data, it issues a command to the
DMA module by sending some information to DMA module. The information
includes:

1. read or write command, sending through read and write control lines.
2. number of words to be read or written, communicated on the data lines and
stored in the data count register.
3. starting location in memory to read from or write to, communicated on data lines
and stored in the address register.
4. address of the I/O device involved, communicated on the data lines.
5. CPU is involved only at the beginning and end of the data transfer
DMA block diagram

DMA controller deals with transfer:


Directly to or from memory without going through CPU.

Page 20
DMA Operation: Registers of DMA

Whenever a processor is requested to read or write a block of data, i.e. transfer a block of data, it instructs
the DMA controller by sending the following information.

1.The first information is whether the data has to be read from memory or the data has to be written to the
memory. It passes this information via read or write control lines that is between the processor and DMA
controllers control logic unit.

2.The processor also provides the starting address of/ for the data block in the memory, from where the
data block in memory has to be read or where the data block has to be written in memory. DMA controller
stores this in its address register. It is also called the starting address register.

3.The processor also sends the word count, i.e. how many words are to be read or written. It stores this
information in the data count or the word count register.

4.The most important is the address of I/O device that wants to read or write data. This information is
stored in the data register.

Page 21
Direct Memory Access Controller & it’s Working
DMA controller is a hardware unit that allows I/O devices to access memory directly without the participation of
the processor. Here, we will discuss the working of the DMA controller. Below we have the diagram of DMA
controller that explains its working: 1.Whenever an I/O device wants to transfer the data to or from
memory, it sends the DMA request (DRQ) to the DMA
controller. DMA controller accepts this DRQ and asks the CPU
to hold for a few clock cycles by sending it the Hold request
(HLD).
2.CPU receives the Hold request (HLD) from DMA controller
and relinquishes the bus and sends the Hold acknowledgement
(HLDA) to DMA controller.
3.After receiving the Hold acknowledgement (HLDA), DMA
controller acknowledges I/O device (DACK) that the data
transfer can be performed and DMA controller takes the charge
of the system bus and transfers the data to or from memory.
4.When the data transfer is accomplished, the DMA raise
an interrupt to let know the processor that the task of data
transfer is finished and the processor can take control over the
bus again and start processing where it has left.

Page 22
Configurations of DMA

DMA mechanism can be configured in a variety of ways, which are:


1. Single-bus, detached DMA
2. Single-bus, integrated DMA-I/O
3. I/O bus

1. Single-bus, detached DMA

All modules share the same system bus. The DMA module is acting as a surrogate processor, which uses
programmed I/O to exchange data between memory and an I/O module through the DMA module. This
configuration is inexpensive, but is inefficient. This is because each transfer of a word consumes two bus
cycles.

Page 23
2. Single-bus, integrated DMA

In this configuration, there is a path between the DMA module and one or more I/O module that does not include the
system bus. The DMA logic can be a part of an I/O module, or a separate module that controls one or more I/O modules.
Therefore, the number of required bus cycles can be cut substantially. The system bus that the DMA module shares with
the processor and memory is used by the DMA module only to exchange data with memory. The exchange of data
between the DMA and I/O modules takes place off the system bus.

Page 24
3. I/O bus

In this configuration, the concept is further improves from the previous configuration, which is single-bus, integrated
DMA. I/O modules are connected to the DMA module using an I/O bus. This can reduce the number of I/O interfaces
in the DMA module to one and provides for an easily expandable configuration. The system bus that the DMA module
shares with the processor and memory is used by the DMA module only to exchange data with memory. The exchange
of data between the DMA and I/O modules takes place off the system bus.

Page 25
Direct Memory Access Advantages and Disadvantages

Advantages:
1.allows a peripheral device to read from/write to memory without going through the CPU
2.allows for faster processing since the processor can be working on something else while the peripheral
can be populating memory

Disadvantages
1. requires a DMA controller to carry out the operation, which increases the cost of the system
2.Cache coherence problem can occur while using DMA controller.

Page 26
DMA transfer Modes

Page 27
Peripheral devices

• Peripheral devices are those devices that are linked either internally or externally to a computer.
• These devices are commonly used to transfer data.
• The most common processes that are carried out in a computer are entering data and displaying
processed data.
• Several devices can be used to receive data and display processed data.
• The devices used to perform these functions are called peripherals or I/O devices.
• Peripherals read information from or write in the memory unit on receiving a command from the
CPU.
• They are considered to be a part of the total computer system.
• As they require a conversion of signal values, these devices can be referred to as
electromechanical and electromagnetic devices.
• The most common peripherals are a printer, scanner, keyboard, mouse, tape device, microphone,
and external modem that are externally connected to the computer.

Page 28
Keyboard

• The keyboard is the most commonly used input device.


• A keyboard is for putting information including letters, words and numbers into your computer.
You press the individual buttons on the keyboard when you type.
• The number keys across the top of the keyboard are also found on the right of the keyboard.
• It is used to provide commands to the computer.
• The commands are usually in the form of text.
• The keyboard consists of many keys such as function keys, numeric keypad, character keys, and
various symbols.

Page 29
Monitor

• The most commonly used output device is the monitor.


• A cable connects the monitor to the video adapters in the computer’s motherboard.
• These video adapters convert the electrical signals to the text and images that are displayed.
• The images on the monitor are made of thousands of pixels.
• The cursor is the characteristic feature of display devices.
• It marks the position on the screen where the next character will be inserted.

Page 30
Printer

• The correct answer is Output device.


• Printer - A device that accepts text and graphics output from a computer and
transfers the information to paper, usually to standard size sheets of paper.
• Printers provide a permanent record of computer data or text on paper.
• We can classify printers as impact and non-impact printers.
• Impact printers print characters due to the physical contact of the print head with
the paper. Example: Dot-matrix printer
• In non-impact printers, there is no physical contact. Example: Laser Printer

Page 31
Magnetic Tape
• Magnetic tapes are used in most companies to store data files.
• Magnetic tapes use a read-write mechanism.
• The read-write mechanism refers to writing data on or reading data from a magnetic tape.
• The tapes sequentially store the data manner.
• In this sequential processing, the computer must begin searching at the beginning and check each
record until the desired data is available.
• Magnetic tape is the cheapest medium for storage because it can store a large number of binary
digits, bytes, or frames on every inch of the tape.
• The advantages of using magnetic tape include unlimited storage, low cost, high data density, rapid
transfer rate, portability, and ease of use.
• Magnetic disks are generally used for the volume storage of programs and information.

Page 32
➢ Joystick
The joystick is a pointing device used principally for games.

➢ Light pen
The light pen performs the same functions as a mouse or trackball, but it is held up to the screen, where its
sensors detect the presence of pixels and send a signal through a cable to the computer.

➢ Printer
The printer puts text or other images produced with a computer onto paper or other surfaces. Printers are
either impact or nonimpact devices.

Page 33
➢ Scanner
The scanner converts an image of something outside the computer, such as text, a drawing, or a photograph, into a
digital image that it sends into the computer for display or further processing. The image is viewed as a graphics image,
not a text image, so it can be altered with a graphics program but cannot be edited with a word-processing program,
unless the scanner is part of a character-recognition system. To digitize photographs, a scanner may dither the image (put
the dots a varying amount of space apart), or use the tagged image file format (TIFF), storing the image in 16 gray values.
Some scanners can use standard video cameras to capture images for the computer.

➢ Plotter
The plotter is a computer printer for printing vector graphics. In the past, plotters were used in applications such as
computer-aided design, though they have generally been replaced with wide-format conventional printers. A plotter
gives a hard copy of the output. It draws pictures on paper using a pen. Plotters are used to print designs of ships and
machines, plans for buildings and so on.

Page 34

You might also like