I am reading pthread man and seeing following:
With NPTL, all of the threads in a process are placed in the same thread group; all members of a thread group share the same PID.
My current architecture is running on NPTL 2.17
and when I run htop
that is showing threads I see that all PIDs are unique. But why? I am expecting some of them (e.g. chrome) sharing same PID with each other?
The Linux kernel does have the concept of POSIX pids (explorable in
/proc/*
) but it calls them thread group ids in the kernel source and it refers to its internal thread ids aspid
s (explorable in/proc/*/task/*
).I believe this is rooted in Linux's original treatment of threads as "just processes" that happen to share address spaces and a bunch of other stuff with each other.
Your user tool is likely propagating this perhaps confusing Linux kernel terminology.