chapter 8 input/output. busses l group of electrical conductors suitable for carrying computer...
TRANSCRIPT
Chapter 8
Input/Output
Busses
Group of electrical conductors suitable for carrying computer signals from one location to another
Each conductor in the bus is referred to as a line and carries a single signal - such as a bit in an address
Line Categories
Data lines - carrying data from one location to another
Address lines - specify address of recipient Control lines - for synchronization of bus
and modules connected to bus Power lines - carry power to a module
Typical Uses of Busses
Transfer data between CPU and memory
Transfer data between CPU and computer peripherals
Transfer data between different points within the CPU
Point-to-Point Busses
Bus carries signals from a specific source to a specific destination
Example - cable connecting parallel or serial computer port to peripheral
Multi-point Bus
Bus connects several points together Bus broadcasts a signal to every recipient on
the bus In most cases, an address accompanies the
signal in order to identify the desired destination
Example - Ethernet network connection
Pt-to-Pt and Multi-Pt Busses
CPU - I/O
A P-P bus may be used to connect CPU to memory
A M-P bus may connect CPU to memory and/or to I/O modules
Referred to as a backplane, system bus, external bus
Bridge - interface between different busses that allow them to communicate
Typical PC Bus Connections
PCI - Peripheral Component Interface
AGP - Accelerated Graphics Processor
ISA - Industry Standard Architecture
EISA - Extended ISA
USB - Universal Serial Bus
VLB - Video Electronics Standards Bus
SCSI - Small Computer System Interface
IEEE 1395 Bus (FireWire)
RS232-C serial PC bus
Characteristics of Busses
8-bit ISA 8 8.33 8.316-bit ISA 16 8.33 16.6EISA 32 8.33 33.3VLB 32 33 133.3PCI 32 33 133.364-bit PCI 64 66 533.3AGP 32 66 266.6AGP x2 32 66x2 533.3AGP x4 32 66x4 1,066.6
Bus Width Speed Bandwidth (bits) (MHz) (Mbytes/sec)
PCI Bus
32- or 64-bit bus used in Suns, Apples, Compaq, Alpha, ...
Backplane bus interconnecting CPU and various plug-in I/O modules that control serial and parallel ports, sound cards, disks, …
CPU sends signals to bus via individual pins of the integrated circuit
PCI Bus Connections
Pentium III Bus Lines
Focus on I/O DevicesFocus on I/O Devices
Objective - provide a method to allow efficient utilization of the CPU while I/O is taking place• Keyboard• Disk• Monitor• Printer
Each device operates at a different speed but the CPU is the fastest
Differences in I/O requirements
Keyboard - slow, sporadic input• much waiting between keying• enter text or send special control messages
such as CTRL keys or function keys• user may enter input in response to a
request or interrupt the CPU Mouse - can also generate expected or
unexpected input
Other I/O Requirements
Hard Disk, CDROM or DVD - usually transfer large amounts of data in blocks instead of one character at a time
CPU should be free to do other tasks while the I/O is taking place
Disk, printer, and monitors operate under program control
Newer DVD and CDROMs self-initiate when placed in the drive
Summarize Requirements for I/OSummarize Requirements for I/O
Each device must be individually addressed Each device must be able to initiate
communication with the CPU Information could be transferred directly to the
CPU by individual word for slower character input , but faster and direct transfer to memory is also needed
Simple I/O Configuration
More Complex I/O Configuration
Programmed I/OProgrammed I/O
Simplest form of I/O (Figure 8.2) I/O module connected to a pair of I/O registers
in the CPU via a bus Registers similar to MAR and MDR Information is transferred one word at a time
(64 bits) Very slow - only for small amounts of data CPU is involved in every step of the process
Programmed I/O
Programmed I/O (continued)
Concept of InterruptsConcept of Interrupts
“signal that causes the CPU to alter its normal flow of instruction execution”
Interrupt lines are special control lines to the CPU
Messages sent over those lines are known as interrupts
More efficient than polling since devices are frequently idle and the CPU is so fast
Servicing an InterruptServicing an Interrupt
Interrupt causes temporary suspension of the program currently running
Current registers and instruction are saved in a special area known as the stack or PCB (Process Control Block)
Interrupt handler program starts execution When complete, the registers and program
instruction is restored and program resumes
Servicing an Interrupt
Why Are Interrupts Used?Why Are Interrupts Used?
External event - such as input from the keyboard(Example Figure 8.6)
Completion signal - control output to printers Allocating CPU time - giving execution time to
many processes Abnormal Events - Power failure, illegal
instructions, non existent op codes
External Event - Keyboard Input
Completion Signal - Print Handler
Allocating CPU Time
Multiple Interrupts
Different events may vie for service - thus, multiple interrupts
How to handle? Vectored Interrupts - each interrupt includes
address of device Polled Interrupts - general interrupt signal and
system polls devices to determine source Priorities Interrupts - interrupts have assigned
priorities
Vectored Interrupt Processing
Polled Interrupt Processing
Priorities Interrupt
Processing an IBM S/390 Interrupt
DMA - Direct Memory AccessDMA - Direct Memory Access
Impractical to transfer data from peripheral device to CPU via programmed I/O - ties up CPU
DMA Purpose: to transfer large blocks of data directly from disk to memory
Faster mode of transfer CPU starts process and then is free to perform
other tasks Transfer is under control of the I/O module CPU is interrupted when I/O transfer is
complete
Information Needed for DMAInformation Needed for DMA
Location of the data on the I/O device Starting location of the block of data in
memory Size of the block to be transferred Direction of transfer - read or write BOTTOM LINE - CPU is free to perform other
tasks while high speed data transfer is taking place
DMA Initiation and Control
Interconnection: CPU, Memory, I/O
External Interface Busses and Ports
A port is a connector at the end of a bus into which a peripheral device can be plugged
Control of the port is provided by a port controller connected to a standard bus (PCI or ISA)
Device control is built into a controller within the device and into software (drivers) that are installed in the OS
Common interface busses: USB, SCSI, IEEE 1394
USB - Universal Serial Bus
Newer bus intended to replace the standard serial port
Faster - capable of transfers up to 12 megabits per second
Hubs can provide multiple connection points for I/O devices
Devices can be added without rebooting Still for slow to medium devices, such as
keyboards, scanners, joysticks and cameras
USB Topology Example
FireWire Configuration
Typical PC Bus Interface