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

Olivier Croquette
2005-05-20T15:00:48Z

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.