Professional Documents
Culture Documents
Input/Output: Booc, Jecren G. Damayo, John Reil A. Ilaga, Judilo A Notarte, Mark Neil P
Input/Output: Booc, Jecren G. Damayo, John Reil A. Ilaga, Judilo A Notarte, Mark Neil P
Reported by:
Booc, Jecren G.
Damayo, John Reil A.
Ilaga, Judilo A
Notarte, Mark Neil P.
INPUT/OUTPUT
• The computer system’s I/O architecture is its interface to the
outside world. This architecture provides a systematic means of
controlling interaction with the outside world and provides the
operating system with the information it needs to manage I/O
activity effectively.
• The are three principal I/O techniques: programmed I/O, in which
I/O occurs under the direct and continuous control of the program
requesting the I/O operation; interrupt-driven I/O, in which a
program issues an I/O command and then continues to execute,
until it is interrupted by the I/O hardware to signal the end of the I/O
operation; and direct memory access (DMA), in which a
specialized I/O processor takes over control of an I/O operation to
move a large block of data.
• Two important examples of external I/O interfaces are FireWire and
Infiniband.
EXTERNAL DEVICES
I/O operations are accomplished through a wide
assortment of external devices that provide a
means of exchanging data between the external
environment and the computer. An external
device attaches to the computer by a link to an
I/O module. The link is used to exchange
control, status, and data between the I/O
module and the external device. An external
device connected to an I/O module is often
referred to as a peripheral device or, simply, a
peripheral.
CLASSIFICATION OF EXTERNAL DEVICE
Module Function
The major functions or requirements for an
I/O module fall into the following categories:
Control and timing
Processor communication
Device communication
Data buffering
Error detection
During any period of time, the processor may communicate with one or more
external devices in unpredictable patterns, depending on the program’s need
for I/O. The internal resources, such as main memory and the system bus,
must be shared among a number of activities, including data I/O. Thus, the
I/O function includes a control and timing requirement, to coordinate the flow of
traffic between internal resources and external devices. For example, the control of
the transfer of data from an external device to the processor might involve the
following sequence of steps:
1. The processor interrogates the I/O module to check the status of the attached
device.
2. The I/O module returns the device status.
3. If the device is operational and ready to transmit, the processor requests the
transfer of data, by means of a command to the I/O module.
4. The I/O module obtains a unit of data (e.g., 8 or 16 bits) from the external device.
5. The data are transferred from the I/O module to the processor.
The preceding simplified scenario also illustrates that the I/O
module must communicate with the processor and with the
external device. Processor communication involves the
following:
o Read
o Write
CONTROL
Programmed I/O
It used only in some low-end microcomputers.
It has single input and single output instruction.
Interrupt-driven I/O
Primary disadvantage of programmed I/O is that CPU spends
most of its time in a tight loop waiting for the device to become
ready. This is called busy waiting.
With interrupt-driven I/O, the CPU starts the device and tells it
to generate an interrupt when it is finished.
Done by setting interrupt-enable bit in status register.
Still requires an interrupt for every character read or written.
Interrupting a running process is an expensive business
(requires saving context).
Requires extra hardware (DMA controller chip).
DMA FUNCTION
DMA FUNCTION
BLOCK DIAGRAM OF DMA
INTEL 8237A DMA CONTROLLER
The 8237A Multimode Direct Memory Access (DMA) Controller is a
peripheral interface circuit for microprocessor systems.
It is designed to improve system performance by allowing external devices
to directly transfer information from the system memory.
Memory-to-memory transfer capability is also provided.
The 8237A offers a wide variety of programmable control features to
enhance data throughput and system optimization and to allow dynamic
reconfiguration under program control.
The 8237A is designed to be used in conjunction with an external 8-bit
address latch. It contains four independent channels and may be expanded
to any number of channels by cascading additional controller chips.
The three basic transfer modes allow programmability of the types of DMA
service by the user. Each channel can be individually programmed to Auto
initialize to its original condition following an End of Process (EOP). Each
channel has a full 64K address and word count capability.
I/O CHANNELS AND PROCESSORS
THE EVOLUTION OF THE I/O FUNCTION
Processor directly controls a peripheral
device
– Example: CPU controls a flip-flop to
implement a serial line
Controller or I/O module is added
– Processor uses programmed I/O without
interrupts
– Processor does not need to handle details of
external devices
– Example: A Universal Asynchronous Receiver
Transmitter
• CPU simply reads and writes bytes to I/O
controller
• I/O controller responsible for managing the
signaling
Controller or I/O module with
interrupts
– Processor does not spend time
waiting for an I/O operation to be
performed
I/O module has a separate
processor
– Example: SCSI controller
• Controller CPU executes SCSI
program code out
of main memory
I/O processor
– I/O module has its own local
memory, internal bus, etc.
– Its a computer in its own right
– Example: Myrinet 10 gigabit NIC
TWO TYPES OF I/O CHANNELS
• Selector channel
• Multiplexor channel
SELECTOR CHANNEL
controls multiple high-speed devices
and, at any one time, is dedicated to
the transfer of data with one of those
devices. Thus, the I/O channel selects
one device and effects the data
transfer.
MULTIPLEXOR CHANNEL
- can handle I/O with multipledevices at
the same time. For low-speed devices,
a byte multiplexor accepts or transmits
characters as fast as possible to
multiple devices.
THE EXTERNAL INTERFACE: FIREWIRE AND INFINIBAND
Types of Interfaces
Parallel interface
Serial interface
PARALLEL INTERFACE
there are multiple lines connecting the
I/O module and the peripheral, and
multiple bits are transferred
simultaneously, just as all of the bits of
a word are transferred simultaneously
over the data bus.
SERIAL INTERFACE
- there is only one line used to transmit
data, and bits must be transmitted one
at a time.
POINT-TO-POINT AND MULTIPOINT CONFIGURATIONS