This preview shows page 1. Sign up to view the full content.
Unformatted text preview: same for every system. Our aim in this section is to give you a general understanding of exceptions and exception handling, and to help demystify what is often a confusing aspect of modern computer systems. An exception is an abrupt change in the control ﬂow in response to some change in the processor’s state. Figure 8.1 shows the basic idea.
event occurs here Exception handler exception exception processing exception return (optional) Icurr Inext Figure 8.1: Anatomy of an exception. A change in the processor’s state (event) triggers an abrupt control transfer (an exception) from the application program to an exception handler. After it ﬁnishes processing, the handler either returns control to the interrupted program or aborts. In the ﬁgure, the processor is executing some current instruction Á ÙÖÖ when a signiﬁcant change in the processor’s state occurs. The state is encoded in various bits and signals inside the processor. The change in state is known as an event. The event might be directly relate...
View Full Document
- Spring '10
- The American