Chapter 13 Input Output
Chapter 13 Input Output
Input/Output (I/O)
Architecture
Outline
• Introduction
• External Devices
• I/O Module
• I/O Functions
• I/O Techniques
• I/O Channel
• External Interface
A Model I/O Configuration
External Devices
• Human readable
– Screen, printer, keyboard
• Machine readable
– Monitoring and control
• Communication
– Modem
– Network Interface Card (NIC)
Input/Output Problems
• Wide variety of devices
– Delivering different amounts of data
– At different speeds
– In different formats
• All slower than CPU and RAM
• Need I/O modules
I/O Module
• Interface to CPU and Memory
• Interface to one or more peripherals
External Device Block Diagram
Function of I/O modules
1) Control and Timing.
2) CPU Communicating.
3) Device Communication.
4) Data Buffering.
5) Error Detection.
1) Control and Timing
① CPU asks I/O module to check the
status of attached device.
② I/O module tells the status.
③ CPU requests for data transfer to I/O
module if device is ready.
④ I/O module gathers the data and
transfers to the CPU.
System bus
System bus
I/O bus
Evolution of the I/O Function
1. CPU directly controls a peripheral device. This
is seen in simple microprocessor-controlled
devices
2. Use controller or I/O module
3. Implement interrupts
– CPU need not spend time waiting for an I/O
operation to be performed, thus increasing
efficiency
Evolution of the I/O Function
4. I/O module is given direct access to memory
via DMA.
– can move a block of data to or from memory
without involving the CPU, except at the beginning
and end of the transfer
Evolution of the I/O Function
5. I/O module is enhanced to become a
processor in its own right
– specialized instruction set tailored for I/O
6. I/O module has a local memory of its own
– a large set of I/O devices can be controlled, with
minimal CPU involvement
External Interface
• Interface to a peripheral from an I/O module
must be tailored to the nature and operation
of the peripheral
• Two types
– parallel interface
– serial interface
Parallel Interface
• Multiple lines connecting the I/O module and
the peripheral,
• Multiple bits are transferred simultaneously,
just as all of the bits of a word are transferred
simultaneously over the data bus.
• Use for higher-speed peripherals, such as tape
and disk
Parallel I/O
Serial Interface
• Only one line used to transmit data
• Bits must be transmitted one at a time
• Use for printers and terminals
• With a new generation of high-speed serial
interfaces, parallel interfaces are becoming
much less common
Serial I/O
Parallel & Serial Interface on a PC
Review Questions
1. List three broad classifications of external, or
peripheral, devices.
2. What are the major functions of an I/O
module?
3. List and briefly define three techniques for
performing I/O
4. Explain how programmed I/O is different from
interrupt-driven I/O.
5. How does direct memory access (DMA) work?