TID and PID allocated from the same pool?

Latest response

In RHEL, I believe this is the case, but am unable to find any reliable documentation that says definitively that Thread ID's are allocated from the same pool (controlled by pid_max).  Does anyone have documentation that this is or is not the case?




RHEL engineering confirmed that yes, TIDs are taken from the same pool (1..pid_max).


When a process creates a thread, its TID == PID. The next thread created by the same process receives a TID = the first TID available from the pool.


This info was obtained from the kernel sources. That was a very good question! :)