HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)

p
pset_create(2) pset_create(2)
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 processor
set boundary. There is no load balancing across the processor set boundary although users can explicitly
migrate threads and processes from one processor set to another by using the
pset_bind() function.
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 sup-
port 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 indi-
cate 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.
[EPERM] The user does not have necessary permissions to create a new processor set.
[ENOMEM] A new processor set cannot be created at this time due to lack of necessary system
resources.
[ENOSYS] The processor set functionality is not supported by the underlying HP-UX version.
SEE ALSO
psrset(1M), pset_assign(2), pset_bind(2), pset_ctl(2), pset_destroy(2), pset_getattr(2), pset_setattr(2),
rtsched(2), sysconf(2), privgrp(4), privileges(5).
HP-UX 11i Version 2: December 2007 Update 2 Hewlett-Packard Company 265