YggFilePageMgrLru.mesa
Copyright © 1985, 1988 by Xerox Corporation. All rights reserved.
Last edited by:
Kolling on January 24, 1984 12:58:35 pm PST
Hauser, March 7, 1985 5:18:42 pm PST
Bob Hagmann May 12, 1988 3:57:11 pm PDT
DIRECTORY
YggDIDMap USING[Document],
YggEnvironment USING[PageNumber],
YggInternal USING[FileHandle],
YggFilePageMgrPrivateChunk USING [Chunk, ChunkType, ListChunkType, RefChunk],
YggFilePageMgrPrivateFile USING [FPMFileHandle];
YggFilePageMgrLru: CEDAR DEFINITIONS =
BEGIN
See YggFilePageMgrPrivateFile for implementation details. Things of especial note are: Mapping and unmapping do not go on while a chunk is on an lru list; therefore, the lru procedures can read Chunk.fileHandle and Chunk.startFilePageNumber. The FPMFileObject monitor must not be entered by a process holding the FilePageMgrLruImpl monitor.
PutMappedChunkOnLruList: PROCEDURE[refChunk: YggFilePageMgrPrivateChunk.RefChunk,
lruListPlace: LruListPlace];
non system-fatal errors: none.
LruListPlace: TYPE = {mru, lru};
PutUnmappedChunkOnLruList: PROCEDURE[refChunk: YggFilePageMgrPrivateChunk.RefChunk];
non system-fatal errors: none.
GetOurChunkFromLruList: PROCEDURE [refChunk: YggFilePageMgrPrivateChunk.RefChunk,
tellSweeperToHurry: BOOLEAN];
non system-fatal errors: none.
GetOtherChunkFromLruList: PROCEDURE [chunkType:
YggFilePageMgrPrivateChunk.ListChunkType] RETURNS[mapped: BOOLEAN, refChunk:
YggFilePageMgrPrivateChunk.RefChunk, fileHandle: YggInternal.FileHandle, startFilePageNumber:
YggEnvironment.PageNumber];
non system-fatal errors: none.
if unmapped, we really got it; if mapped, just returns a hint but has also moved the chunk to the mru end of the list.
RelinkChunkAsLruOnLruList: PROCEDURE[refChunk: YggFilePageMgrPrivateChunk.RefChunk];
non system-fatal errors: none.
UsingTooMuchOfCache: PROCEDURE[fPMFileHandle: YggFilePageMgrPrivateFile.FPMFileHandle]
RETURNS [yes: BOOLEAN];
non system-fatal errors: none.
only called for normal type chunks.
WaitToSweep: PROCEDURE [oldNeedToHurry: BOOLEAN, currentEpoch: NAT, chunkType: YggFilePageMgrPrivateChunk.ListChunkType] RETURNS[needToHurry: BOOLEAN,
sweepList: LIST OF SweepItem];
non system-fatal errors: none.
SweepItem: TYPE = RECORD[doc: YggDIDMap.Document, startFilePageNumber: YggEnvironment.PageNumber];
InitializeLruLists: PROCEDURE[nChunks: ARRAY YggFilePageMgrPrivateChunk.ListChunkType OF
NAT];
non system-fatal errors: none.
CheckCacheInCleanState: PROCEDURE RETURNS [clean: BOOLEAN];
non system-fatal errors: none.
END.
Edit Log
Initial: Kolling: 23-Feb-82 17:21:13: private defs file for the lru lists manager part of File Page Manager.
Nodified: Hauser: February 20, 1985 3:10:03 pm PST
Hauser, March 7, 1985 3:07:51 pm PST
Added copyright