[M3devel] removing vfork, general header cloning matters?
Mike Frysinger
vapier at gentoo.org
Thu Nov 5 21:32:50 CET 2009
On Thursday 05 November 2009 15:09:18 Jay K wrote:
> fork/exec vs. vfork/exec
> On current systems why does vfork ever win?
every system out there ? for some trivial logic:
http://www.netbsd.org/Documentation/kernel/vfork.html
> Or win significantly?
old/slow systems ?
with today's cpu power and optimization with fork(), i dont think modern OS's
have a significant performance difference. although it should be pretty easy
to test ... simply write a loop that does fork(); exec(/bin/true); in a loop
and compare its rusage to the same loop but with vfork() in it.
> Even though vfork is no longer Posix, it is still widespread with matching
> semantics everywhere? Always either equivalent or slightly faster?
for what you want (a fast fork + exec), the semantics should be safe/portable.
if you want to do anything more exotic (and thus outside the realm of POSIX
2004), i'm really only familiar with inner details of Linux.
> The disappointing thing is that the system with the really really slow fork
> -- Cygwin -- has an identical vfork.
cygwin is slow all the time. focus on mingw if you want real windows support.
not that i have any idea how much effort this would require for cm3 ... it's
be a long time since i last looked at the code base after giving up on porting
it to something reasonable (x86_64/Linux) let alone fun (hppa).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091105/4c612c0c/attachment-0002.sig>
More information about the M3devel
mailing list