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.

REAL MEMORY MANAGEMENTALLOCATEDMEMORYBOUNDARYTAGSEGMENTSEGMENT1 BOUNDARYTAGFigure 3-5. Hiding Boundary Tags121960·300There are two ways to reserve slots in a descriptor table:I. Code absolute selector values in the program and use the Builder's RESERVE statement to preventthe Builder from allocating other descriptors to those slots. This is the method used in this example.2. Use EXTERNALs to dummy segments coded in an ASM<strong>286</strong> module, and allow the Builder toassign slots for the descriptors of the dummy segments. The Builder resolves the EXTERNALs.PL/M-<strong>286</strong> CodeThis example separates space-management functions from descriptor-management functions. The spacemanagementprocedures are DELINK, FIND_FIRST_FIT, and RETURN_SPACE. The publicprocedures ALLOCATE and FREE_SEG call on POINT~T and NULLIFY to manipulate descriptorsfor allocated segments. (Refer to Chapter 2 for definitions of POINT~Tand NULLIFY.)The PL/M-<strong>286</strong> built-ins used to manipulate system structures in this example include5 E LEe TOR S 0 F (pointer)GET $ 5 E G M E Ii T $ LIM I T ( selector)The external procedure GET$SEGMENT$BASE extracts the segment base address from the specifieddescriptor.When the procedure FIND_FIRST_FIT finds an available space that is much larger than requested,it allocates the higher-addressed portion of the space and leaves the lower-addrcssed portion in the freespacelist. Figure 3-7 illustrates the process of splitting an available space.3-6 121960·001

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

Saved successfully!

Ooh no, something went wrong!