03-Interrupts - Interrupts Mehreen Alam AQuestion The...

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

View Full Document Right Arrow Icon
Interrupts Mehreen Alam
Background image of page 1

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

View Full DocumentRight Arrow Icon
Jan 21, 2007 Operating Systems - Mehreen Alam A Question The operating system Gets an input Performs a computation Produces an output And Quits Yes or no? The answer: No The operating system is a Reactive Program.
Background image of page 2
Jan 21, 2007 Operating Systems - Mehreen Alam Operating System Modern Operating Systems are Interrupt driven If No process to execute No I/O device to service No user to whom to respond Then OS will sit quietly, waiting for something to happen This something is Interrupt At a particular time either a user program is running or operating system is running Pseudo-Parallelism
Background image of page 3

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

View Full DocumentRight Arrow Icon
Jan 21, 2007 Operating Systems - Mehreen Alam CPU Cycle now is: Fetch Next Instruction Execute Instruction Check for Interrupt: Process Interrupt Start Halt Decode Instruction
Background image of page 4
Jan 21, 2007 Operating Systems - Mehreen Alam Interrupt Handling Different routines handle different type of interrupts. Called Interrupt Service Routine (ISR) When the CPU is interrupted it stops what it is doing The address of the interrupted instruction is saved A generic routine is run This routine examines the nature of interrupt Calls the corresponding ISR The ISR’s are usually stored in the lower part of the memory After the interrupt is serviced, the saved address is loaded to the Program Counter The Interrupted computation can resume as though the interrupt had not occurred. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt
Background image of page 5

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

View Full DocumentRight Arrow Icon
Jan 21, 2007 Operating Systems - Mehreen Alam Interrupt Handling A trap is a software-generated interrupt caused either by an error or a user request An operating system is interrupt driven Determines which type of interrupt has occurred: polling vectored interrupt system
Background image of page 6
Jan 21, 2007 Operating Systems - Mehreen Alam Classes of Interrupts  Program division by zero execute illegal instruction reference outside user’s memory space
Background image of page 7

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

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

This note was uploaded on 01/23/2011 for the course ART 431 taught by Professor Dona during the Spring '10 term at Alfaisal University.

Page1 / 26

03-Interrupts - Interrupts Mehreen Alam AQuestion The...

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

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