HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 39

Signals

Page 39 highlights

Managing Processes 1. POSIX standard priority (tunable parameter): The highest priorities, known as RTSCHED priorities. RTSCHED processes have a range of priorities separate from other HP-UX priorities. The number of RTSCHED priorities is a user tunable parameter (rtsched_numpri), set between 32 and 512 (default 32). 2. Real-time priority (0-127): Reserved for SCHED_RTPRIO processes started with rtprio() system calls. 3. System priority (128-177): Used by system processes. 4. User priority (178-255): Assigned to user processes. The kernel can alter the priority of time-share priorities (128-255) but not real-time priorities (0-127). HP-UX uses the AT&T version of nice values, which run from 0 to 39 with a default of 20. The lowest priority is 39; the highest priority is 0. Note that both Korn and C shells handle nice slightly differently. ksh automatically lowers priority of background processes by four; this behavior can be modified using the bgnice argument. If you specify nice from ksh, it executes /usr/bin/nice and lowers priority by ten. If you specify nice from csh, it executes its built-in command and lowers priority by four; however, if you specify /usr/bin/nice, csh lowers priority by ten. The renice command (/usr/sbin/renice) allows you to alter the priority of running processes. Running processes can also be altered from the Process Management area of SAM. The HP-UX version of renice has the following syntax: # renice -n priority_change PID The new system nice value is equal to 20 + priority_change, and is limited to the range 0 through 39. If priority_change is a negative value, priority is increased, provided the user has appropriate privileges. HP-UX supports job control for both the POSIX, Korn, and C shells. Job control provides users with greater flexibility in managing and controlling jobs. For example, you can: • Temporarily suspend a foreground job, by pressing CTRL-Z. This can be customized using the stty command. • Bring a background job into the foreground, using the fg built-in shell command. • Move a foreground job into the background, using the bg built-in shell command. Signals HP-UX signals look like the following kill command: # /usr/bin/kill -l NULL HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS 34

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Managing Processes
34
1.
POSIX standard priority (tunable parameter): The highest priorities, known as RTSCHED priorities.
RTSCHED processes have a range of priorities separate from other HP-UX priorities. The number of
RTSCHED priorities is a user tunable parameter (
rtsched_numpri
), set between
32
and
512
(default
32
).
2.
Real-time priority (
0-127
): Reserved for SCHED_RTPRIO processes started with
rtprio()
system
calls.
3.
System priority (
128-177
): Used by system processes.
4.
User priority (
178-255
): Assigned to user processes.
The kernel can alter the priority of time-share priorities (
128-255
) but not real-time priorities (
0-127
).
HP-UX uses the AT&T version of
nice
values, which run from
0
to
39
with a default of
20
. The lowest
priority is
39
; the highest priority is
0
.
Note that both
Korn
and
C
shells handle
nice
slightly differently.
ksh
automatically lowers priority of
background processes by four; this behavior can be modified using the
bgnice
argument. If you specify
nice
from
ksh
, it executes
/usr/bin/nice
and lowers priority by ten. If you specify nice from
csh
, it executes
its built-in command and lowers priority by four; however, if you specify
/usr/bin/nice
,
csh
lowers priority
by ten.
The
renice
command (
/usr/sbin/renice
) allows you to alter the priority of running processes. Running
processes can also be altered from the Process Management area of SAM. The HP-UX version of
renice
has the following syntax:
# renice -n priority_change PID
The new system
nice
value is equal to
20
+
priority_change
, and is limited to the range
0
through
39
. If
priority_change
is a negative value, priority is increased, provided the user has appropriate privileges.
HP-UX supports job control for both the POSIX,
Korn
, and
C
shells. Job control provides users with
greater flexibility in managing and controlling jobs. For example, you can:
Temporarily suspend a foreground job, by pressing
CTRL-Z
. This can be customized using the
stty
command.
Bring a background job into the foreground, using the
fg
built-in shell command.
Move a foreground job into the background, using the
bg
built-in shell command.
Signals
HP-UX signals look like the following
kill
command:
# /usr/bin/kill –l
NULL
HUP
INT
QUIT
ILL
TRAP
ABRT
EMT
FPE
KILL
BUS
SEGV
SYS