notes4 - Interrupts Tuesday, February 1, 2005 I....

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

View Full Document Right Arrow Icon
Interrupts Tuesday, February 1, 2005 I. Definition: An interrupt is an event that requires immediate attention from the CPU. II. Examples: mouse move, key press, network packet arrival III. Steps of an interrupt: A. OS receives interrupt B. saves registers and address of currently executing command (usually stores address on stack) C. looks up corresponding interrupt handler in interrupt vector (an array of interrupt handlers) D. jumps to handler: handler performs some action in response to the interrupt E. once handler finishes, OS restores registers and returns to stored address E.1. sometimes interrupted process is restarted E.2. interrupt is transparent to program execution F. interrupted program continues IV. Interrupts run in kernel mode: interrupt handler must read device/CPU registers A. interrupt vector can be modified only in kernel mode (security) B. interrupt vector initialized on bootup; modified when drivers added to system V. CPU receives interrupts on the interrupt terminal A. Definition: the interrupt terminal is a bus connected to all IO devices and MMU VI. Interrupts generated by: A. MMU A.1. invalid address: interrupt prompts SEGV A.2. access to valid address, but page not in memory: interrupt prompts OS to move page into memory A.3. invalid permissions (i.e. trying to write to read-only memory): interrrupt prompts SEGV B. Math unit: divide by zero, etc. C.
Background image of page 1

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

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

This note was uploaded on 01/30/2012 for the course CS 354 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 4

notes4 - Interrupts Tuesday, February 1, 2005 I....

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

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