critical impact:
libpset - not supported; use pset functions in libc (CrUn367)
Problem description
The libpset processor set library exists on Tru64 UNIX but not on HP-UX. However, similar functions exist in the libc library on HP-UX.
Processor sets are collections of processors used to provide a finer granularity for process scheduling on multiprocessor systems. The functions that Tru64 UNIX and HP-UX provide for managing processor
sets are different, but they provide similar functionality. The Tru64 UNIX functions are in libpset; the HP-UX functions are in libc. Identifiers
 -lpset |
 destroy_pset |
 assign_cpu_to_pset |
 libpset.so |
 assign_pid_to_pset |
 print_pset_error |
 create_pset |
 sys/processor.h |
Old behavior
/*
* Create a processor set, assign processor 1 to it, bind a process
* to it, and later destroy it.
*/
#include <sys/types.h>
#include <sys/processor.h>
long pset;
long cpu = 1;
pset = create_pset();
assign_cpu_to_pset(1 << cpu, pset, 0);
assign_pid_to_pset(&pid, 1, pset, 0);
...
destroy_pset(pset);
See also
Solution description
Use the processor set functions in the libc library on HP-UX.
HP-UX provides almost all the functionality of the Tru64 UNIX processor set implementation, as well as some additional features like non-root processor sets and the ability to assign all processes owned by a user to a processor set.
HP-UX provides more processor set functions than Tru64 UNIX. The pset_getattr and pset_setattr functions manage processor set attributes. The pset_ctl function queries the system processor set configuration and assignment information. The pthread_pset_bind_np function changes the processor set binding of a POSIX thread.
The HP-UX Processor Sets white paper provides details and describes how processor sets are integrated with HP software products like Process Resource Manager (PRM). New behavior
/*
* Create a processor set, assign processor 1 to it, bind a process
* to it, and later destroy it.
*/
#include <sys/pset.h>
psetid_t pset;
spu_t cpu = 1;
pset_create(&pset);
pset_assign(pset, cpu, NULL);
pset_bind(pset, P_PID, pid, NULL);
...
pset_destroy(pset);
See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| LIB |
C, C++, Make, Script |
any HP-UX 11i version |
critical |
unavailable |
|