Operating System - HP-UX
1833247 Members
2875 Online
110051 Solutions
New Discussion

Re: Pthread implementation

 
Stephen Hoare
Occasional Contributor

Pthread implementation

Does anyone know if pthreads are implemented as light weight processes or not.

For example is there 1 kernal thread per pthread or is there 1 kernal thread which is linked to the process which owns the pthread.

I've developing on HPUX 11.i using gcc, C++ and POSIX threads
2 REPLIES 2
Steve Steel
Honored Contributor

Re: Pthread implementation

Hi


Read

/usr/share/doc/proc_mgt.txt
Explains Kernel threads well


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Mike Stroyan
Honored Contributor

Re: Pthread implementation

The -lpthread threads on 11i, 11.11, are 1x1 kernel threads.
The 11iv1.6, 11.22, release changes for programs compiled on 11.22. It defaults to an MxN thread model where user threads share a pool of kernel threads.
You can control that with pthread attributes and the pthread_attr_setscope function.
There are details of the 11.22 changes in the release notes at
http://www.docs.hp.com./cgi-bin/onlinedocs.py?mpn=5187-0701&service=hpux&path=../5187-0701/00/00/67&title=HP-UX%2011i%20Version%201.6%20Release%20Notes