Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit
» 

DSPP Home

» HP STK home
Tru64 UNIX STK
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» FAQ
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
» DSPP
Content starts here

critical impact:

libpset - not supported; use pset functions in libc (CrUn367)

LIB Impacts

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

Programming Libraries-lpset C/C++ Functionsdestroy_pset
C/C++ Functionsassign_cpu_to_pset Programming Librarieslibpset.so
C/C++ Functionsassign_pid_to_pset C/C++ Functionsprint_pset_error
C/C++ Functionscreate_pset C/C++ Header Filessys/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
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.