Re: Forking (fwd)

Robert Glamm (glamm@mountains.ee.umn.edu)
Fri, 13 Jun 1997 09:42:15 -0500 (CDT)


> > Is it possible to create a new process which shares the data with the
> > parent?
>
> Yes, by specifying such an option to clone() (which fork() uses to
> implement its behaviour, btw). That is not meant to be used in
> applications, though. You should use a thread library that supports the
> clone() system call (such as linuxthreads).

So why is clone() not meant to be used in applications? If I want
full control over how my program is parallelized across multiple processors,
I'm going to want use clone(). If you claim that we shouldn't use clone()
for "portability" reasons, that's a bunch of BS - if you want your
application to all-out perform on SMP machines, you have to hand-tune
it for each architecture, making portability pointless anyway.

-- 
"If HP was only an $8 billion  | Bob Glamm  H: +1 612 6239437 W: +1 612 6268981 
 company like Sun, we also     | URL:        http://www-mount.ee.umn.edu/~glamm
 might be less ambitious."     +-----------------------------------------------
 -- HP's Lewis Platt referring to Sun's refusal to support Windows NT