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.

infel'BINDING·AND LOADINGc. If the LODTXT record defines an LDT, then, for each entry in the record, obtain the descriptorfrom DESCRP and install it in the LDT.d. If the LODTXT record does not apply to a descriptor table, read the LODTXT record directly··into the selected segment.6. If more LODTXT records remain, go to step 4.7. ··Free the space used for DE8CRP entries.8. The ta~k or tasks .are loaded. Jump to tpe TSS identified in the module header.LOAD-TIME BINDINGAs with any system, it is possible on the <strong>iAPX</strong> <strong>286</strong> to delay many binding operations until load timeby incorporating binding functions into the loader. The call gates of the <strong>iAPX</strong> <strong>286</strong> architecture, however,provide an especially convenient and efficient way to delay one ,specific binding operation: namely,oindingofcalls to operating-system primitives. Load-time binding to operating-system primitives is anaqvantage .when• J'he operating system is. under. development, and ODT locations of operating-system segmentdescriptors are subject to change• Programs may execute under different operating systems that have different GDT layoutsData structures for implementing load-time binding are• An export module of specially marked, dummy gates for operating system primitives. Figure 11-4shows how you can create such a module through Builder specifications. The NOT PRESENTspecification marks the gates by resetting the' present bit. Gates used for this purpose must residein the LDT so that Binder (which works only with LDT descriptors) can use them. You need toup4ate this export file only when you change the number or names of operating-system gates.• A table of actual gates for the operating-system primitives. This table must contain, for each primitive.,the gate.name',ii GDT. selector for the segment in which the primitive resides, and the entrypoint (offset) within the segment. It is most convenient to take such information from a Builderexport file that exports the gates for operating-system primitives. The example specifications shownin figure 11~3 create such an export file.Figure 11-5 shows the data flow for load-time binding. By using the gate name from the DESNAMsection, the loader associates a marked gate in the LDT with its gate name. Given the gate name, itlooks up the actual binding information.EXAMPLE LOADERFigure 11-6 shows an example of a loader that reads the <strong>iAPX</strong> <strong>286</strong> OMF, resolves references tooperating-system primitives, and calls kernel procedures to create a new task. In the interest of simplicity,this .example t:ecogniz~~ only the single-task OMF produced by the Binder, and all error checkingis omitted .. , .. . ..!:,;; . '..'This loader calls the kernel procedures CREATILLDT, LOAD_LDT, LOAD_LDT_GATE,CREATE_TASK, RESERVE~LOTS,arid CHANGE_AR, which are not shown. CREATE_LDTallocates an LDT segment for a new task and installs its descriptors in two of the four GDT slotsSPecified by Tt\SK.:.SEL. LOAD_LDT transfers a descriptor from the LDT of the loader to the LDTof the new task. LOAD_LDT_GATE places a gate in the LDT oUhe new task. CREATE_TASK11-12 121960-001

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

Saved successfully!

Ooh no, something went wrong!