13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HANDLING EXCEPTION CONDITIONSError CodeWith exceptions that may relate to a specific segment, the processor pushes an error code onto thestack of the exception handler (whether procedure or task). Figure 7-1 illustrates the error code. Theformat of the error code resembles that of a selector. However, instead of an RPL field, the error codecontains two one-bit items:• The processor sets the EX (external) bit when the fault does not directly result from an action ofthe task. Occurrence of this condition generally indicates a "system" problem as opposed to an"application software" problem.• The processor sets the I (lOT) bit if the index portion of the error code refers to a gate descriptorin the lOT. When the I bit is set, the handler can ignore the TI bit. If the I bit is reset, then the TIbit identifies either the GOT or an LOT, just as in a selector.The index field identifies the descriptor associated with the exception (if any).In some cases the error code on the stack is null, in which case all bits in the word are zero. For somefaults, the handler can gain additional information about the fault by determining whether the errorcode is null.APPLICATION INTERFACESince some of the actions appropriate for exception conditions depend on the requirements of individualapplication programs, the operating system may need to provide an application interface to theexception handling system. Chapter 6 discusses mechanisms for doing so.EXCEPTION CONDITIONSThe action appropriate to each type of exception depends both on the type of exception and the needsof the application. This section provides details for each type of exception. Some of the exceptionconditions are identified by a tW

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!