DIRECTORY YggHostFS USING[HostFile, PageCount, PageNumber, RC, Reason]; YggFilePageMgrIO: CEDAR DEFINITIONS = BEGIN IORequest: TYPE = RECORD[filePageNumber: YggHostFS.PageNumber, nPages: YggHostFS.PageCount, vM: LONG POINTER]; IOType: TYPE = {read, write}; Who: TYPE = {IOThread, controller}; RegisterRequest: PROCEDURE[controllingProcess: PROCESS, io: IOType, file: YggHostFS.HostFile, list: LIST OF IORequest] RETURNS[iORequest: IORequest]; GetNext: PROCEDURE[controllingProcess: PROCESS, who: Who] RETURNS[error: YggHostFS.RC, errorIORequest: IORequest, workToDo: BOOLEAN, iORequest: IORequest]; LogError: PROCEDURE[controllingProcess: PROCESS, who: Who, why: YggHostFS.Reason, errorIORequest: IORequest]; DoIO: PROCEDURE[io: IOType, file: YggHostFS.HostFile, iORequest: IORequest]; -- utility routine. END. Edit Log Initial: Kolling: August 25, 1983 6:30 pm: definitions module for FilePageManager io. Nodified: Hauser: February 20, 1985 3:08:18 pm PST ΎYggFilePageMgrIO.mesa Copyright c 1988 by Xerox Corporation. All rights reserved. Last edited by Kolling on January 27, 1984 2:39:57 pm PST Bob Hagmann May 13, 1988 4:42:17 pm PDT The (controlling) process: starts the "sequential" io by calling RegisterRequest (which Notifies IdlerNeeded), and then loops on GetNext until that returns error # ok OR workToDo = FALSE. (GetNext does not return error # ok OR workToDo = FALSE to the controller until its idler, if any, has completed.) If the controller detects an error while doing io, it must call LogError to terminate this sequence; LogError will not return to the controller until the associated idler, if any, has stopped. It is the controller's responsibility to report errors to its caller. An idler sits around waiting for IdlerNeeded; when it sees it, it calls RegisterIdler and if workToDo # FALSE it then loops on GetNext until workToDo = FALSE (GetNext doesn't report errors to the idler, it just stops it with workToDo = FALSE). If the idler detects an error while doing io, it must call LogError to terminate this sequence and inform the controller of the error. By setting maxRequests in FilePageMgrIOImpl suitably, we can optimize for File really scheduling disk requests or (current case) only doing FCFS. non system fatal errors: none. non system fatal errors: none. non system fatal errors: none. non system fatal errors: none. Hauser, March 7, 1985 2:59:18 pm PST Added copyright. ΚΓ˜šœ™Icodešœ Οmœ1™<—šœ™Jšœ*™*K™'—J˜JšΟk ˜ ˜šœ ˜ Jšžœ"žœ ˜3J˜J˜——Jšœžœž œ˜%J˜J˜Jšž˜J˜J˜JšœΊ™ΊJ˜Jšœύ™ύJ˜Jšœ‘™‘J˜J˜J˜šœ žœžœC˜[Jšœžœžœ˜—Jšœžœ˜Jšœžœ˜#J˜J˜šΟnœž œžœ ˜CJšœ žœžœ žœ˜QJšœ™J˜J˜—š Ÿœž œžœ žœžœ˜VJšœ%žœ˜DJšœ™J˜J˜—šŸœž œžœ"˜QJ˜Jšœ™J˜J˜—šŸœž œ?Οc˜aJšœ™J˜J˜—Jšžœ˜˜J˜J˜—J˜UJ˜2J˜J˜™$K™—K™—…—Ϊ [