Next: Java threads
Up: Threads
Previous: Solaris threads
The Pthread implemenations on the Linux mainly include
LinuxThread, NPTL, and NGPT.
And NPTL is becoming the main-stream implemenations in most of linux distribution.
See more detail
Which one is using can be identified by the command
getconf GNU_LIBPTHREAD_VERSION
Linux doesn't have the LWP concept, the minimum schedule-able unit is just process.
Also NGPT adopts the one-on-one model,
so every user thread will be bound to a process.
However Linux has a function clone(), which is used to clone a process to create a new process.
clone() can be set as multiple configurations to indicate how much stuff should be shared between the parent process and new process.
In case every thing (e.g., address space, resource, etc.) will be shared,
then the performance will be very good, and new process can be viewed as a newly-created thread.
Wei Lu
2007-11-06