Link to home
Start Free TrialLog in
Avatar of jhson
jhson

asked on

The number of thread per process

How do I know the number of thread per process under
unix, for example Solaris or HPUX?
and Can I change the number of thread per process
according to environments?
Avatar of dpodvaln
dpodvaln

  In Unix each process have one thread.
Avatar of jhson

ASKER

Originally in unix each process has one thread.
Each process can have many threads using thread package.
But, each process cannot have beyond the max number of thread because of Unix limitation.
I heard we can manage the max number of thread per process in
unix configuration.

ASKER CERTIFIED SOLUTION
Avatar of rembo
rembo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I can only comment on the Solaris Implementation. The number of threads per process is unlimited in the Solaris Implementation and in the POSIX standard. I.E. you can make as many thread_create() calls as you like. (pthread_create() under POSIX). Since each thread creation take a small amount of the virtual memory stack (1MB by deafult) so the real limitation how much stack space you use.