Interrupts

Interrupts - Interrupts An interrupt is an event that...

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

View Full Document Right Arrow Icon
Interrupts An interrupt is an event that requires immediate attention. In hardware, a device sets the interrupt line to high. When an interrupt is received, the CPU will stop whatever it is doing and it will jump to to the 'interrupt handler' that handles that specific interrupt. After executing the handler, it will return to the same place where the interrupt happened and the program continues. Examples: move mouse type key
Background image of page 1

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

View Full DocumentRight Arrow Icon
Steps of Servicing an Interrupt 1. The CPU saves the Program Counter and registers in execution stack 2. CPU looks up the corresponding interrupt handler in the interrupt vector. 3. CPU jumps to interrupt handler and run it. 4. CPU restores the registers and return back to the place in the program that was interrupted. The program continues execution as if nothing happened. 5. In some cases it retries the instruction the instruction that was interrupted (E.g. Virtual
Background image of page 2
Running with Interrupts Interrupts allow CPU and device to run in parallel without waiting for each other. 1. OS Requests
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 252 taught by Professor Gustavorodriguez during the Fall '11 term at Purdue.

Page1 / 10

Interrupts - Interrupts An interrupt is an event that...

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

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