DIRECTORY YggDummyFile USING[Handle, PageCount, PageNumber, RC, Reason]; YggFilePageMgrIO: CEDAR DEFINITIONS = BEGIN IORequest: TYPE = RECORD[filePageNumber: YggDummyFile.PageNumber, nPages: YggDummyFile.PageCount, vM: LONG POINTER]; IOType: TYPE = {read, write}; Who: TYPE = {IOThread, controller}; RegisterRequest: PROCEDURE[controllingProcess: PROCESS, io: IOType, file: YggDummyFile.Handle, list: LIST OF IORequest] RETURNS[iORequest: IORequest]; GetNext: PROCEDURE[controllingProcess: PROCESS, who: Who] RETURNS[error: YggDummyFile.RC, errorIORequest: IORequest, workToDo: BOOLEAN, iORequest: IORequest]; LogError: PROCEDURE[controllingProcess: PROCESS, who: Who, why: YggDummyFile.Reason, errorIORequest: IORequest]; DoIO: PROCEDURE[io: IOType, file: YggDummyFile.Handle, 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 March 23, 1988 11:05:40 am PST 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šžœ žœ ˜1J˜J˜——Jšœžœž œ˜%J˜J˜Jšž˜J˜J˜JšœΊ™ΊJ˜Jšœύ™ύJ˜Jšœ‘™‘J˜J˜J˜šœ žœžœI˜aJšœžœžœ˜—Jšœžœ˜Jšœžœ˜#J˜J˜šΟnœž œžœ ˜CJšœ!žœžœ žœ˜RJšœ™J˜J˜—š Ÿœž œžœ žœžœ˜YJšœ%žœ˜DJšœ™J˜J˜—šŸœž œžœ%˜TJ˜Jšœ™J˜J˜—šŸœž œ@Οc˜bJšœ™J˜J˜—Jšžœ˜˜J˜J˜—J˜UJ˜2J˜J˜™$K™—K™—…—κ m