| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 2: System Calls Oracle Solaris 11 Information Library |
- manage sets of processors
#include <sys/pset.h>intpset_create(psetid_t *newpset);
intpset_destroy(psetid_tpset);
intpset_assign(psetid_tpset,processorid_tcpu,psetid_t *opset);
These functions control the creation and management of sets of processors. Processor sets allow a subset of the system's processors to be setaside for exclusive use by specified LWPs and processes. The binding of LWPsand processes to processor sets is controlled bypset_bind(2).
Thepset_create() function creates an empty processor set that contains no processors. On successful return,newpset will contain the ID of the newprocessor set.
Thepset_destroy() function destroys the processor setpset, releasing its constituent processorsand processes. Ifpset isPS_MYID, the processor set to which thecaller is bound is destroyed.
Thepset_assign() function assigns the processorcpu to the processor setpset.A processor that has been assigned to a processor set will runonly LWPs and processes that have been explicitly bound to that processor set,unless another LWP requires a resource that is only available on thatprocessor.
On successful return, ifopset is non-null,opset will contain the processorset ID of the former processor set of the processor.
Ifpset isPS_NONE,pset_assign() releases processorcpu from its current processorset.
Ifpset isPS_QUERY,pset_assign() makes no change to processor sets, butreturns the current processor set ID of processorcpu inopset.
Ifpset isPS_MYID, processorcpu is assigned to the processor setto which the caller belongs. If the caller does not belong toa processor set, processorcpu is released from its current processor set.
These functions are restricted to privileged processes, except forpset_assign() whenpsetisPS_QUERY.
Upon successful completion, these functions return0. Otherwise,-1 is returned anderrno is set to indicate the error.
These functions will fail if:
The processor could not be moved to the specified processor set.
The location pointed to bynewpset was not writable by the user, or the location pointed to byopset was notNULL and not writable by the user.
The specified processor does not exist, the specified processor is not on-line, or an invalid processor set was specified.
There was insufficient space forpset_create to create a new processor set.
The pools facility is active. Seepooladm(1M) andpool_set_status(3POOL) for information about enabling and disabling the pools facility.
The {PRIV_SYS_RES_CONFIG} privilege is not asserted in the effective set of the calling process.
Seeattributes(5) for descriptions of the following attributes:
|
pooladm(1M),psradm(1M),psrinfo(1M),psrset(1M),p_online(2),processor_bind(2),pset_bind(2),pset_info(2),pool_set_status(3POOL),pset_getloadavg(3C),attributes(5),privileges(5)
The processor set type ofPS_SYSTEM is no longer supported.
Processors with LWPs bound to them usingprocessor_bind(2) cannot be assigned toa new processor set. If this is attempted,pset_assign() will failand seterrno toEBUSY.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |