Re: RasterMan on linux and threads

Martin Dalecki (dalecki@cs.net.pl)
Sun, 19 Dec 1999 09:43:26 +0100


Brian Pomerantz wrote:
>
> On Fri, Dec 17, 1999 at 11:23:48PM -0500, Stephen Frost wrote:
> > >
> > > hmm - when did that change ? i thought that was the case and was baked
> > > up on hat asumtion by someone else a few weeks ago (primarily the
> > > reason being to make sure the threads share caches for speed reasons
> > > and to make sure cache concurrency issues are moe easiyl dealt with...
> > > well thats what i unerstood... i may be wrong (2.2 or 2.3 may have
> > > changed that)
> >
> > No, pthreads changed that, from my understanding. linuxthreads did
> > it all in one thing w/o ever actually calling the kernel 'clone'. pthreads
> > properly calles 'clone' and therefore each thread gets it's own PID and as
> > such can be scheduled on any CPU. (Well, that's not the direct reason, but
> > you know what I mean).
> >
>
> Not quite. Linuxthreads has always used clone and is an attempt to
> implement the POSIX threading spec. There has been a number of
> pthread implementations over the years that were strictly user space.
> I think there is a GNU threads or something like that which is still a
> user-space pthread implementation.
>
> >
> > > hmmm - when did that change - i know solarids has them run on multiple
> > > cpu's though...
> >
> > Solaris implemented it kernel-level to begin with. The first
> > threading in Linux was done all in user-space, IIRC. Which meant that it
> > couldn't because a single process (to the kernel) won't get multiple CPUs.
> >
>
> Solaris and True64 (AIX as well?) have both user-space thread control
> as well as kernel threading which is taken care of by the kernel.
> With these you can switch between being user-space and kernel threads,
> though I don't see the wisdom in this. The philosophy of these other

The wisdom of this is that under solaris the cost of switching CPU
contexts
is much higher then under linux. Therefore it makes sense to use
a mixup between user space only context switching and kernel level one.

> platforms are much different than the Linux way of handling threads.
>
> BAPper
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

--
	Marcin Dalecki

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/