1pset_create(2)                   System Calls                   pset_create(2)
2
3
4

NAME

6       pset_create, pset_destroy, pset_assign - manage sets of processors
7

SYNOPSIS

9       #include <sys/pset.h>
10
11       int pset_create(psetid_t *newpset);
12
13
14       int pset_destroy(psetid_t pset);
15
16
17       int pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset);
18
19

DESCRIPTION

21       These  functions control the creation and management of sets of proces‐
22       sors.  Processor sets allow a subset of the system's processors  to  be
23       set  aside for exclusive use by specified LWPs and processes. The bind‐
24       ing  of  LWPs  and  processes  to  processor  sets  is  controlled   by
25       pset_bind(2).
26
27
28       The pset_create() function creates an empty processor set that contains
29       no processors.  On successful return, newpset will contain  the  ID  of
30       the new processor set.
31
32
33       The  pset_destroy() function destroys the processor set pset, releasing
34       its constituent processors and processes. If pset is PS_MYID, the  pro‐
35       cessor set to which the caller is bound is destroyed.
36
37
38       The  pset_assign()  function assigns the processor cpu to the processor
39       set pset. A processor that has been assigned to a  processor  set  will
40       run  only  LWPs  and  processes that have been explicitly bound to that
41       processor set, unless another LWP requires  a  resource  that  is  only
42       available on that processor.
43
44
45       On successful return, if opset is non-null, opset will contain the pro‐
46       cessor set ID of the former processor set of the processor.
47
48
49       If pset is PS_NONE, pset_assign() releases processor cpu from its  cur‐
50       rent processor set.
51
52
53       If  pset  is PS_QUERY, pset_assign() makes no change to processor sets,
54       but returns the current processor set ID of processor cpu in opset.
55
56
57       If pset is PS_MYID, processor cpu is assigned to the processor  set  to
58       which  the caller belongs. If the caller does not belong to a processor
59       set, processor cpu is released from its current processor set.
60
61
62       These functions are restricted  to  privileged  processes,  except  for
63       pset_assign() when pset is PS_QUERY.
64

RETURN VALUES

66       Upon  successful completion, these functions return 0. Otherwise, −1 is
67       returned and errno is set to indicate the error.
68

ERRORS

70       These functions will fail if:
71
72       EBUSY      The processor could not be moved to the specified  processor
73                  set.
74
75
76       EFAULT     The  location  pointed to by newpset was not writable by the
77                  user, or the location pointed to by opset was not  NULL  and
78                  not writable by the user.
79
80
81       EINVAL     The  specified  processor does not exist, the specified pro‐
82                  cessor  is not on-line, or  an  invalid  processor  set  was
83                  specified.
84
85
86       ENOMEM     There was insufficient space for pset_create to create a new
87                  processor set.
88
89
90       ENOTSUP    The  pools  facility  is   active.   See   pooladm(1M)   and
91                  pool_set_status(3POOL)  for  information  about enabling and
92                  disabling the pools facility.
93
94
95       EPERM      The {PRIV_SYS_RES_CONFIG} privilege is not asserted  in  the
96                  effective set of the calling process.
97
98

ATTRIBUTES

100       See attributes(5) for descriptions of the following attributes:
101
102
103
104
105       ┌─────────────────────────────┬─────────────────────────────┐
106       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
107       ├─────────────────────────────┼─────────────────────────────┤
108       │Interface Stability          │Committed                    │
109       ├─────────────────────────────┼─────────────────────────────┤
110       │MT-Level                     │Async-Signal-Safe            │
111       └─────────────────────────────┴─────────────────────────────┘
112

SEE ALSO

114       pooladm(1M),  psradm(1M), psrinfo(1M), psrset(1M), p_online(2), proces‐
115       sor_bind(2),   pset_bind(2),   pset_info(2),    pool_set_status(3POOL),
116       pset_getloadavg(3C), attributes(5), privileges(5)
117

NOTES

119       The processor set type of PS_SYSTEM is no longer supported.
120
121
122       Processors  with  LWPs  bound to them using processor_bind(2) cannot be
123       assigned to a new processor set. If  this is  attempted,  pset_assign()
124       will fail and set errno to EBUSY.
125
126
127
128SunOS 5.11                        22 Feb 2008                   pset_create(2)
Impressum