H void exitint status this function does not return

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: R 8. EXCEPTIONAL CONTROL FLOW user mode, which restricts the types of instructions they can execute, and they access the same stack as the calling function. A system call runs in kernel mode, which allows it to execute instructions, and accesses a stack defined in the kernel. Section 8.2.3 discusses user and kernel modes in more detail. Faults Faults result from error conditions that a handler might be able to correct. When a fault occurs, the processor transfers control to the fault handler. If the handler is able to correct the error condition, it returns control to the faulting instruction, thereby reexecuting it. Otherwise, the handler returns to an abort routine in the kernel that terminates the application program that caused the fault. Figure 8.7 summarizes the processing for a fault. (1) Current Icurr instruction causes a fault (2) control passes to handler (3) fault handler runs (4) handler either reexecutes current instruction or aborts. abort Figure 8.7: Fault handling. Depending on the whether the fault can be repaired or not, the fault handler either re-executes the faulting instruction or aborts. A classic example of a fault is the page fault...
View Full Document

Ask a homework question - tutors are online