By default, Solaris threads attempts to adjust the system execution resources (LWPs) used to run unbound threads to match the real number of active threads. While the Solaris threads package cannot make perfect decisions, it at least ensures that the process continues to make progress.
When you have some idea of the number of unbound threads that should be simultaneously active (executing code or system calls), tell the library through thr_setconcurrency(3THR).
For example:
A database server that has a thread for each user should tell Solaris threads the expected number of simultaneously active users.
A window server that has one thread for each client should tell Solaris threads the expected number of simultaneously active clients.
A file copy program that has one reader thread and one writer thread should tell Solaris threads that the desired concurrency level is two.
Alternatively, the concurrency level can be incremented by one through the THR_NEW_LWP flag as each thread is created.
Include unbound threads blocked on interprocess (USYNC_PROCESS) synchronization variables as active when you compute thread concurrency. Exclude bound threads--they do not require concurrency support from Solaris threads because they are equivalent to LWPs.