On Fri, 2004-01-09 at 05:14, Chris Nolan wrote:
> On Fri, 2004-01-09 at 20:58, Andy Bakun wrote:
> > On Thu, 2004-01-08 at 05:24, Chris Nolan wrote:
> > 
> > > 3. Wait for a while. Linux 2.6 includes (as does the RedHat 9.0 and
> > > ES/WS/AS 3.0 kernels) NPTL - the Native POSIX Threads for Linux
> > > implementation which is superior in many ways and does not use clone()
> > > at all. As you'll no longer want to use clone() for threaded apps (trust
> > > me on this), I'm betting that all interested parties will start
> > > complaining in the relevant mailing lists.
> > 
> > Chris, do you have some references for this?  I'd love to read up on it
> > to find out what's coming.  All references to NPTL I can find via google
> > as it relates to changes in 2.6 talk about how 2.6 has additional
> > clone() options that NPTL takes advantage of (most of them reference a
> > text that is available at http://kerneltrap.org/node/view/422).  Also,
> > why are you down on clone() -- I trust you, but I want to learn! :)
> > 
> My references come from the LKML and KernelTrap! :-) I'm a bit of a geek
> in this respect, and quite enjoy reading up on OS internals. If you have
> a look at Ulrich Drepper's home page (somewhere on Redhat's servers)
> he's got some info about the beast as he wrote NPTL. Admittedly, it
> almost seems as if he wrote it in response to NGPT (Next Generation
> POSIX Threads - a competing but now unsupported thread implementation
> for kernel 2.6 inclusion).
 ... (good stuff deleted for brevity)...
> Everyone, please pull me up on anything I've said here that sounds like
> tripe!

Thanks!  The only complaint I have with your explanation is that NPTL,
as outlined in a PDF I found by Ulrich Drepper about the implementation
of NPTL (and which was most likely the original source of the
information contained in the kerneltrap link I provided), does, in fact,
use clone(), but requires additional flags that are more
POSIX-standard-thread-oriented rather than process-oriented.  If this is
the same as "does not use clone() at all" is left as an exercise for the
reader. :)

Of course, clone(2) was created a way long time ago (pre 2.0 AFAIK, but
I'm having trouble finding references to that, or Linus's rant about the
creation of clone on lkml, which I know I've read, but can't find right
now) as a more generalized, more-options-for-the-programmer interface to
forking, with some thought-ahead to stuff that could be used for
threads.  Hind sight is 20/20, though, and there are obvious
deficiencies when it comes to threads.  Obviously, as time advances and
libraries are written, it only makes sense that's it's being more
refined to bring it up with better, modern usage.

-- 
Andy Bakun <[EMAIL PROTECTED]>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to