HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)

r
rtsched(2) rtsched(2)
SCHED_NOAGE
A timeshare scheduling policy with nondecaying priorities.
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_NOAGE is provided as the parame-
ter. The priority range for the
SCHED_NOAGE policy is a subset of the priority 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
pol-
icy, 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 proces-
sor 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 waiting for
the processor resources. This is applicable for all scheduling policies.
Security Restrictions
Some or all of the actions associated with this system call are subject to compartmental restrictions. See
compartments(5) for more information about compartmentalization on systems that support that feature.
Compartmental restrictions can be overridden if the process possesses the
COMMALLOWED privilege
(PRIV_COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes
owned by any user may have this privilege, depending on system configuration.
Some or all of the actions associated with this system call require the
OWNER or the
RTSCHED privilege.
Processes owned by the superuser have these privileges. Processes owned by other users may have these
privileges, depending on system configuration. See privileges(5) for more information about privileged
access on systems that support fine-grained privileges.
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.
334 Hewlett-Packard Company 6 HP-UX 11i Version 2: December 2007 Update