pset_create.2 (2010 09)
p
pset_create(2) pset_create(2)
PSET_ATTR_LCPU
On a system with the hyper-threading feature enabled, the LCPU attribute indicates whether
or not the processor cores in a processor set are enabled with logical processors (LCPU). By
default, the default processor set’s
PSET_ATTR_LCPU attribute value is inherited at the time
of creation. The non-default processor set’s
PSET_ATTR_LCPU can be modified by
pset_setattr(),
but the default processor set’s PSET_ATTR_LCPU
can only be modified
by the dynamic kernel tunable command,
kctune
.
PSET_ATTR_NONEMPTY
Indicates the behavior on a request to destroy a non-empty processor set. The non-empty pro-
cessor set refers to one that has at least one processor assigned to it. By default, all processors
and processes/threads assigned to the processor set are reassigned to the system default pro-
cessor set, and the processor set is destroyed.
PSET_ATTR_OWNID
UID of the processor set owner. The processor set creator is the default owner.
PSET_ATTR_PERM
Access permissions for the processor set. By default, the processor set owner has all permis-
sions, whereas group and others have only READ and EXEC permissions.
Processor sets define a scheduling allocation domain for threads and processes. All threads may execute
only on processors within the assigned processor set. The kernel load balancers work within the proces-
sor set boundary. There is no load balancing across the processor set boundary although users can expli-
citly migrate threads and processes from one processor set to another by using the
pset_bind() func-
tion. The POSIX RTSCHED scheduler (see rtsched (2)) no longer works at the system level; its scheduling
domain is restricted to the processor set boundary.
System daemon threads created in the kernel are not restricted to a user defined processor set
configuration. They may run on any processor in the system as necessary.
Use
sysconf() with _SC_PSET_SUPPORT
to see if the processor set functionality is supported by the
underlying HP-UX operating system version.
Security Restrictions
Some or all of the actions associated with this system call require the
PSET privilege. Processes owned
by the superuser have this privilege. Processes owned by other users may have this privilege, depending
on system configuration. See privileges (5) for more information about privileged access on systems that
support fine-grained privileges.
EXAMPLES
Create a new processor set:
#include <sys/pset.h>
psetid_t new_psetid;
int ret;
if ((ret = pset_create(&new_psetid)) < 0) {
perror("pset_create()");
exit(1);
}
RETURN VALUE
pset_create returns zero on successful completion. Otherwise, -1 is returned and errno is set to
indicate the error.
ERRORS
pset_create fails if one or more of the following is true:
[EAGAIN] The user has reached the per user limit on how many processor sets a user without the
PSET privilege may own.
[EFAULT] The memory location pointed to by newpset is not writable by the user.
[EINVAL] The memory location pointed to by newpset is
NULL.
[EINVAL] Processor sets cannot be created on a uniprocessor system.
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010