RE: [Fwd: Re: Linus on Linux, Apache and Threads]

Tony Gale (gale@syntax.dera.gov.uk)
Tue, 27 Apr 1999 16:16:36 +0100 (BST)


Except these don't actually answer the question. There are a couple
of issues here:

o Signals
o Wake-one-thread
o PIDs

Signals: LinuxThreads has traditionally used SIGUSR1 and SIGUSR2 to
do it's internal work. Looking at the source code, it looks like
glibc 2.1 with recent kernels will use the RT Signals instead. This
is good.

Wake-one-thread: The function pthread_cond_signal is supposed to wake
a single thread that is waiting on the condition variable. However, a
number of people in this forum have hinted that this is not so, and
that all threads are awakened. Hence, lots of talk of thundering
herds. Is this all just a mistake? If so, this is bad.

PIDs: LinuxThreads assign a different process id to each thread,
even though they have lightweight context switching - this leads to
much confusion with people who don't know about CLONE. [Haven't
checked the glibc 2.1 position on this one.]

I'm beginning to think that there is a misconception with linux and
the wake-one-thread issue, and that it does, indeed, wake a single
thread. I see no reason, given the signalling mechanism and the PID
stuff that it should do anything different.

-tony

On 27-Apr-99 Richard Dynes wrote:
>
> Read the FAQ, I tell myself:
>
> http://sunsite.doc.ic.ac.uk/Mirrors/sunsite.unc.edu/pub/Linux/docs/f
> aqs/Threads-FAQ/html/
> http://pauillac.inria.fr/~xleroy/linuxthreads/
> http://www.serpentine.com/~bos/threads-faq/
>
> -Richard

---
E-Mail: Tony Gale <gale@syntax.dera.gov.uk>
Moebius always does it on the same side.

The views expressed above are entirely those of the writer and do not represent the views, policy or understanding of any other person or official body.

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