Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
51
bash$ $( LD_ASSUME_KERNEL=2.12 ldd /bin/ls | grep libc.so |awk '{print $3}' ) | egrep
-i 'threads|ntpl'
Oracle Solaris Threading Model
Before the POSIX standard was ratified, the Oracle Solaris multithreading API was implemented in the
Oracle Solaris libthread library, which was developed by Sun and later became the basis for the
UNIX International (UI) threads standard.
Oracle Solaris threads is a Sun Microsystems threads interface that is not POSIX threadscompliant.
It's a predecessor of Pthreads. This implementation uses an MxN model (User X kernel threads).
Based on performance studies and extensive workload analyses done for large enterprise customer
workloads with very large numbers of processors, the MxN model was replaced with a 1:1 model
starting with Oracle Solaris 9.
Pthreads is a threads interface that is POSIX threadscompliant. Support for the POSIX standard
was added with the libpthread API in the latter versions Oracle Solaris. The libthread and
libpthread libraries were merged into the standard libc C library beginning in Oracle Solaris 10.
Oracle Solaris uses a 1:1 (user:kernel) thread model in preference to the historic MxN
implementation. By simplifying the underlying thread implementation, existing applications now can
see dramatic performance and stability improvements without requiring recompilation.
While Oracle Solaris supports both Pthreads and Oracle Solaris threads, the Pthread model is
recommended for new application development and porting efforts. Over 100 standards POSIX
functions are available through the Pthreads API. See the pthreads man page for detailed
information, including a comparison to the Oracle Solaris threading APIs.
It is possible to mix the two threading models, but this creates undue complexity and should be
avoided. Both the libthread and libpthread libraries are maintained in Oracle Solaris to
provide backward compatibility for both runtime and compilation environments. The
libthread.so.1 and libpthread.so.1 shared objects are implemented as filters on
libc.so.1. See the libthread(3LIB) and libpthread(3LIB) man pages for more
information.
Differences Between the Oracle Solaris and Linux Threading Models
Overall, from the migration perspective, the implementation differences on the two platforms
primarily fall into two categories:
Nonstandard interfaces. In the nonstandard interfaces category, falls the entire implementation
coming from LinuxThreads (on RHEL) and libthread.so (the Solaris non-POSIX thread
library). The interfaces exposed from these thread libraries can to some extent be mapped to
functions in the POSIX thread library (which Oracle Solaris also provides).
Standard interface. Since RHEL 6.0 and Oracle Solaris implement the same POSIX 1003.1c
standard, migration to Oracle Solaris would not involve too much rework. Note that you will have to