Newsgroups: comp.bugs.sys5 Path: utzoo!geoff From: geoff@zoo.toronto.edu (Geoffrey Collyer) Subject: Re: small bug in who(1) of SVR3 Message-ID: <1991Jan14.124459.5096@zoo.toronto.edu> Organization: U of Toronto Zoology References: <18896@rpp386.cactus.org> <1991Jan13.004843.18650@zoo.toronto.edu> <18899@rpp386.cactus.org> Date: Mon, 14 Jan 1991 12:44:59 GMT > fork() and exec() are neither free nor even cheap - shell scripts are > just not the right answer. If memory serves, a PDP-11/70, a Sun 3/180 and a Sun 4/280 (to pick random examples :-), all with SMD disks, fork and exec at about the same rate. Given the increases over time in SMD disk, CPU and memory speeds, this is inexcusable, and means that relative to hardware capabilities, fork and exec are getting more expensive over time. On reflection, we could account for about 10% of the CPU time taken by the Sun 3 fork. (I don't have the numbers at hand; I believe we measured SunOS 3.5 and 4.0 [with and without shared libraries] where possible.) If vendors would fix their kernels to stop squandering the available hardware resources, users could use kernel facilities as they were intended to be used, rather than twisting and contorting every application ``because fork and exec are too expensive''. Fix the problem in one place. (One is reminded of the current internet fad for whapping some combination of authentication and encryption into every protocol rather than solving the problem in TCP, once, but that's a flame for another time.) -- Geoff Collyer utzoo!geoff, zoo.toronto.edu!geoff