Multithreaded programs, whether they are implemented using library calls or using OpenMP or other parallel compiler directives, make calls to the threads library, libthread.so. The SolarisTM 8 Operating System has two variants of the threads library, libthread.so. The default threads library is essentially the same as in the Solaris 7 Operating System. The alternate threads library, which is in /usr/lib/lwp, has the same behavior as the threads library in the Solaris 9 Operating System.
The two threads libraries in the Solaris 8 Operating System have different behavior. The default threads library creates extra threads to perform signal handling and other tasks. If bound threads are used, extra LWPs are created for the extra threads. Performance data is not collected for these threads, which spend most of their time sleeping. However, the time spent in these threads is included in the process statistics and the times recorded in the sample data. In addition, clock data that should appear as User Lock time appears as Other Wait time in the Performance Analyzer. The alternate threads library does not create these extra threads, always binds threads to LWPs, and correctly accumulates clock data for User Lock time. Using the alternate threads library generally results in better program performance and better performance data. You can choose the alternate threads library explicitly when you link your program, or add the path to the library to the LD_LIBRARY_PATH environment variable so that it is used when you run your program.
In OpenMP programs, the compiler inserts calls to the microtasking library, libmtsk.a, which implements the parallel execution of the program. This library manages the creation of threads, which are bound threads by default. When worker threads are waiting for work, they spend their time in a busy wait, which appears as User CPU time in the Performance Analyzer. You can set the environment variable SUNW_MP_THR_IDLE to specify a sleep wait, which appears as Other Wait time in the Performance Analyzer. See the OpenMP API User's Guide for more information.