Re: Thread and process dentifiers (CPU affinity, kill)

From: Olivier Croquette
Date: Fri May 20 2005 - 10:02:22 EST


Lennart Sorensen wrote:

> I believe Linux currently implements threads as seperate processes (at
> least top and ps sees them that way).

Have you tried NPTL (native posix threading library) which is supposed
to become the threading standard on linux in the future (if it works
out)?

Lennart,

From the beginning we are talking about the present GNU/Linux systems, which do already use NTPL in standard. NPTL is no future standard, it is present standard.

This means basicly that 50% of your assertions (like the above) are wrong, and your conclusions "suffer" from that :)

The point is that if you make a ps on a decent Linux based system, you will *NOT* see one process for each thread. Nor they do appear in /proc.

This means there are *NOT* userland processes.

And therefore, you shall *NOT* be able to reference them as such where a process ID is required.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/