Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.arch Subject: Re: fork, spawn, vfork: an overview Message-ID: <25910@mimsy.umd.edu> Date: 6 Aug 90 13:57:08 GMT References: <920@dgis.dtic.dla.mil> <5830@titcce.cc.titech.ac.jp> <1990Aug6.010044.8638@watdragon.waterloo.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <1990Aug6.010044.8638@watdragon.waterloo.edu> tbray@watsol.waterloo.edu (Tim Bray) asks the very reasonable question: >How much does fork() cost? ... Quantitatively, how much does vfork() >save? Is the picture significantly different on a workstation which spends >much of its time running a window system and a few technical applications? > >Somebody must have measured this at some time. Or did somebody in the bsd >gang just say "That looks inefficient. Let's fix it" and create vfork()? I have only two data points on this myself (the vfork thing was done before my time---I only got into this Unix business in late 1981...). I know that the Franz Lisp group at Berkeley drove some of the changes to the VM system between various 4BSD releases (including, I suspect, vadvise); and I know that the VM group at Sun who did the SunOS 4.x virtual memory took vfork out (made it a simple copy-on-write fork) and then put it back. Whether the latter was only temporary, I cannot say, but surely someone from Sun should remember: Was this for performance or just to accomodate broken programs like csh? Anyway, old Berkeley papers should describe the vfork savings (which for 6+ MB Lisp jobs on a VAx-11/780 without a copy-on-write fork will no doubt be quite impressive); but keep in mind that these will compare `copy everything' against `copy nothing' without mentioning a middle ground (`copy PTEs and written pages'). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750)