HP-UX Processor Sets

HP-UX Processor Sets 17
int
pset_create(
psetid_t *newpset /* OUT: Id of new pset */
);
Any user may create a new empty processor set object. This relaxation in processor set
creation, when coupled with the access permissions for other processor set operations,
provides for a very flexible processor set usage model. Consider this scenario: The system
administrator configures a processor set with some processor resources and then makes
some other department administrator owner of the processor set. Without the need for
superuser or PRIV_PSET privileges, this department administrator can then further subdivide
these processors into multiple processor sets and allocate them to users in his or her
department without relying on the system administrator.
HP-UX enforces a per-user and system-wide implementation-dependent limit on the number
of processor sets that can be active at any time. The first release of HP-UX Processor Sets
has an internal fixed limit based on the number of processors in the system. There is no
tunable to control the maximum number of processor sets in the first release.
Users can create a processor set from the command line as shown below. (Note: The user
does not have explicit control over which psetid is assigned to the new processor set.)
# psrset –c
successfully created pset 1
Assigning a Processor to Another Processor Set
The pset_assign() system call allows users to reassign a processor from its current
processor set to another processor set.
int
pset_assign(
psetid_t new_pset, /* IN : new pset for the processor */
spu_t spu, /* IN : processor to be reassigned */
psetid_t *old_pset /* OUT: current pset for processor */
);
If spu is the last processor in its current processor set, then the PSET_ATTR_LASTSPU
attribute for the current processor set determines its behavior. A processor set can have zero,
one, or more processors in the system (with the restriction that processor 0 can be assigned
only to the Default Pset). Users should assess the need of applications in determining the size
of a processor set. If a processor set is under-allocated, the applications in that processor set
may starve out due to contention on processors. If a processor set is over-allocated, there will
be idle cycles in the processor set, while applications in other processor sets in the system
may have contention on processors.
Users can reassign a list of processors to another processor set using psrset as follows: