Re: Thread implementations...

Andi Kleen (ak@muc.de)
19 Jun 1998 04:26:54 +0200


"David S. Miller" <davem@dm.cobaltmicro.com> writes:

> The folks at Solaris spent a lot of time fixing bugs that were solely
> getting signals right in their threads implementation. Keeping track
> of what the kernel sends to a "kernel bound thread" and making sure
> the right "pure user thread" within gets that signal correctly is
> tricky buisness. It's complex and hell to get right. (search the
> Solaris patch databases for "threads" and "signals" to see that I'm
> for real here about how difficult it is to get right)

Linux (LinuxThreads) has is it not really right unfortunately. There is
no way to send a signal to a process consisting of multiple threads and
it to be delivered to the first thread that has it unblocked (as defined
in POSIX) - it will be always delivered to the thread with the pid it was
directed to.

To fix it CLONE_PID would need to be made fully working.

Unfortunately that opens a can of worms - either a new tid is needed (with
new system calls etc. - ugly), or the the upper 16bits of pid space are
reused - but those are already allocated from Beowulf.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu