From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain Date: Tue, 24 Feb 2009 08:15:04 -0800 From: "Roman V. Shaposhnik" In-reply-to: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <1235492105.28500.524.camel@goose.sun.com> References: Subject: Re: [9fans] Calling vac from C Topicbox-Message-UUID: a7a63e96-ead4-11e9-9d60-3106f5b1d025 On Tue, 2009-02-24 at 10:54 -0500, erik quanstrom wrote: > > about 5 years ago i took a class on performance tuning Solaris. > > > > The instructor claimed that fork was expensive because accounting is never really turned off, just piped to /dev/null. there is no accounting overhead for threads. > > > > I never bothered to verify this, but now that this comes up, I'd tempted. > > there's no need to guess. here's the source code. > > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/fork.c > > cfork is ~525 lines long and seems to take the curious tack of > forking all the lwps associated with a process. that would be forkall(), not fork1()/fork() Thanks, Roman.