HP-UX Reference (11i v2 04/09) - 2 System Calls (vol 5)

m
mpctl(2) mpctl(2)
When a processor is ready to choose another LWP to execute, and the highest
priority SCHED_FIFO LWP is bound to processor in a different locality domain,
that LWP will not be selected to execute on the selecting processor, but instead
wait for a processor on the locality domain 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 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 compatibil-
ity.
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 compatibil-
ity.
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 pol-
icy determines 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.
Section 2172 Hewlett-Packard Company 6 HP-UX 11i Version 2: September 2004