Scheduling Policy
In POSIX 1003.1c compliant systems, support for the specification of scheduling policy is optional. The Threads Module determines whether scheduling policy is supported by testing for the definition of the macro _POSIX_THREAD_PRIORITY_SCHEDULING. Even if the API indicates that priority scheduling is supported, the environment may not support all policies.
The HP implementation of the POSIX 1003.1c threads API supports all three scheduling policies as defined by the standard:
*SCHED_FIFO — Specifies FIFO scheduling, where threads run until preempted by a thread of higher priority, or until blocked. Thread priorities are set by the application; the system does not dynamically change a thread’s priority.
*SCHED_RR — Selects round-robin scheduling, where the highest-priority thread runs until preempted by a thread of higher priority, until some time-quantum has elapsed, or until blocked. Threads possessing the same priority value are time-sliced and scheduled in a round-robin fashion. Thread priorities are set by the application; the system does not dynamically change a thread’s priority.
*SCHED_OTHER — Selects the default scheduling policy for an implementation. This policy typically uses time-slicing with dynamic adjustments to priority and/or time-slice quantum.
The Threads Module HP-UX POSIX implementation maps its RWSchedulingPolicy values to the underlying POSIX 1003.1c policy values as follows:
Table 5 – HP-UX: Mapping of RWSchedulingPolicy to POSIX 1003.1c values 
Threads Module RWSchedulingPolicy
POSIX 1003.1c Scheduling Policy
RW_THR_PREEMPTIVE
SCHED_FIFO
RW_THR_TIME_SLICED_FIXED
SCHED_RR
RW_THR_TIME_SLICED_DYNAMIC(RW_THR_OTHER may be used to set)
SCHED_OTHER
Attempts to set any other scheduling policy value will result in an RWTHROperationNotAvailable exception. None of these policies may be explicitly requested unless the process has root privileges or is a member of a group with the RTPRIO privilege.
Note that the Threads Module has mapped two policy values to the same underlying policy, SCHED_OTHER. Calls to getSchedulingPolicy() will return RW_THR_TIME_SLICED_DYNAMIC since that value gives the most meaningful interpretation.
A new thread’s scheduling policy is inherited from the creating thread by default, unless the scheduling policy attribute has been explicitly set or the inheritance policy has been changed from its default value of RW_THR_INHERIT to RW_THR_EXPLICIT. If the inheritance policy is RW_THR_EXPLICIT, the Threads Module defines the default scheduling policy to be RW_THR_TIME_SLICED_DYNAMIC.