HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
processor will then choose a lower priority LWP to execute on the processor.
NOTE: This option will not guarantee compliance with POSIX real-time schedul-
ing algorithms.
Obtaining Processor and Locality Domain Binding Type
These options return the current binding type for the specified process or LWP.
int mpctl(mpc_request_t request, spu_t spu, pid_t pid);
int mpctl(mpc_request_t request, spu_t spu, lwpid_t lwpid);
The request argument determines the precise action to be taken by
mpctl and is one of the following:
MPC_GETPROCESS_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibility.
This request returns
MPC_ADVISORY or MPC_MANDATORY
to indicate the
current binding type of the process specified by pid. The spu argument is ignored.
If the target process has a binding type of something other than
MPC_MANDATORY the value MPC_ADVISORY will be returned.
MPC_GETPROCESS_BINDVALUE
This request returns the current binding type of the process specified by pid. The
spu argument is ignored.
Current valid return values are
MPC_NO_BINDING
(no binding),
MPC_SPU_BINDING (advisory processor binding),
MPC_SPU_FORCED_BINDING
(processor binding), and MPC_LDOM_BINDING
(locality domain binding). Other binding types may be added in future releases
and returned via this option. Applications using this option should be written to
handle other return values in order to continue working on future releases.
MPC_GETLWP_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibility.
This request returns
MPC_ADVISORY or MPC_MANDATORY
to indicate the
current binding type of the LWP specified by lwpid. The spu argument is ignored.
If the target LWP has a binding type of something other than
MPC_MANDATORY
the value MPC_ADVISORY will be returned.
MPC_GETLWP_BINDVALUE
This request returns the current binding type of the LWP specified by lwpid. The
spu argument is ignored.
Current valid return values are
MPC_NO_BINDING
(no binding),
MPC_SPU_BINDING (advisory processor binding),
MPC_SPU_FORCED_BINDING
(processor binding), and MPC_LDOM_BINDING
(locality domain binding). Other binding types may be added in future releases
and returned via this option. Applications using this option should be written to
handle other return values in order to continue working on future releases.
Launch Policies
Each process shall have a launch policy. Each lightweight process shall have a launch policy. The launch
policy for a lightweight process need not match the launch policy for the process. The launch policy deter-
mines the locality domain where the newly created process or LWP will be launched in a ccNUMA system.
The locality domains covered by a process’s or LWP’s processor set are the available locality domains.
When a process creates another process (via fork() or vfork()), the child process will inherit the
parent process’s launch policy. The initial LWP in the child process will inherit the launch policy of the
creating LWP (and not that of its process). Other LWPs in a multi-threaded process inherit their launch
policy from the creating LWP.
For all launch policies, the target process or LWP is bound to the locality domain on which it was launched.
The target is allowed to execute on any processor within that locality domain.
When setting a launch policy, if the target already has processor or locality domain binding, the existing
binding will not be overwritten. Instead the locality domain in which the target is bound (whether locality
domain binding or processor binding) will be used as the starting locality domain for implementing the
launch policy.
204 Hewlett-Packard Company − 7 − HP-UX 11i Version 2: December 2007 Update