Print this page
9842 man page typos and spelling
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/priocntl.1
+++ new/usr/src/man/man1/priocntl.1
1 1 '\" te
2 2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" Copyright 1989 AT&T
4 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 7 .TH PRIOCNTL 1 "Apr 1, 2008"
8 8 .SH NAME
9 9 priocntl \- display or set scheduling parameters of specified process(es)
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 \fBpriocntl\fR \fB-l\fR
14 14 .fi
15 15
16 16 .LP
17 17 .nf
18 18 \fBpriocntl\fR \fB-d\fR [\fB-i\fR \fIidtype\fR] [\fIidlist\fR]
19 19 .fi
20 20
21 21 .LP
22 22 .nf
23 23 \fBpriocntl\fR \fB-s\fR [\fB-c\fR \fIclass\fR] [\fIclass-specific\fR \fIoptions\fR]
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
24 24 [\fB-i\fR \fIidtype\fR] [\fIidlist\fR]
25 25 .fi
26 26
27 27 .LP
28 28 .nf
29 29 \fBpriocntl\fR \fB-e\fR [\fB-c\fR \fIclass\fR] [\fIclass-specific\fR \fIoptions\fR] \fIcommand\fR
30 30 [\fIargument(s)\fR]
31 31 .fi
32 32
33 33 .SH DESCRIPTION
34 -.sp
35 34 .LP
36 35 The \fBpriocntl\fR command displays or sets scheduling parameters of the
37 36 specified process(es). It can also be used to display the current configuration
38 37 information for the system's process scheduler or execute a command with
39 38 specified scheduling parameters.
40 39 .sp
41 40 .LP
42 41 Processes fall into distinct classes with a separate scheduling policy applied
43 42 to each class. The process classes currently supported are the real-time class,
44 43 time-sharing class, interactive class, fair-share class, and the fixed priority
45 44 class. The characteristics of these classes and the class-specific options they
46 45 accept are described below in the USAGE section under the headings \fBReal-Time
47 46 Class\fR, \fBTime-Sharing Class\fR, \fBInter-Active Class\fR, \fBFair-Share
48 47 Class\fR, and \fBFixed-Priority Class\fR. With appropriate permissions, the
49 48 \fBpriocntl\fR command can change the class and other scheduling parameters
50 49 associated with a running process.
51 50 .sp
52 51 .LP
53 52 In the default configuration, a runnable real-time process runs before any
54 53 other process. Therefore, inappropriate use of real-time processes can have a
55 54 dramatic negative impact on system performance.
56 55 .sp
57 56 .LP
58 57 If an \fIidlist\fR is present, it must appear last on the command line and the
59 58 elements of the list must be separated by white space. If no \fIidlist\fR is
60 59 present, an \fIidtype\fR argument of \fBpid\fR, \fBppid\fR, \fBpgid\fR,
61 60 \fBsid\fR, \fBtaskid\fR, \fBclass\fR, \fBuid\fR, \fBgid\fR, \fBprojid\fR, or
62 61 \fBzoneid\fR specifies the process \fBID\fR, parent process \fBID\fR, process
63 62 group \fBID\fR, session \fBID\fR, task \fBID\fR, class, user \fBID\fR, group
64 63 \fBID\fR, project \fBID\fR, or zone \fBID\fR, respectively, of the
65 64 \fBpriocntl\fR command itself.
66 65 .sp
67 66 .LP
68 67 The command
69 68 .sp
70 69 .in +2
71 70 .nf
72 71 \fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
73 72 .fi
74 73 .in -2
75 74 .sp
76 75
77 76 .sp
78 77 .LP
79 78 displays the class and class-specific scheduling parameters of the process(es)
80 79 specified by \fIidtype\fR and \fIidlist\fR.
81 80 .sp
82 81 .LP
83 82 The command
84 83 .sp
85 84 .in +2
86 85 .nf
87 86 \fBpriocntl -s [-c \fIclass\fR] [\fIclass-specific options\fR] \e
88 87 [-i \fIidtype\fR] [\fIidlist\fR]\fR
89 88 .fi
90 89 .in -2
91 90 .sp
92 91
93 92 .sp
94 93 .LP
95 94 sets the class and class-specific parameters of the specified processes to the
96 95 values given on the command line. The \fB-c\fR \fIclass\fR option specifies the
97 96 class to be set. (The valid \fIclass\fR arguments are \fBRT\fR for real-time,
98 97 \fBTS\fR for time-sharing, \fBIA\fR for inter-active, \fBFSS\fR for fair-share,
99 98 or \fBFX\fR for fixed-priority.)
100 99 .sp
101 100 .LP
102 101 The class-specific parameters to be set are specified by the class-specific
103 102 options as explained under the appropriate heading below. If the \fB-c\fR
104 103 \fIclass\fR option is omitted, \fIidtype\fR and \fIidlist\fR must specify a set
105 104 of processes which are all in the same class, otherwise an error results. If no
106 105 class-specific options are specified, the process's class-specific parameters
107 106 are set to the default values for the class specified by \fB-c\fR \fIclass\fR
108 107 (or to the default parameter values for the process's current class if the
109 108 \fB-c\fR \fIclass\fR option is also omitted).
110 109 .sp
111 110 .LP
112 111 In order to change the scheduling parameters of a process using \fBpriocntl\fR
113 112 the real or effective user \fBID\fR (respectively, groupID) of the user
114 113 invoking \fBpriocntl\fR must match the real or effective user \fBID\fR
115 114 (respectively, groupID) of the receiving process or the effective user \fBID\fR
116 115 of the user must be super-user. These are the minimum permission requirements
117 116 enforced for all classes. An individual class can impose additional permissions
118 117 requirements when setting processes to that class or when setting
119 118 class-specific scheduling parameters.
120 119 .sp
121 120 .LP
122 121 When \fIidtype\fR and \fIidlist\fR specify a set of processes, \fBpriocntl\fR
123 122 acts on the processes in the set in an implementation-specific order. If
124 123 \fBpriocntl\fR encounters an error for one or more of the target processes, it
125 124 can or cannot continue through the set of processes, depending on the nature of
126 125 the error.
127 126 .sp
128 127 .LP
129 128 If the error is related to permissions, \fBpriocntl\fR prints an error message
130 129 and then continues through the process set, resetting the parameters for all
131 130 target processes for which the user has appropriate permissions. If
132 131 \fBpriocntl\fR encounters an error other than permissions, it does not continue
133 132 through the process set but prints an error message and exits immediately.
134 133 .sp
135 134 .LP
136 135 A special \fBsys\fR scheduling class exists for the purpose of scheduling the
137 136 execution of certain special system processes (such as the swapper process). It
138 137 is not possible to change the class of any process to \fBsys\fR. In addition,
139 138 any processes in the \fBsys\fR class that are included in the set of processes
140 139 specified by \fIidtype\fR and \fIidlist\fR are disregarded by \fBpriocntl\fR.
141 140 For example, if \fIidtype\fR were \fBuid\fR, an \fIidlist\fR consisting of a
142 141 zero would specify all processes with a \fBUID\fR of \fB0\fR, except processes
143 142 in the \fBsys\fR class and (if changing the parameters using the \fB-s\fR
144 143 option) the \fBinit\fR process.
145 144 .sp
146 145 .LP
147 146 The \fBinit\fR process (process \fBID\fR \fB1\fR) is a special case. In order
148 147 for the \fBpriocntl\fR command to change the class or other scheduling
149 148 parameters of the \fBinit\fR process, \fIidtype\fR must be \fBpid\fR and
150 149 \fIidlist\fR must be consist of only a \fB1\fR. The \fBinit\fR process can be
151 150 assigned to any class configured on the system, but the time-sharing class is
152 151 almost always the appropriate choice. Other choices can be highly undesirable;
153 152 see the \fISystem Administration Guide: Basic Administration\fR for more
154 153 information.
155 154 .sp
156 155 .LP
157 156 The command
158 157 .sp
159 158 .in +2
160 159 .nf
161 160 \fBpriocntl -e [-c \fIclass\fR\fR\fB]\fR\fB [\fIclass-specific options\fR] \fIcommand\fR \e
162 161 [\fIargument...\fR]\fR
163 162 .fi
↓ open down ↓ |
119 lines elided |
↑ open up ↑ |
164 163 .in -2
165 164 .sp
166 165
167 166 .sp
168 167 .LP
169 168 executes the specified command with the class and scheduling parameters
170 169 specified on the command line (\fIarguments\fR are the arguments to the
171 170 command). If the \fB-c\fR \fIclass\fR option is omitted the command is run in
172 171 the user's current class.
173 172 .SH OPTIONS
174 -.sp
175 173 .LP
176 174 The following options are supported:
177 175 .sp
178 176 .ne 2
179 177 .na
180 178 \fB\fB-c\fR \fIclass\fR\fR
181 179 .ad
182 180 .RS 13n
183 181 Specifies the \fIclass\fR to be set. (The valid \fIclass\fR arguments are
184 182 \fBRT\fR for real-time, \fBTS\fR for time-sharing, \fBIA\fR for inter-active,
185 183 \fBFSS\fR for fair-share, or \fBFX\fR for fixed-priority.) If the specified
186 184 class is not already configured, it is automatically configured.
187 185 .RE
188 186
189 187 .sp
190 188 .ne 2
191 189 .na
192 190 \fB\fB-d\fR\fR
193 191 .ad
194 192 .RS 13n
195 193 Displays the scheduling parameters associated with a set of processes.
196 194 .RE
197 195
198 196 .sp
199 197 .ne 2
200 198 .na
201 199 \fB\fB-e\fR\fR
202 200 .ad
203 201 .RS 13n
204 202 Executes a specified command with the class and scheduling parameters
205 203 associated with a set of processes.
206 204 .RE
207 205
208 206 .sp
209 207 .ne 2
210 208 .na
211 209 \fB\fB-i\fR \fIidtype\fR\fR
212 210 .ad
213 211 .RS 13n
214 212 This option, together with the \fIidlist\fR arguments (if any), specifies one
215 213 or more processes to which the \fBpriocntl\fR command is to apply. The
216 214 interpretation of \fIidlist\fR depends on the value of \fIidtype\fR. If the
217 215 \fB-i\fR \fIidtype\fR option is omitted when using the \fB-d\fR or \fB-s\fR
218 216 options the default \fIidtype\fR of \fBpid\fR is assumed.
219 217 .sp
220 218 The valid \fIidtype\fR arguments and corresponding interpretations of
221 219 \fIidlist\fR are as follows:
222 220 .sp
223 221 .ne 2
224 222 .na
225 223 \fB\fB-i\fR \fBall\fR\fR
226 224 .ad
227 225 .RS 13n
228 226 The \fBpriocntl\fR command applies to all existing processes. No \fIidlist\fR
229 227 should be specified (if one is specified, it is ignored). The permission
230 228 restrictions described below still apply.
231 229 .RE
232 230
233 231 .sp
234 232 .ne 2
235 233 .na
236 234 \fB\fB-i\fR \fBctid\fR\fR
237 235 .ad
238 236 .RS 13n
239 237 idlist is a list of process contract IDs. The \fBpriocntl\fR command applies to
240 238 all processes with a process contract ID equal to an ID from the list.
241 239 .RE
242 240
243 241 .sp
244 242 .ne 2
245 243 .na
246 244 \fB\fB-i\fR \fBclass\fR\fR
247 245 .ad
248 246 .RS 13n
249 247 \fIidlist\fR consists of a single class name (\fBRT\fR for real-time, \fBTS\fR
250 248 for time-sharing, \fBIA\fR for inter-active, \fBFSS\fR for fair-share, or
251 249 \fBFX\fR for fixed-priority). The \fBpriocntl\fR command applies to all
252 250 processes in the specified class.
253 251 .RE
254 252
255 253 .sp
256 254 .ne 2
257 255 .na
258 256 \fB\fB-i\fR \fBgid\fR\fR
259 257 .ad
260 258 .RS 13n
261 259 \fIidlist\fR is a list of group \fBID\fRs. The \fBpriocntl\fR command applies
262 260 to all processes with an effective group \fBID\fR equal to an \fBID\fR from the
263 261 list.
264 262 .RE
265 263
266 264 .sp
267 265 .ne 2
268 266 .na
269 267 \fB\fB-i\fR \fBpgid\fR\fR
270 268 .ad
271 269 .RS 13n
272 270 \fIidlist\fR is a list of process group \fBID\fRs. The \fBpriocntl\fR command
273 271 applies to all processes in the specified process groups.
274 272 .RE
275 273
276 274 .sp
277 275 .ne 2
278 276 .na
279 277 \fB\fB-i\fR \fBpid\fR\fR
280 278 .ad
281 279 .RS 13n
282 280 \fIidlist\fR is a list of process \fBID\fRs. The \fBpriocntl\fR command applies
283 281 to the specified processes.
284 282 .RE
285 283
286 284 .sp
287 285 .ne 2
288 286 .na
289 287 \fB\fB-i\fR \fBppid\fR\fR
290 288 .ad
291 289 .RS 13n
292 290 \fIidlist\fR is a list of parent process \fBID\fRs. The \fBpriocntl\fR command
293 291 applies to all processes whose parent process \fBID\fR is in the list.
294 292 .RE
295 293
296 294 .sp
297 295 .ne 2
298 296 .na
299 297 \fB\fB-i\fR \fBprojid\fR\fR
300 298 .ad
301 299 .RS 13n
302 300 \fIidlist\fR is a list of project \fBID\fRs. The \fBpriocntl\fR command applies
303 301 to all processes with an effective project \fBID\fR equal to an \fBID\fR from
304 302 the list.
305 303 .RE
306 304
307 305 .sp
308 306 .ne 2
309 307 .na
310 308 \fB\fB-i\fR \fBsid\fR\fR
311 309 .ad
312 310 .RS 13n
313 311 \fIidlist\fR is a list of session \fBID\fRs. The \fBpriocntl\fR command applies
314 312 to all processes in the specified sessions.
315 313 .RE
316 314
317 315 .sp
318 316 .ne 2
319 317 .na
320 318 \fB\fB-i\fR \fBtaskid\fR\fR
321 319 .ad
322 320 .RS 13n
323 321 \fIidlist\fR is a list of task \fBID\fRs. The \fBpriocntl\fR command applies to
324 322 all processes in the specified tasks.
325 323 .RE
326 324
327 325 .sp
328 326 .ne 2
329 327 .na
330 328 \fB\fB-i\fR \fBuid\fR\fR
331 329 .ad
332 330 .RS 13n
333 331 \fIidlist\fR is a list of user \fBID\fRs. The \fBpriocntl\fR command applies to
334 332 all processes with an effective user \fBID\fR equal to an \fBID\fR from the
335 333 list.
336 334 .RE
337 335
338 336 .sp
339 337 .ne 2
340 338 .na
341 339 \fB\fB-i\fR \fBzoneid\fR\fR
342 340 .ad
343 341 .RS 13n
344 342 \fIidlist\fR is a list of zone \fBID\fRs. The \fBpriocntl\fR command applies to
345 343 all processes with an effective zone \fBID\fR equal to an \fBID\fR from the
346 344 list.
347 345 .RE
348 346
349 347 .RE
350 348
351 349 .sp
352 350 .ne 2
353 351 .na
354 352 \fB\fB-l\fR\fR
355 353 .ad
356 354 .RS 13n
357 355 Displays a list of the classes currently configured in the system along with
358 356 class-specific information about each class. The format of the class-specific
359 357 information displayed is described under USAGE.
360 358 .RE
361 359
362 360 .sp
363 361 .ne 2
364 362 .na
365 363 \fB\fB-s\fR\fR
366 364 .ad
367 365 .RS 13n
368 366 Sets the scheduling parameters associated with a set of processes.
369 367 .RE
370 368
371 369 .sp
372 370 .LP
373 371 The valid class-specific options for setting real-time parameters are:
374 372 .sp
375 373 .ne 2
376 374 .na
377 375 \fB\fB-p\fR \fIrtpri\fR\fR
378 376 .ad
379 377 .RS 21n
380 378 Sets the real-time priority of the specified process(es) to \fIrtpri\fR.
381 379 .RE
382 380
383 381 .sp
384 382 .ne 2
385 383 .na
386 384 \fB\fB-t\fR \fItqntm\fR [\fB-r\fR \fIres\fR]\fR
387 385 .ad
388 386 .RS 21n
389 387 Sets the time quantum of the specified process(es) to \fItqntm\fR. You can
390 388 optionally specify a resolution as explained below.
391 389 .RE
392 390
393 391 .sp
394 392 .ne 2
395 393 .na
396 394 \fB\fB-q\fR \fItqsig\fR\fR
397 395 .ad
398 396 .RS 21n
399 397 Sets the real-time time quantum signal of the specified process(es) to
400 398 \fItqsig\fR.
401 399 .RE
402 400
403 401 .sp
404 402 .LP
405 403 The valid class-specific options for setting time-sharing parameters are:
406 404 .sp
407 405 .ne 2
408 406 .na
409 407 \fB\fB-m\fR \fItsuprilim\fR\fR
410 408 .ad
411 409 .RS 16n
412 410 Sets the user priority limit of the specified process(es) to \fItsuprilim\fR.
413 411 .RE
414 412
415 413 .sp
416 414 .ne 2
417 415 .na
418 416 \fB\fB-p\fR \fItsupri\fR\fR
419 417 .ad
420 418 .RS 16n
421 419 Sets the user priority of the specified process(es) to \fItsupri\fR.
422 420 .RE
423 421
424 422 .sp
425 423 .LP
426 424 The valid class-specific options for setting inter-active parameters are:
427 425 .sp
428 426 .ne 2
429 427 .na
430 428 \fB\fB-m\fR \fIiauprilim\fR\fR
431 429 .ad
432 430 .RS 16n
433 431 Sets the user priority limit of the specified process(es) to \fIiauprilim\fR.
434 432 .RE
435 433
436 434 .sp
437 435 .ne 2
438 436 .na
439 437 \fB\fB-p\fR \fIiaupri\fR\fR
440 438 .ad
441 439 .RS 16n
442 440 Sets the user priority of the specified process(es) to \fIiaupri\fR.
443 441 .RE
444 442
445 443 .sp
446 444 .LP
447 445 The valid class-specific options for setting fair-share parameters are:
448 446 .sp
449 447 .ne 2
450 448 .na
451 449 \fB\fB-m\fR \fIfssuprilim\fR\fR
452 450 .ad
453 451 .RS 17n
454 452 Sets the user priority limit of the specified process(es) to \fIfssuprilim\fR.
455 453 .RE
456 454
457 455 .sp
458 456 .ne 2
459 457 .na
460 458 \fB\fB-p\fR \fIfssupri\fR\fR
461 459 .ad
462 460 .RS 17n
463 461 Sets the user priority of the specified process(es) to \fIfssupri\fR.
464 462 .RE
465 463
466 464 .sp
467 465 .LP
468 466 The valid class-specific options for setting fixed-priority parameters are:
469 467 .sp
470 468 .ne 2
471 469 .na
472 470 \fB\fB-m\fR \fIfxuprilim\fR\fR
473 471 .ad
474 472 .RS 16n
475 473 Sets the user priority limit of the specified process(es) to \fIfxuprilim\fR.
476 474 .RE
477 475
478 476 .sp
479 477 .ne 2
480 478 .na
481 479 \fB\fB-p\fR \fIfxupri\fR\fR
482 480 .ad
483 481 .RS 16n
484 482 Sets the user priority of the specified process(es) to \fIfxupri\fR.
485 483 .RE
486 484
487 485 .sp
488 486 .ne 2
↓ open down ↓ |
304 lines elided |
↑ open up ↑ |
489 487 .na
490 488 \fB\fB-t\fR \fItqntm\fR\fR
491 489 .ad
492 490 .RS 16n
493 491 [\fB-r\fR \fIres\fR] Sets the time quantum of the specified process(es) to
494 492 \fItqntm\fR. You can optionally specify a resolution as explained below.
495 493 .RE
496 494
497 495 .SH USAGE
498 496 .SS "Real-Time Class"
499 -.sp
500 497 .LP
501 498 The real-time class provides a fixed priority preemptive scheduling policy for
502 499 those processes requiring fast and deterministic response and absolute
503 500 user/application control of scheduling priorities. If the real-time class is
504 501 configured in the system, it should have exclusive control of the highest range
505 502 of scheduling priorities on the system. This ensures that a runnable real-time
506 503 process is given \fBCPU\fR service before any process belonging to any other
507 504 class.
508 505 .sp
509 506 .LP
510 507 The real-time class has a range of real-time priority (\fIrtpri\fR) values that
511 508 can be assigned to processes within the class. Real-time priorities range from
512 509 0 to \fIx\fR, where the value of \fIx\fR is configurable and can be displayed
513 510 for a specific installation that has already configured a real-time scheduler,
514 511 by using the command
515 512 .sp
516 513 .in +2
517 514 .nf
518 515 \fBpriocntl -l\fR
519 516 .fi
520 517 .in -2
521 518 .sp
522 519
523 520 .sp
524 521 .LP
525 522 The real-time scheduling policy is a fixed priority policy. The scheduling
526 523 priority of a real-time process never changes except as the result of an
527 524 explicit request by the user/application to change the \fIrtpri\fR value of the
528 525 process.
529 526 .sp
530 527 .LP
531 528 For processes in the real-time class, the \fIrtpri\fR value is, for all
532 529 practical purposes, equivalent to the scheduling priority of the process. The
533 530 \fIrtpri\fR value completely determines the scheduling priority of a real-time
534 531 process relative to other processes within its class. Numerically higher
535 532 \fIrtpri\fR values represent higher priorities. Since the real-time class
536 533 controls the highest range of scheduling priorities in the system, it is
537 534 guaranteed that the runnable real-time process with the highest \fIrtpri\fR
538 535 value is always selected to run before any other process in the system.
539 536 .sp
540 537 .LP
541 538 In addition to providing control over priority, \fBpriocntl\fR provides for
542 539 control over the length of the time quantum allotted to processes in the
543 540 real-time class. The time quantum value specifies the maximum amount of time a
544 541 process can run, assuming that it does not complete or enter a resource or
545 542 event wait state (\fBsleep\fR). Notice that if another process becomes runnable
546 543 at a higher priority, the currently running process can be preempted before
547 544 receiving its full time quantum.
548 545 .sp
549 546 .LP
550 547 The command
551 548 .sp
552 549 .in +2
553 550 .nf
554 551 \fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
555 552 .fi
556 553 .in -2
557 554 .sp
558 555
559 556 .sp
560 557 .LP
561 558 displays the real-time priority, time quantum (in millisecond resolution), and
562 559 time quantum signal value for each real-time process in the set specified by
563 560 \fIidtype\fR and \fIidlist\fR.
564 561 .sp
565 562 .LP
566 563 Any combination of the \fB-p\fR, \fB-t\fR [\fB-r\fR], and \fB-q\fR options can
567 564 be used with \fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the
568 565 real-time class. If an option is omitted and the process is currently
569 566 real-time, the associated parameter is unaffected. If an option is omitted when
570 567 changing the class of a process to real-time from some other class, the
571 568 associated parameter is set to a default value. The default value for
572 569 \fIrtpri\fR is \fB0\fR and the default for time quantum is dependent on the
573 570 value of \fIrtpri\fR and on the system configuration; see \fBrt_dptbl\fR(4).
574 571 .sp
575 572 .LP
576 573 When using the \fB-t\fR \fItqntm\fR option, you can optionally specify a
577 574 resolution using the \fB-r\fR \fIres\fR option. (If no resolution is specified,
578 575 millisecond resolution is assumed.) If \fIres\fR is specified, it must be a
579 576 positive integer between \fB1\fR and \fB1,000,000,000\fR inclusively and the
580 577 resolution used is the reciprocal of \fIres\fR in seconds. For example,
581 578 specifying \fB-t\fR \fB10\fR \fB-r\fR \fB100\fR would set the resolution to
582 579 hundredths of a second and the resulting time quantum length would be 10/100
583 580 seconds (one tenth of a second). Although very fine (nanosecond) resolution can
584 581 be specified, the time quantum length is rounded up by the system to the next
585 582 integral multiple of the system clock's resolution. Requests for time quantums
586 583 of zero or quantums greater than the (typically very large)
587 584 implementation-specific maximum quantum result in an error.
588 585 .sp
589 586 .LP
590 587 The real-time time quantum signal can be used to notify runaway real-time
591 588 processes about the consumption of their time quantum. Those processes, which
592 589 are monitored by the real-time time quantum signal, receive the configured
593 590 signal in the event of time quantum expiration. The default value (\fB0\fR) of
594 591 the time quantum signal \fItqsig\fR denotes no signal delivery. A positive
595 592 value denotes the delivery of the signal specified by the value. Like
596 593 \fBkill\fR(1) and other commands operating on signals, the \fB-q\fR \fItqsig\fR
597 594 option is also able to handle symbolically named signals, like \fBXCPU\fR or
598 595 \fBKILL\fR.
599 596 .sp
600 597 .LP
601 598 In order to change the class of a process to real-time (from any other class),
602 599 the user invoking \fBpriocntl\fR must have super-user privilege. In order to
603 600 change the \fIrtpri\fR value or time quantum of a real-time process, the user
↓ open down ↓ |
94 lines elided |
↑ open up ↑ |
604 601 invoking \fBpriocntl\fR must either be super-user, or must currently be in the
605 602 real-time class (shell running as a real-time process) with a real or effective
606 603 user \fBID\fR matching the real or effective user \fBID\fR of the target
607 604 process.
608 605 .sp
609 606 .LP
610 607 The real-time priority, time quantum, and time quantum signal are inherited
611 608 across the \fBfork\fR(2) and \fBexec\fR(2) system calls. When using the time
612 609 quantum signal with a user defined signal handler across the \fBexec\fR(2)
613 610 system call, the new image must install an appropriate user defined signal
614 -handler before the time quantum expires. Otherwise, unpredicable behavior would
611 +handler before the time quantum expires. Otherwise, unpredictable behavior would
615 612 result.
616 613 .SS "Time-Sharing Class"
617 -.sp
618 614 .LP
619 615 The time-sharing scheduling policy provides for a fair and effective allocation
620 616 of the \fBCPU\fR resource among processes with varying \fBCPU\fR consumption
621 617 characteristics. The objectives of the time-sharing policy are to provide good
622 618 response time to interactive processes and good throughput to \fBCPU\fR-bound
623 619 jobs, while providing a degree of user/application control over scheduling.
624 620 .sp
625 621 .LP
626 622 The time-sharing class has a range of time-sharing user priority (\fItsupri\fR)
627 623 values that can be assigned to processes within the class. User priorities
628 624 range from \(mi\fIx\fR to +\fIx\fR, where the value of \fIx\fR is configurable.
629 625 The range for a specific installation can be displayed by using the command
630 626 .sp
631 627 .in +2
632 628 .nf
633 629 \fBpriocntl -l\fR
634 630 .fi
635 631 .in -2
636 632 .sp
637 633
638 634 .sp
639 635 .LP
640 636 The purpose of the user priority is to provide some degree of user/application
641 637 control over the scheduling of processes in the time-sharing class. Raising or
642 638 lowering the \fItsupri\fR value of a process in the time-sharing class raises
643 639 or lowers the scheduling priority of the process. It is not guaranteed,
644 640 however, that a time-sharing process with a higher \fItsupri\fR value runs
645 641 before one with a lower \fItsupri\fR value. This is because the \fItsupri\fR
646 642 value is just one factor used to determine the scheduling priority of a
647 643 time-sharing process. The system can dynamically adjust the internal scheduling
648 644 priority of a time-sharing process based on other factors such as recent
649 645 \fBCPU\fR usage.
650 646 .sp
651 647 .LP
652 648 In addition to the system-wide limits on user priority (displayed with
653 649 \fBpriocntl\fR \fB-l\fR), there is a per process user priority limit
654 650 (\fItsuprilim\fR), which specifies the maximum \fItsupri\fR value that can be
655 651 set for a given process.
656 652 .sp
657 653 .LP
658 654 The command
659 655 .sp
660 656 .in +2
661 657 .nf
662 658 \fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
663 659 .fi
664 660 .in -2
665 661 .sp
666 662
667 663 .sp
668 664 .LP
669 665 displays the user priority and user priority limit for each time-sharing
670 666 process in the set specified by \fIidtype\fR and \fIidlist\fR.
671 667 .sp
672 668 .LP
673 669 Any time-sharing process can lower its own \fItsuprilim\fR (or that of another
674 670 process with the same user \fBID\fR). Only a time-sharing process with
675 671 super-user privilege can raise a \fItsuprilim\fR. When changing the class of a
676 672 process to time-sharing from some other class, super-user privilege is required
677 673 in order to set the initial \fItsuprilim\fR to a value greater than zero.
678 674 .sp
679 675 .LP
680 676 Any time-sharing process can set its own \fItsupri\fR (or that of another
681 677 process with the same user \fBID\fR) to any value less than or equal to the
682 678 process's \fItsuprilim\fR. Attempts to set the \fItsupri\fR above the
683 679 \fItsuprilim\fR (and/or set the \fItsuprilim\fR below the \fItsupri\fR) result
684 680 in the \fItsupri\fR being set equal to the \fItsuprilim\fR.
685 681 .sp
686 682 .LP
687 683 Any combination of the \fB-m\fR and \fB-p\fR options can be used with
688 684 \fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the time-sharing class.
689 685 If an option is omitted and the process is currently time-sharing, the
690 686 associated parameter is normally unaffected. The exception is when the \fB-p\fR
691 687 option is omitted and \fB-m\fR is used to set a \fItsuprilim\fR below the
692 688 current \fItsupri\fR. In this case, the \fItsupri\fR is set equal to the
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
693 689 \fItsuprilim\fR which is being set. If an option is omitted when changing the
694 690 class of a process to time-sharing from some other class, the associated
695 691 parameter is set to a default value. The default value for \fItsuprilim\fR is
696 692 \fB0\fR and the default for \fItsupri\fR is to set it equal to the
697 693 \fItsuprilim\fR value which is being set.
698 694 .sp
699 695 .LP
700 696 The time-sharing user priority and user priority limit are inherited across the
701 697 \fBfork\fR(2) and \fBexec\fR(2) system calls.
702 698 .SS "Inter-Active Class"
703 -.sp
704 699 .LP
705 700 The inter-active scheduling policy provides for a fair and effective allocation
706 701 of the \fBCPU\fR resource among processes with varying \fBCPU\fR consumption
707 702 characteristics while providing good responsiveness for user interaction. The
708 703 objectives of the inter-active policy are to provide good response time to
709 704 interactive processes and good throughput to \fBCPU\fR-bound jobs. The
710 705 priorities of processes in the inter-active class can be changed in the same
711 706 manner as those in the time-sharing class, though the modified priorities
712 707 continue to be adjusted to provide good responsiveness for user interaction.
713 708 .sp
714 709 .LP
715 710 The inter-active user priority limit, \fIiaupri\fR, is equivalent to
716 711 \fItsupri\fR. The inter-active per process user priority, \fIiauprilim\fR, is
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
717 712 equivalent to \fItsuprilim\fR.
718 713 .sp
719 714 .LP
720 715 Inter-active class processes that have the \fIiamode\fR ("interactive mode")
721 716 bit set are given a priority boost value of \fB10\fR, which is factored into
722 717 the user mode priority of the process when that calculation is made, that is,
723 718 every time a process's priority is adjusted. This feature is used by the X
724 719 windowing system, which sets this bit for those processes that run inside of
725 720 the current active window to give them a higher priority.
726 721 .SS "Fair-Share Class"
727 -.sp
728 722 .LP
729 723 The fair-share scheduling policy provides a fair allocation of system \fBCPU\fR
730 724 resources among projects, independent of the number of processes they own.
731 725 Projects are given "shares" to control their entitlement to \fBCPU\fR
732 726 resources. Resource usage is remembered over time, so that entitlement is
733 727 reduced for heavy usage, and increased for light usage, with respect to other
734 728 projects. \fBCPU\fR time is scheduled among processes according to their
735 729 owner's entitlements, independent of the number of processes each project owns.
736 730 .sp
737 731 .LP
738 732 The \fBFSS\fR scheduling class supports the notion of per-process user priority
739 733 and user priority limit for compatibility with the time-share scheduler. The
740 734 fair share scheduler attempts to provide an evenly graded effect across the
741 735 whole range of user priorities. Processes with negative \fIfssupri\fR values
742 736 receive time slices less frequently than normal, while processes with positive
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
743 737 \fIfssupri\fR values receive time slices more frequently than normal. Notice
744 738 that user priorities do not interfere with shares. That is, changing a
745 739 \fIfssupri\fR value of a process is not going to affect its project's overall
746 740 \fBCPU\fR usage which only relates to the amount of shares it is allocated
747 741 compared to other projects.
748 742 .sp
749 743 .LP
750 744 The priorities of processes in the fair-share class can be changed in the same
751 745 manner as those in the time-share class.
752 746 .SS "Fixed-Priority Class"
753 -.sp
754 747 .LP
755 748 The fixed-priority class provides a fixed priority preemptive scheduling policy
756 749 for those processes requiring that the scheduling priorities do not get
757 750 dynamically adjusted by the system and that the user/application have control
758 751 of the scheduling priorities.
759 752 .sp
760 753 .LP
761 754 The fixed-priority class shares the same range of scheduling priorities with
762 755 the time-sharing class, by default. The fixed-priority class has a range of
763 756 fixed-priority user priority (\fIfxupri\fR) values that can be assigned to
764 757 processes within the class. User priorities range from 0 to \fIx\fR, where the
765 758 value of \fIx\fR is configurable. The range for a specific installation can be
766 759 displayed by using the command
767 760 .sp
768 761 .in +2
769 762 .nf
770 763 \fBpriocntl -l\fR
771 764 .fi
772 765 .in -2
773 766 .sp
774 767
775 768 .sp
776 769 .LP
777 770 The purpose of the user priority is to provide user/application control over
778 771 the scheduling of processes in the fixed-priority class. For processes in the
779 772 fixed-priority class, the \fIfxupri\fR value is, for all practical purposes,
780 773 equivalent to the scheduling priority of the process. The \fIfxupri\fR value
781 774 completely determines the scheduling priority of a fixed-priority process
782 775 relative to other processes within its class. Numerically higher \fIfxupri\fR
783 776 values represent higher priorities.
784 777 .sp
785 778 .LP
786 779 In addition to the system-wide limits on user priority (displayed with
787 780 \fBpriocntl\fR \fB-l\fR), there is a per process user priority limit
788 781 (\fIfxuprilim\fR), which specifies the maximum \fIfxupri\fR value that can be
789 782 set for a given process.
790 783 .sp
791 784 .LP
792 785 Any fixed-priority process can lower its own \fIfxuprilim\fR (or that of
793 786 another process with the same user \fBID\fR). Only a process with super-user
794 787 privilege can raise a \fIfxuprilim\fR. When changing the class of a process to
795 788 fixed-priority from some other class, super-user privilege is required in order
796 789 to set the initial \fIfxuprilim\fR to a value greater than zero.
797 790 .sp
798 791 .LP
799 792 Any fixed-priority process can set its own \fIfxupri\fR (or that of another
800 793 process with the same user \fBID\fR) to any value less than or equal to the
801 794 process's \fIfxuprilim\fR. Attempts to set the \fIfxupri\fR above the
802 795 \fIfxuprilim\fR (or set the \fIfxuprilim\fR below the \fIfxupri\fR) result in
803 796 the \fIfxupri\fR being set equal to the \fIfxuprilim\fR.
804 797 .sp
805 798 .LP
806 799 In addition to providing control over priority, \fBpriocntl\fR provides for
807 800 control over the length of the time quantum allotted to processes in the
808 801 fixed-priority class. The time quantum value specifies the maximum amount of
809 802 time a process can run, before surrendering the \fBCPU\fR, assuming that it
810 803 does not complete or enter a resource or event wait state (sleep). Notice that
811 804 if another process becomes runnable at a higher priority, the currently running
812 805 process can be preempted before receiving its full time quantum.
813 806 .sp
814 807 .LP
815 808 Any combination of the \fB-m\fR, \fB-p\fR, and \fB-t\fR options can be used
816 809 with \fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the fixed-priority
817 810 class. If an option is omitted and the process is currently fixed-priority, the
818 811 associated parameter is normally unaffected. The exception is when the \fB-p\fR
819 812 option is omitted and the \fB-m\fR option is used to set a \fIfxuprilim\fR
820 813 below the current \fIfxupri\fR. In this case, the \fIfxupri\fR is set equal to
821 814 the \fIfxuprilim\fR which is being set. If an option is omitted when changing
822 815 the class of a process to fixed-priority from some other class, the associated
823 816 parameter is set to a default value. The default value for \fIfxuprilim\fR is
824 817 \fB0\fR. The default for \fIfxupri\fR is to set it equal to the \fIfxuprilim\fR
825 818 value which is being set. The default for time quantum is dependent on the
↓ open down ↓ |
62 lines elided |
↑ open up ↑ |
826 819 \fIfxupri\fR and on the system configuration. See \fBfx_dptbl\fR(4).
827 820 .sp
828 821 .LP
829 822 The time quantum of processes in the fixed-priority class can be changed
830 823 in the same manner as those in the real-time class.
831 824 .sp
832 825 .LP
833 826 The fixed-priority user priority, user priority limit, and time quantum are
834 827 inherited across the \fBfork\fR(2) and \fBexec\fR(2) system calls.
835 828 .SH EXAMPLES
836 -.sp
837 829 .LP
838 830 The following are real-time class examples:
839 831 .LP
840 832 \fBExample 1 \fRSetting the Class
841 833 .sp
842 834 .LP
843 835 The following example sets the class of any non-real-time processes selected by
844 836 \fIidtype\fR and \fIidlist\fR to real-time and sets their real-time priority to
845 837 the default value of \fB0\fR. The real-time priorities of any processes
846 838 currently in the real-time class are unaffected. The time quantums of all of
847 839 the specified processes are set to \fB1/10\fR seconds.
848 840
849 841 .sp
850 842 .in +2
851 843 .nf
852 844 example% \fBpriocntl -s -c RT -t 1 -r 10 -i \fIidtype idlist\fR\fR
853 845 .fi
854 846 .in -2
855 847 .sp
856 848
857 849 .LP
858 850 \fBExample 2 \fRExecuting a Command in Real-time
859 851 .sp
860 852 .LP
861 853 The following example executes \fIcommand\fR in the real-time class with a
862 854 real-time priority of \fB15\fR and a time quantum of \fB20\fR milliseconds:
863 855
864 856 .sp
865 857 .in +2
866 858 .nf
867 859 example% \fBpriocntl -e -c RT -p 15 -t 20 \fIcommand\fR\fR
868 860 .fi
869 861 .in -2
870 862 .sp
871 863
872 864 .LP
873 865 \fBExample 3 \fRExecuting a Command in Real-time with a Specified Quantum
874 866 Signal
875 867 .sp
876 868 .LP
877 869 The following example executes \fIcommand\fR in the real-time class with a
878 870 real-time priority of \fB11\fR, a time quantum of \fB250\fR milliseconds, and
879 871 where the specified real-time quantum signal is \fBSIGXCPU\fR:
880 872
881 873 .sp
882 874 .in +2
883 875 .nf
884 876 example% \fBpriocntl -e -c RT -p 11 -t 250 -q XCPU \fIcommand\fR\fR
885 877 .fi
886 878 .in -2
887 879 .sp
888 880
889 881 .sp
890 882 .LP
891 883 The following are time-sharing class examples:
892 884 .LP
893 885 \fBExample 4 \fRSetting the Class of non-time-sharing Processes
894 886 .sp
895 887 .LP
896 888 The following example sets the class of any non-time-sharing processes selected
897 889 by \fIidtype\fR and \fIidlist\fR to time-sharing and sets both their user
898 890 priority limit and user priority to \fB0\fR. Processes already in the
899 891 time-sharing class are unaffected.
900 892
901 893 .sp
902 894 .in +2
903 895 .nf
904 896 example% \fBpriocntl -s -c TS -i \fIidtype idlist\fR\fR
905 897 .fi
906 898 .in -2
907 899 .sp
908 900
909 901 .LP
910 902 \fBExample 5 \fRExecuting a Command in the Time-sharing Class
911 903 .sp
912 904 .LP
913 905 The following example executes \fIcommand\fR with the arguments \fIarguments\fR
914 906 in the time-sharing class with a user priority limit of \fB0\fR and a user
915 907 priority of \fB\(mi15\fR:
916 908
917 909 .sp
918 910 .in +2
919 911 .nf
920 912 example% \fBpriocntl -e -c TS -m 0 -p \fR\fB-15\fR \fB\fIcommand\fR [\fIarguments\fR]\fR
921 913 .fi
922 914 .in -2
923 915 .sp
924 916
925 917 .LP
926 918 \fBExample 6 \fRExecuting a Command in Fixed-Priority Class
927 919 .sp
928 920 .LP
929 921 The following example executes a command in the fixed-priority class with a
930 922 user priority limit of \fB20\fR and user priority of \fB10\fR and time quantum
931 923 of \fB250\fR milliseconds:
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
932 924
933 925 .sp
934 926 .in +2
935 927 .nf
936 928 example% \fBpriocntl -e -c FX -m 20 -p 10 -t 250 command\fR
937 929 .fi
938 930 .in -2
939 931 .sp
940 932
941 933 .SH EXIT STATUS
942 -.sp
943 934 .LP
944 935 The following exit values are returned:
945 936 .sp
946 937 .LP
947 938 For options \fB-d\fR, \fB-l\fR, and \fB-s\fR:
948 939 .sp
949 940 .ne 2
950 941 .na
951 942 \fB\fB0\fR\fR
952 943 .ad
953 944 .RS 5n
954 945 Successful operation.
955 946 .RE
956 947
957 948 .sp
958 949 .ne 2
959 950 .na
960 951 \fB\fB1\fR\fR
961 952 .ad
962 953 .RS 5n
963 954 Error condition.
964 955 .RE
965 956
966 957 .sp
967 958 .LP
968 959 For option \fB-e\fR:
969 960 .sp
970 961 .LP
971 962 Return of the Exit Status of the executed command denotes successful operation.
972 963 Otherwise,
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
973 964 .sp
974 965 .ne 2
975 966 .na
976 967 \fB\fB1\fR\fR
977 968 .ad
978 969 .RS 5n
979 970 Command could not be executed at the specified priority.
980 971 .RE
981 972
982 973 .SH ATTRIBUTES
983 -.sp
984 974 .LP
985 975 See \fBattributes\fR(5) for descriptions of the following attributes:
986 976 .sp
987 977
988 978 .sp
989 979 .TS
990 980 box;
991 981 c | c
992 982 l | l .
993 983 ATTRIBUTE TYPE ATTRIBUTE VALUE
994 984 _
995 985 CSI Enabled
996 986 .TE
997 987
998 988 .SH SEE ALSO
999 -.sp
1000 989 .LP
1001 990 \fBkill\fR(1), \fBnice\fR(1), \fBps\fR(1), \fBdispadmin\fR(1M), \fBexec\fR(2),
1002 991 \fBfork\fR(2), \fBpriocntl\fR(2), \fBfx_dptbl\fR(4), \fBprocess\fR(4),
1003 992 \fBrt_dptbl\fR(4), \fBattributes\fR(5), \fBzones\fR(5), \fBFSS\fR(7)
1004 993 .sp
1005 994 .LP
1006 995 \fISystem Administration Guide: Basic Administration\fR
1007 996 .SH DIAGNOSTICS
1008 -.sp
1009 997 .LP
1010 998 \fBpriocntl\fR prints the following error messages:
1011 999 .sp
1012 1000 .ne 2
1013 1001 .na
1014 1002 \fB\fBProcess(es) not found\fR\fR
1015 1003 .ad
1016 1004 .sp .6
1017 1005 .RS 4n
1018 1006 None of the specified processes exists.
1019 1007 .RE
1020 1008
1021 1009 .sp
1022 1010 .ne 2
1023 1011 .na
1024 1012 \fB\fBSpecified processes from different classes\fR\fR
1025 1013 .ad
1026 1014 .sp .6
1027 1015 .RS 4n
1028 1016 The \fB-s\fR option is being used to set parameters, the \fB-c\fR \fIclass\fR
1029 1017 option is not present, and processes from more than one class are specified.
1030 1018 .RE
1031 1019
1032 1020 .sp
1033 1021 .ne 2
1034 1022 .na
1035 1023 \fB\fBInvalid option or argument\fR\fR
1036 1024 .ad
1037 1025 .sp .6
1038 1026 .RS 4n
1039 1027 An unrecognized or invalid option or option argument is used.
1040 1028 .RE
1041 1029
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX