HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
m
mpctl(2) mpctl(2)
domain.
Setting the processor or locality domain binding will fail if the target processor or locality domain is not in
the processor set of the specified process or LWP.
Warning: Due to the capability of online addition and deletion of processors on some platforms, processors
may go away. If this occurs, any processes or LWPs bound to a departing processor will be rebound to a
different processor with the same binding type. If the last processor in a locality domain is removed, any
processes or LWPs bound to a departing locality domain will be rebound to a different locality domain.
For processor bindinguse:
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_SETPROCESS
This call is advisory. This request asynchronously assigns process pid to processor
spu. The new processor assignment is returned.
The pid MPC_SELFPID may be used to refer to the calling process.
The spu MPC_SPUNOCHANGE may be passed to read the current assignment.
The spu
MPC_SPUFLOAT may be used to break any specific-processor assignment.
This allows the process to float to any processor.
Note: This call is advisory. If the scheduling policy for a process conflicts with this
processor assignment, the scheduling policy takes precedence. For example, when
a processor is ready to choose another process to execute, and the highest priority
SCHED_FIFO process is bound to a different processor, that process will execute
on the selecting processor rather than waiting for the specified processor to which
it was bound.
If the process specified by pid is a multithreaded process, all LWPs (lightweight
processes) in the target process will have their processor assignment changed to
what is specified.
MPC_SETPROCESS_FORCE
This call is identical to MPC_SETPROCESS
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 process to execute, and the highest
priority
SCHED_FIFO process is bound to a different processor, that 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 will have their processor assignment changed to
what is specified.
MPC_SETLWP This call is advisory. This request asynchronously assigns LWP (lightweight pro-
cess) lwpid to processor spu. The new processor assignment is returned. This
option is only available to change the assignment for LWPs in the current process.
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 assignment.
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 choose another LWP to execute, and the highest priority
SCHED_FIFO LWP is bound to a different processor, that LWP will execute on
the selecting processor rather than waiting for the specified processor to which it
was bound.
HP-UX Release 11i: December 2000 4 Section 2165
___
___