Xref: utzoo comp.unix.wizards:22912 comp.unix.i386:6940 comp.sys.att:10003 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!aber-cs!odin!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.unix.wizards,comp.unix.i386,comp.sys.att Subject: Re: Is VHANDFRAC --> VHANDL dynamic? Message-ID: Date: 17 Jul 90 11:57:39 GMT References: <562@oglvee.UUCP> <565@oglvee.UUCP> <1289@tuewsd.win.tue.nl> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 50 In-reply-to: wsinpdb@lso.win.tue.nl's message of 13 Jul 90 10:56:40 GMT In article <1289@tuewsd.win.tue.nl> wsinpdb@lso.win.tue.nl (Paul de Bra) writes: The page-stealing demon will copy a page to swap space and mark it as 'free'. Different versions do different things, but most will not save a page to swap until it is required, just in case it is reused and modified again, so avoiding some IO traffic. Some pagers will even (and it is a big mistake) preferentially select as victims pages that have not been modified, to avoid having to save them prior to reuse. It does not zero the page or anything, so if the process wants the page back and the page has not been ackuired by another process in the meantime the original process can get its original page back. It need not be paged-in from the swap space. Is this correct? Yes. The problem which remains is what happens when a process suddenly needs more pages that are currently marked free. The page stealer (clock hand) would be invoked; and/or the swapper would be invoked and some process (possibly the one that requested the extra page) will be expansion swapped. I suspect that in the current System V/386 the latter course is taken, with the outswap candidate being the process requesting the extra page (which is often a poor choice for obvious reasons). Again, Bach hints that the algorithms used to select outswap (especially if outswap was because of expansion of memory allocation) and inswap candidates should be rewritten. In practice there is very poor interaction between the balance set manager (swapper) and the working set manager (pager, the clock algorithm), because their functions (block is a *global* policy) do overlap somehow, and their logic has not been well integrated and designed. Again, the solution recommended by AT&T is to avoid exercising the swapper and pager, by allocating 2-3 times more real memory than the expected worst case usage (e.g. 512KB to 1MB per user, when the average working set size of a user command is well below 100-300KB). -- Piercarlo "Peter" Grandi | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk