When the exception occurs and control passes to the

Info iconThis preview shows page 1. Sign up to view the full content.

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

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 flow in response to some change in the processor’s state. Figure 8.1 shows the basic idea. Application program 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 finishes processing, the handler either returns control to the interrupted program or aborts. In the figure, the processor is executing some current instruction Á ÙÖÖ when a significant 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

Ask a homework question - tutors are online