HP-UX Reference (11i v2 03/08) - 2 System Calls (vol 5)
r
rtsched(2) rtsched(2)
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 priority in the priority range for
SCHED_OTHER is
weaker than the weakest priority in the priority ranges for any of the other policies,
SCHED_FIFO, SCHED_RR, and SCHED_RR2.
SCHED_NOAGE
A timeshare scheduling policy with nondecaying priorities.
For processes executing under this policy, the implementation can use only priori-
ties within the range returned by the functions
sched_get_priority_max()
and sched_get_priority_min()
when SCHED_NOAGE is provided as the
parameter. The priority range for the
SCHED_NOAGE
policy is a subset of the prior-
ity range supported by the
SCHED_TIMESHARE
policy. Note that for the
SCHED_NOAGE scheduling policy, smaller numbers represent higher (stronger)
priorities, which is the opposite of the POSIX scheduling policies.
The priority value of a thread executing with the
SCHED_NOAGE policy is not
decayed or boosted by the operating system scheduler. For
SCHED_TIMESHARE
policy, the priority value of the thread is decayed as the thread consumes processor
cycles and boosted when the thread waits for processor cycles.
The threads in different processor sets do not compete with one another for processors based on their
scheduling policy and priority values. The scheduler looks only at threads assigned to a processor’s pro-
cessor set to choose the next thread to run. A process with lower scheduling priority in one processor set
may be executing while another process in another processor set with higher scheduling priority is wait-
ing for the processor resources. This is applicable for all scheduling policies.
RETURN VALUE
The functions return the following values:
sched_getparam()
sched_rr_get_interval()
sched_setparam()
sched_yield()
0 Successful completion.
-1 Failure. errno is set to indicate the error.
sched_setscheduler()
n Successful completion. n is the former scheduling policy of the specified process.
-1 Failure. The policy and scheduling parameters remain unchanged. errno
is set to indicate
the error.
sched_getscheduler()
n Successful completion. n is the scheduling policy of the specified process.
-1 Failure. errno is set to indicate the error.
sched_get_priority_max()
sched_get_priority_min()
n Successful completion. n is the maximum or minimum value, respectively.
-1 Failure. errno is set to indicate the error.
PRI_HPUX_TO_POSIX()
n Successful completion. n is the the POSIX.4 priority corresponding to pri .
PRI_POSIX_TO_HPUX()
n Successful completion. n is the the HP-UX priority corresponding to pri .
ERRORS
If the functions fail,
errno is set to one of the following values.
sched_setparam()
[EFAULT] The param argument points to an invalid address.
HP-UX 11i Version 2: August 2003 − 6 − Hewlett-Packard Company Section 2−−295