dce/rpc "client" api

Peter Samuelson peter at cadcamlab.org
Thu Aug 24 04:21:33 GMT 2000

> > The old Unix culture of "fork() is massively expensive and use
> > should be minimized at all costs" is not always true on modern
> > Unices; Linux in particular has a fairly cheap fork().

[Luke Leighton]
> yep, copy-on-write, i am relying on it :)

Well, that's the big one, but not the only factor.  I don't have any
hard numbers but I heard at one point that on Solaris it is something
like 10x cheaper to create a new thread than fork a new process -- and
that's *with* copy-on-write, so I have no idea why.  (Paging Dave ...
Paging Dave C-B....)  But I guess some other brands of Unix are like
this too.  This is one big reason to use threads on Unix,
traditionally: they are perceived as more efficient.  Solaris calls
threads "light-weight processes" for a reason.

In Linux, on the other hand, instead of 10x it's more like 1.5x or so.
(Not that threads are *less* efficient -- mostly that fork() is *more*
efficient.)  Thus the cost argument for threads doesn't hold up so
much.  (But there can still be other reasons!)


More information about the samba-technical mailing list