Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!munnari.oz.au!sirius.ucs.adelaide.edu.au!augean!sibyl!ian From: ian@sibyl.eleceng.ua.OZ (Ian Dall) Newsgroups: comp.arch Subject: Re: vfork (was Re: Paging page tables) Message-ID: <774@sibyl.eleceng.ua.OZ> Date: 14 Jul 90 06:15:41 GMT References: <920@dgis.dtic.dla.mil> <5830@titcce.cc.titech.ac.jp> <5DL4SPD@xds13.ferranti.com> <5855@titcce.cc.titech.ac.jp> Reply-To: ian@sibyl.OZ (Ian Dall) Organization: Engineering, Uni of Adelaide, Australia Lines: 39 In article <5855@titcce.cc.titech.ac.jp> mohta@necom830.cc.titech.ac.jp (Masataka Ohta) writes: >>> 1) An utterly broken implementation where some important system >>> process (such as inetd, ypbind or sendmail) may killed if there >>> is not enough swap space. > >>Alternatively, put the program in a wait state until swap space is available. >>Deadlocks are possible, but unlikely. Indefinite deferment is more likely, >Once swap space shortage occurs, it will tend to occur continually >until some large process exits. So, if all such processes put in >wait states (which is very likely to occur, because active process >often requires new pages) the situation is deadlock. Masataka seems to live in a binary world were there is only the BSD and the SysV implimentations. These are no the only possibilities! I like the SysV method of not allocating swap space until it is necessary. It allows the total virtual memory used to (almost) equal the sum of the swap space and the physical memory which seems to me desirable. It is true that it is undesirable for the system to into deadlock due to lack of swap space. However, there are ways around it. A simple solution is to have a high water mark for free swap space and when that high water mark is exceeded cause any process, except those with certain effective uids, to block if it does anything which increases its memory requirements (including COW). To the user the system will appear to have deadlocked, but not to the super user who can at least run ps and kill. Of course if you are in that situation often you need more swap space or more physical memory. (With the BSD scheme you need both). Of course some systems (such as VMS) have per user quotas on swap space. Whether that is good depends on your environment I suppose. (I personally disliked VMS quota for everything, but that might just have been because it was never big enough!) Others might think up more elegant solutions. The point is you shouldn't throw out the baby with the bath water. Copy on write is an elegant idea. Don't stomp on it just to keep vfork! -- Ian Dall life (n). A sexually transmitted disease which afflicts some people more severely than others.