Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

destroy_pset(3) [osf1 man page]

destroy_pset(3) 					     Library Functions Manual						   destroy_pset(3)

NAME
destroy_pset - Destroys a processor set LIBRARY
Pset Library (libpset.a) Mach Library (libmach.a) SYNOPSIS
#include <sys/types.h> #include <sys/processor.h> int destroy_pset( int pset_id, [1 | 0]); PARAMETERS
Specifies the identification number for the processor set that you want to destroy. The pset_id processor set identification number is returned by a successful create_pset() call. A second argument may be required if there are threads or processors assigned to the proces- sor set. A value of 1 will force the destruction of the pset. A value of 0 will not force destruction automatically but will first prompt the user. DESCRIPTION
The destroy_pset function destroys a processor set. A processor that belongs to a destroyed processor set is returned to the default pro- cessor set. You must have root privileges. EXAMPLES
The following is example code for pset_destroy.c using the destroy_pset call: retval = destroy_pset(pset_id, 0); if (retval == PROCESSOR_SET_ACTIVE) { printf ("processor set %d has active ", pset_id); printf ("processors/tasks/threads assigned to it.0); printf ("destroy anyway? (y/n): "); while ((char)c != 'y' && (char)c != 'n') c = getchar(); if ((char)c == 'y') { retval = destroy_pset(pset_id, 1); if (retval != KERN_SUCCESS) { print_pset_error(retval); RETURN VALUES
If the destroy_pset function succeeds, it returns a zero (0). If it fails, it returns a negative number. Use this number and the print_pset_error(3) function to print a message that describes the error. Processor set destruction is logged in the /var/adm/wtmp file. FILES
/var/adm/wtmp RELATED INFORMATION
create_pset(3), assign_cpu_to_pset(3), assign_pid_to_pset(3), print_pset_error(3), processor_sets(4), pset_create(1) delim off destroy_pset(3)

Check Out this Related Man Page

processor_sets(4)					     Kernel Interfaces Manual						 processor_sets(4)

NAME
processor_sets - Collections of processors DESCRIPTION
A processor set is a collection of processors. When a processor set is first created, it does not contain any processors. You can add processors to a processor set, remove processors from a processor set, and also destroy the processor set. In addition, you can assign specific processes to a processor set. When the system is booted, all its processors are assigned to the default processor set. Each processor in a system can be a member of only one processor set at one time. In addition, when you create a process, it is assigned to a processor set. Unless you indicate a specific processor set, a process is assigned to the default processor set. A process can execute only on an processor that is included in the processor set to which the process is assigned. If you assign a process to an empty processor set, it will not execute until a processor is assigned to the processor set or until the process is assigned to another processor set. Use the pset_create command or the create_pset function to create a processor set. When you first create a processor set, it does not con- tain any processors. Use the pset_assign_cpu command or the assign_cpu_to_pset function to assign processors to a specific processor set. When you assign a processor to a specific processor set, the processor is removed from its current processor set. Use the pset_destroy command or the destroy_pset function to destroy a processor set. Processors that belong to a destroyed processor set are assigned to the default processor set. Use the pset_assign_pid command or the assign_pid_to_pset function to assign a process to a specific processor set. In addition, you can request that a process has exclusive access to a processor set. If a process has exclusive access to a processor set, no other process is able to use that processor set. If a process has exclusive access to a processor set, that access will be cleared automatically when the process exits. Note that if a process is already assigned to a processor set, a request for exclusive access to that processor set will be denied. Use the pset_info command to display the status of each processor set on the system as well as the status of each processor. You must be root to create and destroy processor sets and to assign a processor to a processor set. Processor set creation and destruction and processor assignments to processor sets are logged in the /var/adm/wtmp file. FILES
/var/adm/wtmp RELATED INFORMATION
Commands: pset_create(1), pset_destroy(1), pset_info(1), pset_assign_pid(1), pset_assign_cpu(1), runon(1), psrinfo(1), psradm(8) Functions: assign_pid_to_pset(3), assign_cpu_to_pset(3), create_pset(3), destroy_pset(3) delim off processor_sets(4)
Man Page