Re: Linux threads -- as seen in NT Magazine

Richard Gooch (rgooch@atnf.csiro.au)
Sun, 13 Dec 1998 08:12:15 +1100


David Feuer writes:
> Apparently everyone else on the face of the earth disagrees with me, but
> I think that it would really be nice if threads could send asynchronous
> events to each others (signals or similar). 'twould also be pleasant if

??? Since each thread is a "process" under Linux, sending signals from
one thread to another is trivial. Use kill(2).

> the kernel (and ps,....) had the idea of a process with multiple threads
> (same PID, multiple TIDs, where TID identifies a thread within a
> process, (pid,tid) uniquely identifying a thread on the machine). If it
> does, send me your hate mail. This would, as others mentioned, allow
> the kernel to know it is supposed to spread certain threads around.
> ***I think it would be _very_ good to make sure that threaded-pipeline
> programs are run in a reasonable way (for example, it would probably not
> be good if pipeline went 1-2-3, but 1 and 3 ended up on the same
> processor).***

If you have the processes blocking on each other, then they will be
scheduled on the "right" processor. If the processes don't block then
it shouldn't matter.
If you think the current implementation isn't working, benchmark and
analyse it to show us how.

Regards,

Richard....

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