HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)
r
rtsched(2) rtsched(2)
contains at least 32 priorities.
SCHED_RR Round-robin scheduling policy, with a per-system time slice (time quantum).
This policy is identical to the SCHED_FIFO policy with the additional condition that
when the implementation detects that a running thread has been executing as a run-
ning thread for a time period of length returned by the function
sched_rr_get_interval()
, or longer, the thread becomes the tail of its thread
list, and the head of that thread list is removed and made a running thread.
The effect of this policy is to ensure that if there are multiple
SCHED_RR threads at
the same priority, one of them will not monopolize the processor. An application
should not rely only on the use of
SCHED_RR to ensure application progress among
multiple processes if the application includes processes using the
SCHED_FIFO policy
at the same or higher priority levels, or
SCHED_RR processes at a higher priority
level.
A thread under this policy that is preempted and subsequently resumes execution as a
running thread completes the unexpired portion of its round-robin interval time
period.
For this policy, valid priorities are within the range returned by the functions
sched_get_priority_max()
and sched_get_priority_min() when
SCHED_RR is provided as the parameter. The priority range for this policy contains
at least 32 priorities.
SCHED_RR2 Round-robin scheduling policy, with a per-priority time slice (time quantum).
This policy is identical to the SCHED_RR policy, except that the round-robin time
slice interval returned by sched_rr_get_interval()
depends upon the prior-
ity of the specified process.
For this policy, valid priorities are within the range returned by the functions
sched_get_priority_max()
and sched_get_priority_min() when
SCHED_RR is provided as the parameter. The priority range for this policy contains
at least 32 priorities.
SCHED_RTPRIO Real-time scheduling policy with nondecaying priorities (like SCHED_FIFO and
SCHED_RR) with a priority range between the POSIX real-time policies and the HP-
UX policies, described below (see rtprio(2)).
For processes executing under this policy, the implementation must use only priorities
within the range returned by the functions sched_get_priority_max()
and
sched_get_priority_min()
when SCHED_RTPRIO is provided as the param-
eter. Note that, for the
SCHED_RTPRIO scheduling policy, smaller numbers
represent higher (stronger) priorities, which is the opposite of the POSIX scheduling
policies. This is done to provide continuing support for existing applications that
depend on this priority ordering. However, it is guaranteed that the priority range for
the SCHED_OTHER scheduling policy is properly disjoint from the priority ranges of
all of the other scheduling policies described and the strongest priority in the priority
range for SCHED_RTPRIO is weaker than the weakest priority in the priority ranges
for any of the POSIX policies, SCHED_FIFO , SCHED_RR, and SCHED_RR2.
SCHED_OTHER (SCHED_HPUX , SCHED_TIMESHARE)
Another scheduling policy.
The SCHED_OTHER policy, also known as SCHED_HPUX and SCHED_TIMESHARE,
provides a way for applications to indicate, in a portable way, that they no longer need
a real-time scheduling policy.
For processes executing under this policy, the implementation can use only priorities
within the range returned by the functions sched_get_priority_max() and
sched_get_priority_min() when SCHED_OTHER is provided as the parame-
ter. Note that for the SCHED_OTHER scheduling policy, like SCHED_RTPRIO ,
smaller numbers represent higher (stronger) priorities, which is the opposite of the
POSIX scheduling policies. This is done to provide continuing support for existing
applications that depend on this priority ordering. However, it is guaranteed that the
priority range for the SCHED_OTHER scheduling policy is properly disjoint from the
priority ranges of all of the real-time scheduling policies described and the strongest
350 Hewlett-Packard Company − 5 − HP-UX 11i Version 3: February 2007