{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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 ethernet packet
Background image of page 1

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

View Full Document Right 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 memory page fault handlers).
Background image of page 2
Running with Interrupts
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}