Scheduling Contention Scope
Solaris implicitly supports the concept of contention scope. Solaris allows both process-scope and system-scope threads.
Under Solaris, a process-scope thread is an unbound thread, and a system-scope thread is a bound thread. A bound thread is a thread that is permanently assigned to an underlying light-weight process, or LWP. An LWP can be thought of as the Solaris equivalent of a kernel thread. Unbound threads are scheduled by the threads library and contend for LWPs, while bound threads are scheduled by the kernel and contend directly for processors.
The Threads Module implementation maps contention scope policies to the underlying API as follows:
RW_THR_PROCESS_SCOPE The thr_create() flags argument excludes the THR_BOUND option which tells the API to create an unbound thread.
RW_THR_SYSTEM_SCOPE The thr_create() flags argument includes the THR_BOUND option which tells the API create a new LWP and bind the new thread to that LWP.
Under Solaris, threads with a contention scope value of RW_THR_PROCESS_SCOPE have a fixed scheduling policy of RW_THR_PREEMPTIVE, while threads with RW_THR_SYSTEM_SCOPE have a fixed scheduling policy of RW_THR_TIME_SLICED_DYNAMIC, unless the process has the super-user privilege, in which case, the thread also has access to RW_THR_TIME_SLICED_FIXED, and RW_THR_PREEMPTIVE policies. Each of these scheduling policies can have a different legal range of priority values.
If you change the contention scope attribute, the Threads Module will check that the scheduling policy and priority are still legal in the new contention scope, and if not, will force the scheduling policy or priority values to the appropriate default values. (See the sections on Scheduling Policy, Scheduling Priority, and Scheduling Time-Slice Quantum.)
The Threads Module defines RW_THR_PROCESS_SCOPE as the default contention scope policy under Solaris.