Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

pset_getattr(2)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

pset_getattr(), pset_setattr() — manage processor set attributes

SYNOPSIS

#include <sys/pset.h> int pset_getattr( psetid_t pset, pset_attrtype_t type, pset_attrval_t* val); int pset_setattr( psetid_t pset, pset_attrtype_t type, pset_attrval_t val);

DESCRIPTION

The pset_getattr() function returns the current value of the attribute type for the processor set pset in the memory location pointed to by val.

The pset_setattr() function assigns the value val to the attribute type for processor set pset.

A user can not change the attribute values for the system default processor set PS_DEFAULT using the pset_setattr() function.

A user with the PSET privilege or a user with READ permission for the processor set may query any attribute values.

The following processor set attributes may be queried or changed through these functions:

PSET_ATTR_GRPID

The GID (group id) of the processor set owner. The creator's GID is assigned at processor set creation time. A user with the PSET privilege or the pset owner may change the value of this attribute.

PSET_ATTR_OWNID

The UID of the processor set owner. The creator is assigned as the owner at processor set creation time. A user with the PSET privilege or the pset owner may change the value of this attribute.

PSET_ATTR_PERM

The access permission bitmask for the processor set. These are defined similar to file access permissions. There are three types of access:

EXEC

The user can bind its process or thread to the processor set using the pset_bind() function (see pset_bind(2)).

READ

The user can query the processor set attributes.

WRITE

The user can modify the processor set attributes and configuration, and destroy the processor set.

The following bit values are used for the access bitmask:

PSET_GROUP_EXEC

All users in processor set owner's group have EXEC access.

PSET_GROUP_READ

All users in processor set owner's group have READ access.

PSET_GROUP_WRITE

All users in processor set owner's group have WRITE access.

PSET_OTHER_EXEC

All others have EXEC access.

PSET_OTHER_READ

All others have READ access.

PSET_OTHER_WRITE

All others have WRITE access.

PSET_OWNER_EXEC

The processor set owner has EXEC access.

PSET_OWNER_READ

The processor set owner has READ access.

PSET_OWNER_WRITE

The processor set owner has WRITE access.

A newly created processor set by default has READ and EXEC access for everyone, but WRITE access only for the processor set owner.

A user with the PSET privilege or the pset owner may change the value of the PSET_ATTR_PERM attribute.

PSET_ATTR_IOINTR

A value of PSET_ATTRVAL_ALLOW indicates that processors in this processor set are configured to receive external interrupts. It may be assigned a value of PSET_ATTRVAL_DISALLOW to disable all processors in the processor set from receiving and processing external I/O interrupts. Not all platforms may support this feature. By default, I/O interrupts are enabled on all processors. The feature may be useful for some realtime applications where unpredictable interrupt handling overhead may adversely impact the application's response time requirements.

Only a user with the PSET privilege may change this attribute.

PSET_ATTR_NONEMPTY

Indicates the behavior when a request to destroy a non-empty processor set is made through the pset_destroy() function. Possible values are:

PSET_ATTRVAL_DFLTPSET

Reassign all processors in the processor set pset to the system default processor set. Migrate all threads and processes bound to this processor set to the system default processor set. This is the default value for this attribute.

PSET_ATTRVAL_FAIL

Make the request fail with an EBUSY error if there are threads or processes bound to the processor set or if there are processors assigned to the processor set.

PSET_ATTRVAL_FAILBUSY

Make the request fail with an EBUSY error if there are active threads or processes bound to the processor set. Otherwise, perform the operation by reassigning the processors in the pset to the system default processor set.

A user with the PSET privilege or a user with WRITE permissions may change the value of this attribute.

PSET_ATTR_EMPTY

Indicates the behavior when a request to bind a process or a thread to an empty processor set is made through the pset_bind() function. Possible values are:

PSET_ATTRVAL_ALLOW

Go through with the request. However, the affected threads will not be scheduled to execute until a processor is assigned to the empty processor set.

PSET_ATTRVAL_FAIL

Reject the request with an EINVAL error. This is the default value for this attribute.

A user with the PSET privilege or a user with WRITE permissions may change the value of this attribute.

PSET_ATTR_LASTSPU

Indicates the behavior when a request to remove the last processor from a processor set is made through the pset_assign() function, or through the processor deallocation functionality. Possible values are:

PSET_ATTRVAL_FAIL

Make the request fail if there are active threads and processes assigned to the processor set.

PSET_ATTRVAL_DFLTPSET

Assign the processor to the specified processor set, and migrate all threads and processes to the system default processor set PS_DEFAULT. This is the default value for this attribute.

A user with the PSET privilege or a user with WRITE permissions may change the value of the PSET_ATTR_LASTSPU attribute.

PSET_ATTR_LCPU

The LCPU attribute of a processor set indicates whether the physical processor cores in a pset are enabled with logical processors (LCPUs). On systems with the Hyper-Threading (HT) feature enabled, each processor core may have more than one hyper-thread per physical processor core. Each hyper-thread is represented to the operating system and applications as a logical processor (LCPU).

The PSET_ATTR_LCPU can be set for the default processor set using the kctune() command.

This attribute is supported only on system with the Hyper-Threading feature. If this feature is disabled at the firmware level or is not supported, this attribute cannot change.

PSET_ATTRVAL_ON

Enable the LCPUs in a processor set. This is the default value for systems with the Hyper-Threading feature enabled.

PSET_ATTR_VAL_OFF

Disable the LCPUs in the processor set. This is the default value for the systems without the Hyper-Threading feature or systems with the Hyper-Threading disabled in the firmware.

The default value for any attribute can be assigned using the PSET_ATTRVAL_DEFAULT value in the pset_setattr() function.

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.

RETURN VALUE

The functions return zero on successful completion. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

pset_getattr() or pset_setattr() fails if one or more of the following is true:

EFAULT

The memory location pointed to by val is not writable by the user for pset_getattr().

EINVAL

The specified processor set pset, the attribute type, or the attribute val is invalid.

EINVAL

The memory location pointed to by val is NULL for pset_getattr().

ENOSYS

The processor set functionality is not supported by the underlying HP-UX version.

ENOTSUP

The requested attribute value is not supported for the pset_setattr() function.

EPERM

The user does not have the necessary permissions to query or change the processor set attributes.

AUTHOR

get_getattr and set_getattr were developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.