Академический Документы
Профессиональный Документы
Культура Документы
5)
Provide protection to shared I/O resources
Guarantees that a users program can only access the portions of an I/O device to which the user has rights Provides abstraction for accessing devices: Supply routines that handle low-level device operation Handles the interrupts generated by I/O devices Provide equitable access to the shared I/O resources All user programs must have equal access to the I/O resources Schedule accesses in order to enhance system throughput
ECE4680 buses.1
April 5, 2003
ECE4680 buses.4
April 5, 2003
Protocol
pipelined
Serial
ECE4680 buses.2
April 5, 2003
ECE4680 buses.5
April 5, 2003
Processor
interrupts
Cache
Special I/O instructions specify: Both the device number and the command word Memory - I/O Bus Device number: the processor communicates this via a set of wires normally included as part of the I/O bus Command word: this is usually send on the buss data lines
Main Memory
Memory-mapped I/O: Portions of the address space are assigned to I/O device Read and writes to those addresses are interpreted as commands to the I/O devices User programs are prevented from issuing I/O operations directly: The I/O address space is protected by the address translation
April 5, 2003
ECE4680 buses.3
April 5, 2003
ECE4680 buses.6
User program progress is only halted during actual transfer Disadvantage, special hardware is needed to: Cause an interrupt (I/O device) Detect an interrupt (processor) Save the proper states to resume after the interrupt (processor)
ECE4680 buses.7
April 5, 2003
ECE4680 buses.10
April 5, 2003
I/O interrupt is more complicated than exception: Needs to convey the identity of the device generating the interrupt Interrupt requests can have different urgencies: Interrupt request needs to be prioritized
yes Advantage: Simple: the processor is totally in control and does all the work Disadvantage: Polling overhead can consume a lot of CPU time
ECE4680 buses.8 April 5, 2003
ECE4680 buses.11
April 5, 2003
Interrupt Logic
Detect and synchronize interrupt requests Ignore interrupts that are disabled (masked off) Rank the pending interrupt requests Create interrupt microsequence address Provide select signals for interrupt microsequence
:
Interrupt Mask Reg Sync. Inputs Q
Synchronizer Circuits
Async. D Inputs
Clk
ECE4680 buses.12
Clk
April 5, 2003
A good thing about interrupt: Asynchronous: not associated with a particular instruction Pick the most convenient place in the pipeline to handle it
device DMAC provides handshake signals for Peripheral Controller, and Memory Addresses and handshake signals for Memory.
ECE4680 buses.13
April 5, 2003
ECE4680 buses.16
April 5, 2003
Programmers View
main program Add Div Sub interrupts request (e.g., from keyboard) (1) (2) Save PC and branch to interrupt target address Save processor status/state Service the (keyboard) interrupt Restore processor status/state (3) get PC
Interrupt target address options: General: Branch to a common address for all interrupts Software then decode the cause and figure out what to do Specific: Automatically branch to different addresses based on interrupt type and/or level--vectored interrupt
ECE4680 buses.14 April 5, 2003
fraction when 100% busy = (1000+500) 500500MHz =0.2% So MDA is even better than interrupt-driven. Reason?
ECE4680 buses.17
April 5, 2003
Mem
fraction when 100% busy = 250k 500500MHz =25% fraction when 5% busy = 25%5% = 1.25% So interrupt-driven is much better than polling. Reason?
Device to/from memory transfers are controlled by the IOP directly. IOP steals memory cycles.
ECE4680 buses.15
April 5, 2003
ECE4680 buses.18
April 5, 2003
Summary:
Three types of buses: Processor-memory buses I/O buses Backplane buses Bus arbitration schemes: Daisy chain arbitration: it cannot assure fairness
Input Multiplier
Performance evaluation
Multiplicand Register
32=>34 signE x <<1 34 32=>34 signEx
1 0
Load Mp
32
34
ENC[2]
ENC[1]
ENC[0]
2 LO[1:0]
32
32
Result[HI]
Result[LO]
"L O[
Single/multicycle Datapaths
34x2 MUX
Multi x2/x1
Arithmetic
Control Log ic
0]"
34
34
34-bi t ALU 34 32
Su b/Add
32
ShiftAll
LO[1]
Booth Encoder
Performance
Centralized parallel arbitration: requires a central arbiter I/O device notifying the operating system: Polling: it can waste a lot of processor time I/O interrupt: similar to exception except it is asynchronous Delegating I/O responsibility from the CPU Direct memory access (DMA) I/O processor (IOP)
IFetch cd Exec Mem WB D IFetch cd Exec Mem WB D
198 1 0 98 198 1 198 2 198 3 1 4 98 1 98 5 1 6 98 198 7 1 8 98 199 9 1 0 99 199 1 1 99 2 199 3 1 4 99 1 5 99 1 99 6 199 7 1 8 99 200 9 0 Time
Extra 2 bi ts
Prev
Proc CPU 60%/yr. (2X/ 1.5 yr) Proce ssor-Memory Performance Gap: (grow s 50% / year)
100
ECE4680 buses.19
April 5, 2003
ECE4680 buses.22
April 5, 2003
Beyond ECE4680
In-depth understanding of the inner-workings of modern computers, their evolution, and trade-offs present at the hardware/software boundary.
Compiler
ECE4680 buses.20
April 5, 2003
ECE4680 buses.23
April 5, 2003
Output
ECE4680 buses.21
April 5, 2003