02-arch-support - Architectural Support for Operating...

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

View Full Document Right Arrow Icon
Architectural Support for Operating Systems Prof. Sirer CS 4410 Cornell University
Background image of page 1

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

View Full DocumentRight Arrow Icon
Basic Computer Organization CPU Memory ?
Background image of page 2
Keyboard Let’s build a keyboard ± Lots of mechanical switches ± Need to convert to a compact form (binary) We’ll use a special mechanical switch that, when pressed, connects two wires simultaneously
Background image of page 3

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

View Full DocumentRight Arrow Icon
Keyboard When a key is pressed, a 7-bit key identifier is computed + 3-bit encoder (4 to 3) 4-bit encoder (16 to 4) not all 16 wires are shown
Background image of page 4
Keyboard A latch can store the keystroke indefinitely + 3-bit encoder (4 to 3) 4-bit encoder (16 to 4) not all 16 wires are shown Latch
Background image of page 5

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

View Full DocumentRight Arrow Icon
Keyboard The keyboard can then appear to the CPU as if it is a special memory address + 3-bit encoder (4 to 3) 4-bit encoder (16 to 4) not all 16 wires are shown Latch CPU
Background image of page 6
Device Interfacing Techniques Memory-mapped I/O ± Device communication goes over the memory bus ± Reads/Writes to special addresses are converted into I/O operations by dedicated device hardware ± Each device appears as if it is part of the memory address space Programmed I/O ± CPU has dedicated, special instructions ± CPU has additional input/output wires (I/O bus) ± Instruction specifies device and operation Memory-mapped I/O is the predominant device interfacing technique in use
Background image of page 7

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

View Full DocumentRight Arrow Icon
Polling vs. Interrupts In our design, the CPU constantly needs to read the keyboard latch memory location to see if a key is pressed ± Called polling ± Inefficient An alternative is to add extra circuitry so the keyboard can alert the CPU when there is a keypress ± Called interrupt driven I/O Interrupt driven I/O enables the CPU and devices to perform tasks concurrently, increasing throughput ± Only needs a tiny bit of circuitry and a few extra wires to implement the “alert” operation
Background image of page 8
Interrupt Driven I/O CPU Memory An interrupt controller mediates between competing devices Raises an interrupt flag to get the CPU’s attention Identifies the interrupting device Can disable (aka mask) interrupts if the CPU so desires intr dev id Interrupt Controller
Background image of page 9

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

View Full DocumentRight Arrow Icon
Interrupt Driven I/O CPU Memory An interrupt controller mediates between competing devices Raises an interrupt flag to get the CPU’s attention Identifies the interrupting device Can disable (aka mask) interrupts if the CPU so desires intr
Background image of page 10
Interrupt Management Interrupt controllers manage interrupts ± Maskable interrupts: can be turned off by the CPU for critical processing ± Nonmaskable interrupts: signifies serious errors (e.g.
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

02-arch-support - Architectural Support for Operating...

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

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