12-io
12-io
Hsin-Chou Chi
Processor Devices
Datapath Input
8 orders of magnitude
Mouse input human 0.0038
Laser printer output human 3.2000
range
Graphics display output human 800.0000-8000.0000
Network/LAN input or machine 100.0000-1000.0000
output
Magnetic disk storage machine 240.0000-2560.0000
I/O Performance Measures
I/O bandwidth (throughput) – amount of information
that can be input (output) and communicated across
an interconnect (e.g., a bus) to the processor/memory
(I/O device) per unit time
1. How much data can we move through the system in a
certain time?
2. How many I/O operations can we do per unit time?
Interrupts
Processor
Cache
Graphics Network
Disk Disk
I/O System Interconnect Issues
A bus is a shared communication link (a single set of
wires used to connect multiple subsystems) that needs
to support a range of devices with widely varying
latencies and data transfer rates
Advantages
- Versatile – new devices can be added easily and can be moved
between computer systems that use the same bus standard
- Low cost – a single set of wires is shared in multiple ways
Disadvantages
- Creates a communication bottleneck – bus bandwidth limits the
maximum I/O throughput
The maximum bus speed is largely limited by
The length of the bus
The number of devices on the bus
Bus Characteristics
Control lines: Master initiates requests
Bus Data lines: Data can go either way Bus
Master Slave
Control lines
Signal requests and acknowledgments
Indicate what type of information is on the data lines
Data lines
Data, addresses, and complex commands
Bus transaction consists of
Master issuing the command (and address) – request
Slave receiving (or sending) the data – action
Defined by what the transaction does to memory
- Input – inputs data from the I/O device to the memory
- Output – outputs data from the memory to the I/O device
Types of
Buses
Processor-memory bus (proprietary)
Short and high speed
Matched to the memory system to maximize the memory-
processor bandwidth
Optimized for cache block transfers
Backplane Bus
Processor Memory
I/O Devices
Bus
Adaptor
Bus
Adaptor I/O Bus
Backplane Bus
Bus I/O Bus
Adaptor
ReadReq 1
2
Data addr data
3
Ack 4 6
5 7
DataRdy
I/O device signals a request by raising ReadReq and putting the addr on
the data lines
1. Memory sees ReadReq, reads addr from data lines, and raises Ack
2. I/O device sees Ack and releases the ReadReq and data lines
3. Memory sees ReadReq go low and drops Ack
4. When memory has data ready, it places it on data lines and raises DataRdy
5. I/O device sees DataRdy, reads the data from data lines, and raises Ack
6. Memory sees Ack, releases the data lines, and drops DataRdy
7. I/O device sees DataRdy go low and drops Ack
The Need for Bus Arbitration
Multiple devices may need to use the bus at the same
time so must have a way to arbitrate multiple requests
Bus arbitration schemes usually try to balance:
Bus priority – the highest priority device should be serviced first
Fairness – even the lowest priority device should never be
completely locked out from the bus
Bus arbitration schemes can be divided into four classes
Daisy chain arbitration – see next slide
Centralized, parallel arbitration – see next-next slide
Distributed arbitration by self-selection – each device wanting the
bus places a code indicating its identity on the bus
Distributed arbitration by collision detection – device uses the
bus when its not busy and if a collision happens (because some
other device also decides to use the bus) then the device tries
again later (Ethernet)
Daisy Chain Bus
Arbitration
Device 1 Device 2 Device N
Highest Lowest
Priority Priority
wired-OR
Data/Addr
Advantage: simple
Disadvantages:
Cannot assure fairness – a low-priority device may be locked out
indefinitely
Slower – the daisy chain grant signal limits the bus speed
Centralized Parallel
Arbitration
Device 1 Device 2 Device N
Data/Addr