This preview shows page 1. Sign up to view the full content.
Unformatted text preview: d to the execution of the current instruction. For example, a virtual memory page fault occurs, an arithmetic overﬂow occurs, or an instruction attempts a divide by zero. On the other hand, the event might be unrelated to the execution of the current instruction. For example, a system timer goes off or an I/O request completes. In any case, when the processor detects that the event has occurred, it makes an indirect procedure call (the exception), through a jump table called an exception table, to an operating system subroutine (the exception handler) that is speciﬁcally designed to process this particular kind of event. When the exception handler ﬁnishes processing, one of three things happens, depending on the type of event that caused the exception: 1. The handler returns control to the current instruction the event occurred. 2. The handler returns control to ÁÒ not occurred.
ÜØ Á ÙÖÖ , the instruction that was executing when , the instruction that would have executed next had the exception 3. The handler aborts the interrupted program. Section 8.1.2 says more about these possibilities. 8.1. EXCEPTIONS 393 8.1.1 Exception Handling
Exceptions can be difﬁcult to understand because handling them invol...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American