priority levels for sleep locks
Priority levels are used with sleep locks
to provide a hint for the relative priority
to be assigned to the caller
while running in the kernel after being wakened.
All entry points unconditionally acquiring a sleep lock
permit the calling code to provide
a pri specification.
This is a hint for the relative priority
the caller wishes to be assigned
while running in the kernel after being unblocked.
Note that the scheduler class-specific code
is free to ignore this hint.
The base kernel can use the following symbols
for specifying the priority.
The list is ordered
-- PRIMEM represents higher priority
For added flexibility, positive and negative offsets from these symbolic
names are permitted, but the maximum allowable offset is 3.
When converting from
to the sleep locks,
note that the priority level values are reversed:
for sleep locks, higher priority values indicate
higher priority levels,
lower priority values indicate
higher priority levels.
The following global variables are defined to achieve a priority
appropriate to a given type of driver or module interface.
waiting in disk driver
waiting in network driver
waiting in terminal driver
waiting in tape driver
Alternatively, if the driver is only concerned about relative priorities,
the following global variables are also available.
For added flexibility,
positive and negative offsets
from the above priority values are permitted,
but the maximum allowable offset is 3.
Defining the priority values as global variables
enhances the binary portability of the drivers.
Furthermore, this scheme permits
a given platform to assign priority values that
are optimal for the platform.
For instance, a disk-less machine may choose
to assign a higher priority value
to prinet compared to pridisk.
ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005