Text preview for : Swapper.mesa_Sep78.pdf part of xerox Swapper.mesa Sep78 xerox mesa 4.0_1978 listing Mesa_4_System Swapper.mesa_Sep78.pdf



Back to : Swapper.mesa_Sep78.pdf | Home

Swapper.mesa 2-Sep-78 18:05:56 Page 1



-- Swapper.Mesa Edited by Sandman on Jul 12. 1978 4:05 PM
DIRECTORY
AllocDefs: FROM "allocdefs" USING [
AllocHandle. Alloclnfo. AllocObject. DefaultDataSegmentlnfo.
DefaultFileSegmentlnfo. DefaultFrameSegmentlnfo. DefaultTableSegmentInfo.
PageState. SwappingProcedure. SwapStrategy].
AltoDefs: FROM "altodefs" USING [
BYTE. MaxVMPage. PageCount. PageNumber. PageSize].
AltoFileDefs: FROM "altofiledefs" USING [eofDA. vDC].
BootDefs: FROM "bootdefs" USING [
BusyPage. FreePage. PageMap. PositionSeg. SystemTable. SystemTableHandle.
Table. TableHandle].
ControlDefs: FROM "controldefs" USING [
CSegPrefix. GFT. GlobalFrameHandle. NullGlobalFrame].
DiskDefs: FROM "diskdefs" USING [DiskRequest. SwapPages].
FrameDefs: FROM "framedefs" USING [FlushLargeFrames. ValidateGlobalFrame].
InlineDefs: FROM "inlinedefs" USING [BITAND].
NucleusDefs: FROM "nucleusdefs".
ProcessDefs: FROM "processdefs" USING [Disablelnterrupts. Enablelnterrupts].
SDDefs: FROM "sddefs" USING [SO. sGFTLength].
SegmentDefs: FROM "segmentdefs" USING [
DataSegmentHandle. DefaultBase. FileSegmentHandle. FrobHandle.
FrobLink. FrobNull. InvalidSegmentSize. MaxLocks. MaxRefs. Object.
ObjectHandle. ObjectType. OpenFile. PageNumber. RemoteSegCommand.
SegmentHandle];
DEFINITIONS FROM SegmentDefs;
Swapper: PROGRAM [ffvmp. lfvmp: AltoDefs.PageNumber]
IMPORTS BootDefs. DiskDefs. FrameDefs. SegmentDefs
EXPORTS AllocDefs. BootDefs. FrameDefs. NucleusDefs. SegmentDefs
SHARES SegmentDefs = BEGIN
AllocInfo: TYPE = AllocDefs.Alloclnfo;
AllocHandle: TYPE = AllocDefs.AllocHandle;
PageState: TYPE = AllocDefs.PageState;
SwappingProcedure: TYPE = AllocDefs.SwappingProcedure;
SwapStrategy: TYPE = AllocDefs.SwapStrategy;
PageCount: TYPE = AltoDefs.PageCount;
PageNumber: TYPE = AltoDefs.PageNumber;
TableHandle: TYPE = BootDefs.TableHandle;
SegmentHandle: TYPE = SegmentDefs.SegmentHandle;
DataSegmentHandle: TYPE = SegmentDefs.DataSegmentHandle;
FileSegmentHandle: TYPE = SegmentDefs.FileSegmentHandle;
MaxVMPage: PageNumber = AltoDefs.MaxVMPage;
PageSize: CARDINAL = AltoDefs.PageSize;
PAGEDISP: TYPE = MACHINE DEPENDENT RECORD [
page: [0 .. MaxVMPage].
disp: [0 .. PageSize)];
PageFromAddress: PUBLIC PROCEDURE [a:POINTER] RETURNS [PageNumber] =
BEGIN
RETURN[LOOPHOLE[a.PAGEDISP].page]
END;
AddressFromPage: PUBLIC PROCEDURE [p:PageNumber] RETURNS [POINTER] =
BEGIN
RETURN[LOOPHOLE[PAGEDISP[p.O]]]
END;
PagePo;nter: PUBLIC PROCEDURE [a:POINTER] RETURNS [POINTER] =
BEGIN
LOOPHOLE[a.PAGEDISP].disp ~ 0;
RE1URN[a]
END;

-- Data Segments
DefaultBase: PageNumber ~ SegmentDers.DefaultBase;
NewDataSegment: PUBLIC PROCEDURE [base:PageNumber. pages:PageCount]
RETURNS [seg:DataSegmentHandle]