[lkml]   [2000]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SCO: "thread creation is about a thousand times faster than on native Linux"
On Thu, Aug 24, 2000 at 09:29:35AM -0700, Linus Torvalds wrote:
> On Thu, 24 Aug 2000 wrote:
> >
> > How about allowing the thread root process to do all that junk by giving it
> > raw signals - e.g. delivering SUSPEND - and then letting it distribute
> > via a pthread_kill?
> I don't think that is a good approach from a performance point of view -
> it's too similar to what we already do.
> HOWEVER, I suspect that pthreads compatibility with signals may require us
> to have that thread root process (even if it isn't used for anything
> else), because I think that makes our signal handling be POSIX-conformant:
> if I remember correctly POSIX does allow the notion of having signals
> handled in a special thread that doesn't do anything else. It would still

The root thread can tell Linux: I'm a pthreads root thread, I don't want
POSIX signals, I want raw signals.
The advantage is that for things like kill(threaded_pid,SUSPEND)
does not have to be in a place where it slows down sensible signal

Libc can make sure that all the usual signal operations in non-root
threads update the per-thread signal information and then the root
thread can do:
find a thread that takes this signal

Signals are slower but using this feature of signals/threads is dumb

> mean that if you create 'n' pthreads threads, you actually get 'n+1'
> kernel threads, but hey, one of them is going to be dormant pretty much
> all the time.

> Linus

Victor Yodaiken
Finite State Machine Labs: The RTLinux Company.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.141 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site