mpctl.2 (2010 09)
m
mpctl(2) mpctl(2)
process will not be selected to execute on the selecting processor, but instead
wait for the specified processor to which it was bound. The selecting processor
will then choose a lower priority process to execute on the processor.
NOTE: This option will not guarantee compliance with POSIX real-time
scheduling algorithms.
If the process specified by pid is a multithreaded process, all LWPs (lightweight
processes) in the target process with the same processor set binding as the target
process will have their processor assignment changed to what is specified. The
processor set binding takes precedence over processor or locality domain bind-
ing.
MPC_SETLWP This call is advisory . This request asynchronously assigns LWP (lightweight
process) lwpid to processor spu. The new processor assignment is returned.
This option can be used to change the processor assignment of LWPs in any pro-
cess.
The lwpid
MPC_SELFLWPID
may be used to refer to the calling LWP.
The spu
MPC_SPUNOCHANGE
may be passed to read the current assignment.
The spu
MPC_SPUFLOAT may be used to break any specific-processor assign-
ment. This allows the LWP to float to any processor.
NOTE: This call is advisory . If the scheduling policy for a LWP conflicts with
this processor assignment, the scheduling policy takes precedence. For example,
when a processor is ready to choose another LWP to execute, and the highest
priority
SCHED_FIFO LWP is bound to a different processor, then the LWP will
execute on the selecting processor rather than waiting for the specified processor
to which it was bound.
MPC_SETLWP_FORCE
This call is identical to MPC_SETLWP except that the processor binding will take
precedence over the scheduling policy. This call is synchronous. For example,
when a processor is ready to choose another LWP to execute, and the highest
priority SCHED_FIFO LWP is bound to a different processor, that LWP will not
be selected to execute on the selecting processor, but instead will wait for the
specified processor to which it was bound. The selecting processor will then
choose a lower priority LWP to execute on the processor.
NOTE: This option will not guarantee compliance with POSIX real-time
scheduling algorithms.
For locality domain binding use:
int mpctl(mpc_request_t request, ldom_t ldom, pid_t pid);
int mpctl(mpc_request_t request, ldom_t ldom, lwpid_t lwpid);
The request argument determines the precise action to be taken by mpctl() and is one of the following:
MPC_SETLDOM This request synchronously assigns process pid to locality domain ldom. The
process may now run on any processor within the locality domain in its processor
set. The new locality domain assignment is returned.
The pid
MPC_SELFPID may be used to refer to the calling process.
The ldom
MPC_LDOMNOCHANGE may be passed to read the current assignment.
The ldom MPC_LDOMFLOAT may be used to break any specific-locality domain
assignment. This allows the process to float to any locality domain.
When a processor in one locality domain is ready to choose another process to
execute, and the highest priority
SCHED_FIFO process is bound to a different
locality domain, that process will not be selected to execute on the selecting pro-
cessor, but instead wait for a processor in the specified locality domain to which
it was bound. The selecting processor will then choose a lower priority process
to execute on the processor.
NOTE: This option will not guarantee compliance with POSIX real-time
scheduling algorithms.
HP-UX 11i Version 3: September 2010 − 7 − Hewlett-Packard Company 7