lect.18.Buses-OS.4up

lect.18.Buses-OS.4up - Announcements TBD EE108B Lecture 18...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EE108b Lecture 18 C. Kozyrakis 1 EE108B Lecture 18 Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b EE108b Lecture 18 C. Kozyrakis 2 Announcements • TBD EE108b Lecture 18 C. Kozyrakis 3 Review: Buses • A bus is a shared communication link that connects multiple devices • Single set of wires connects multiple “subsystems” as opposed to a point to point link which only connects two components together • Wires connect in parallel, so 32 bit bus has 32 wires of data Memory Processor I/O Device I/O Device I/O Device EE108b Lecture 18 C. Kozyrakis 4 Review: Trends for Buses Logical Bus and Physical Switch Parallel Bus D1 D2 D3 D4 4 port switch D1 D2 D3 D4 Bus Cntrl Serial point-to-point advantages – Faster links – Fewer chip package pins – Higher performance – Switch keeps arbitration on chip Many bus standards are moving to serial, point to point 3GIO, PCI-Express(PCI) Serial ATA (IDE hard disk) AMD Hypertransport versus Intel Front Side Bus (FSB)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE108b Lecture 18 C. Kozyrakis 5 Review: OS Communication • The operating system should prevent user programs from communicating with I/O device directly – Must protect I/O resources to keep sharing fair – Protection of shared I/O resources cannot be provided if user programs could perform I/O directly • Three types of communication are required: – OS must be able to give commands to I/O devices – I/O device must be able to notify OS when I/O device has completed an operation or has encountered an error – Data must be transferred between memory and an I/O device EE108b Lecture 18 C. Kozyrakis 6 Reivew: A method for addressing a device • Memory-mapped I/O: – Portions of the address space are assigned to each I/O device – I/O addresses correspond to device registers – User programs prevented form issuing I/O operations directly since I/O address space is protected by the address translation mechanism 0x00000000 0xFFFFFFFF General RAM Memory OS- mem Graphics Memory I/O #1 I/O #2 I/O #3 EE108b Lecture 18 C. Kozyrakis 7 Communicating with the CPU • Method #1: Polling – I/O device places information in a status register – The OS periodically checks the status register – Whether polling is used is often dependent upon whether the device can initiate I/O independently • For instance, a mouse works well since it has a fixed I/O rate and initiates its own data (whenever it is moved) • For others, such as disk access, I/O only occurs under the control of the OS, so we poll only when the OS knows it is active – Advantages • Simple to implement • Processor is in control and does the work – Disadvantage • Polling overhead and data transfer consume CPU time EE108b Lecture 18 C. Kozyrakis 8 Polling and Programmed I/O Is the device ready? store
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course EE 108B at Stanford.

Page1 / 8

lect.18.Buses-OS.4up - Announcements TBD EE108B Lecture 18...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online