Re: Forking (fwd)

Clemens Huebner - Sun Germany Technical Solution Center - Munich (Clemens.Huebner@Germany.Sun.COM)
Fri, 13 Jun 1997 17:26:23 +0200


> From glamm@mountains.ee.umn.edu Fri Jun 13 17:17:03 1997
> From: Robert Glamm <glamm@mountains.ee.umn.edu>
> Subject: Re: Forking (fwd)
> To: linux-kernel@vger.rutgers.edu
> Date: Fri, 13 Jun 1997 09:42:15 -0500 (CDT)
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
>
>
> > > 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.

Because you get the same performance/control with a threads library, but you get a fully
portable ptogram that way.

Clemens

>
> --
> "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