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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 13EXTENDED PROTECTIONEven though the <strong>iAPX</strong> <strong>286</strong> architecture provides extensive, automatic protection, a fully protectedsystem requires additional protection features in the operating system. <strong>Operating</strong>-system software canincrease the reliability of the system by providing any of these protection features:• Extending the "type" concept• Validating pointer parameters• Defining the right to use operating-system objects• Defining the right to delete segments• Protecting shared objects that are being constructedEXTENDED TYPEIt is both convenient and dangerous to use a selector as the name of an operating-system object. Thedanger arises from the fact that the selector by itself carries no information regarding the type of objectit identifies. A program can, for example, mistakenly pass the selector of a semaphore to an operatingsystemprocedure that operates on mailboxes, producing catastrophic results. The solution is to associatea type extension code for the object with the segment in which it resides or with a descriptor tothat segment. <strong>Operating</strong>-system procedures can then check the type of objects identified by selectorparameters. (The term type extension code is used here to avoid confusion with the processor-recognizedtype code in a descriptor.)There are three general methods of associating type with operating-system objects:1. Place the type extension code in the segment in which the object resides.2. Associate the type code with a descriptor for the segment.3. Use indirect names and associate the type code with the name of the object.Only segments likely to contain named operating-system objects need to have type extension codes;namely, privilege-level 0 (PL 0), expand up, writable, data segments.Type Extension Code with DescriptorA logical way to store a type extension code is to associate it with the descriptor for the named object(you can view the type extension code as a refinement of the processor-recognized type code in theaccess-rights byte of the descriptor). The type extension code can be put in a table parallel to thedescriptor table (as illustrated in Chapter 5 in connection with alias-list pointers).Type Extension Code in SegmentIt is also possible to place the type extension code at some reserved location in the data segment itself.This approach does not reference another segment and thereby avoids loading a segment register.13-1 121960·001

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

Saved successfully!

Ooh no, something went wrong!