View Full Document

8 views

Unformatted text preview:

CMU 18 447 S 09 L14 1 2009 J C Hoe 18 447 Lecture 14 Exceptions and Interrupts James C Hoe Dept of ECE CMU March 16 2009 Announcements Spring break is over HW 3 is due now Project 2 due this week Midterm 2 on 3 30 in class last lecture to be included Handouts Exceptions and Interrupts CMU 18 447 S 09 L14 2 2009 J C Hoe A systematic way to handle exceptional conditions that are relatively rare but must be detected and acted upon quickly instructions may fail and cannot complete external I O devices may need servicing quantum expiration in a time shared system Option 1 write every program with continuous checks a k a polling for every possible contingency acceptable for simple embedded systems toaster Option 2 write normal programs for the bestcase scenario where nothing unusual happens detect exceptional conditions in HW transparently transfer control to an exception handler that knows how to resolve the condition and then back to your program CMU 18 447 S 09 L14 3 2009 J C Hoe Types of Interrupts Synchronous Interrupts a k a exceptions exceptional conditions tied to a particular instruction e g illegal opcode illegal operand virtual memory management faults the faulting instruction cannot be finished no forward progress unless handled immediately Asynchronous Interrupts a k a interrupts external events not tied to a particular instruction I O events timer events some flexibility on when to handle it cannot postpone forever or things start to fall on the floor System Call Trap Instruction an instruction whose only purpose is to raise an exception whatever for CMU 18 447 S 09 L14 4 2009 J C Hoe Interrupt Sources CPU interrupt control logic datapath failed instructions system call instructions Exceptions a k a synchronous interrupts IRQ lines from external devices I O DMA timers etc Interrupts a k a asynchronous interrupts external interrupts CMU 18 447 S 09 L14 5 2009 J C Hoe The control transfer to the interrupt handler and back must be 100 transparent to the



Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?