Re: Slow pthread_create() under high load

From: Jeremy Fitzhardinge (jeremy@goop.org)
Date: Tue Mar 28 2000 - 12:55:55 EST


On 28-Mar-00 yodaiken@fsmlabs.com wrote:
>> IMHO, at least sharing PIDs would be a useful thing. Signal queues
>> would be nice, but there are other ways to deal with that.
>
> Can someone tell me why:
>
> pthread_creat( ....)
> if this is the first created thread
> rootpid = getpid();
> redefine getpid === return rootpid
>
> Doesn't work?

That would solve the problem of a given thread seeing its own thread, but it
doesn't deal with the problem of pthread signal semantics. Under pthreads, if
you send a signal to a process (a bunch of threads), it can be handled by any
thread which isn't blocking that signal. Linux only allows you to send signals
to a particular task. If you put all the tasks into a group you could signal
them all, but that's not right either, since the signal could be handled
multiple times by multiple threads.

        J

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



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:22 EST