fp_dptbl(4) fp_dptbl(4)
NAME
fpdptbl - fixed-priority dispatcher parameter table
DESCRIPTION
The process scheduler (or dispatcher) is the portion of the kernel
that controls allocation of the CPU to processes. The scheduler sup-
ports the notion of scheduling classes where each class defines a
scheduling policy, used to schedule processes within that class. Asso-
ciated with each scheduling class is a set of priority queues on which
ready to run processes are linked. These priority queues are mapped by
the system configuration into a set of global scheduling priorities
which are available to processes within the class. (The dispatcher
always selects for execution the process with the highest global
scheduling priority that is eligible to run on a given CPU. See PRO-
CESSOR AFFINITY AND BINDING CONSIDERATIONS below).
The priority queues associated with a given class are viewed by that
class as a contiguous set of priority levels numbered from 0 (lowest
priority) to n (highest priority - a configuration dependent value).
The set of global scheduling priorities that the queues for a given
class are mapped into might not start at zero and might not be con-
tiguous (depending on the configuration).
The fixed-priority class maintains an in-core table, with an entry for
each priority level, giving the properties of that level. This table
is called the fixed-priority dispatcher parameter table (fpdptbl).
The fpdptbl consists of an array of parameter structures (struct
fpdpent), one for each of the n priority levels. The properties of a
given priority level i are specified by the ith parameter structure in
this array (fpdptbl[i]).
A parameter structure consists of the following members. These are
also described in the /usr/include/sys/fixpri.h header file.
fpglobpri The global scheduling priority associated with this
priority level. The mapping between fixed-priority
priority levels and global scheduling priorities is
determined at boot time by the system configuration.
The fpglobpri values cannot be changed with
dispadmin(1M).
fpquantum The length of the time quantum allocated to processes
at this level in ticks (HZ). The time quantum value is
only a default or starting value for processes at a
particular level as the time quantum of a fixed-
priority process can be changed by the user with the
priocntl(1) command or the priocntl(2) system call.
An administrator can affect the behavior of the fixed-priority portion
of the scheduler by reconfiguring the fpdptbl. There are two methods
available for doing this.
Page 1 Reliant UNIX 5.44 Printed 11/98
fp_dptbl(4) fp_dptbl(4)
KERNEL LINK TIME CONFIGURATION
The fpdptbl can be reconfigured at kernel link time time by specify-
ing the desired values in the /etc/conf/pack.d/fp/space.c file and
reconfiguring the system using the auto-configuration procedure; see
idbuild(1M). This is the only method that can be used to change the
number of fixed-priority priority levels or the set of global schedul-
ing priorities used by the fixed-priority class.
DISPADMIN CONFIGURATION FILE
The fpquantum values in the fpdptbl can be examined and modified on
a running system using the dispadmin(1M) command. Invoking dispadmin
for the fixed-priority class allows the administrator to retrieve the
current fpdptbl configuration from the kernel's in-core table, or
overwrite the in-core table with values from a configuration file. The
configuration file used for input to dispadmin must conform to the
specific format described below.
Blank lines are ignored and any part of a line to the right of a #
symbol is treated as a comment. The first non-blank, non-comment line
must indicate the resolution to be used for interpreting the time
quantum values. The resolution is specified as
RES=res
where res is a positive integer between 1 and 1,000,000,000 inclusive
and the resolution used is the reciprocal of res in seconds. (For
example, RES=1000 specifies millisecond resolution.) Although very
fine (nanosecond) resolution may be specified, the time quantum
lengths are rounded up to the next integral multiple of the system
clock's resolution.
The remaining lines in the file are used to specify the fpquantum
values for each of the fixed-priority priority levels. The first line
specifies the quantum for fixed-priority level 0, the second line
specifies the quantum for fixed-priority level 1, etc. There must be
exactly one line for each configured fixed-priority priority level.
Each fpquantum entry must be a positive integer specifying the
desired time quantum (in the resolution given by res).
EXAMPLE
The following excerpt from a dispadmin configuration file illustrates
the format. Note that for each line specifying a time quantum there is
a comment indicating the corresponding priority level. These level
numbers indicate priority within the fixed-priority class, and the
mapping between these fixed-priority priorities and the corresponding
global scheduling priorities is determined by the configuration speci-
fied in the fp/space.c file. The level numbers are strictly for the
convenience of the administrator reading the file and, as with any
comment, they are ignored by dispadmin on input. dispadmin assumes
that the lines in the file are ordered by consecutive, increasing
priority level (from 0 to the maximum configured fixed-priority prior-
ity). The level numbers in the comments should normally agree with
Page 2 Reliant UNIX 5.44 Printed 11/98
fp_dptbl(4) fp_dptbl(4)
this ordering; if for some reason they don't, however, dispadmin is
unaffected.
# Fixed Priority Dispatcher Configuration
RES=1000
# TIME QUANTUM PRIORITY
# (fpquantum) LEVEL
50 # 0
50 # 1
50 # 2
50 # 3
50 # 4
50 # 5
50 # 6
50 # 7
50 # 8
50 # 9
50 # 10
50 # 11
. . .
. . .
. . .
50 # 73
50 # 74
PROCESSOR AFFINITY AND BINDING CONSIDERATIONS
In order to increase the cache hit rates of a multiprocessor, a pro-
cess should generally execute on a particular processor. This affinity
for a particular processor will reduce the required memory bandwidth
for the process (and for the system as a whole). If a process has not
run "recently" then it probably only has a small cache state in any
given processor - and thus should loose its affinity for any particu-
lar processor.
This affinity mechanism can be enabled or disabled on a per-process
basis by the super user [see mpcntl(1M), mpcntl(3X)]. The affinity
mechanism defaults to on for the FP class.
A process can also be bound to a set of processors. If a processor has
been so bound, then it will only run on one of the processors of that
set. If there is a idle processor that is not in the processes binding
set - then the process will still wait until there is a processor in
its set that is not running a higher priority process.
Process bindings can be established by the process [see mpcntl(3X)],
or can be temporarily established by the kernel (if the kernel is exe-
cuting driver code that must run on a particular CPU).
Page 3 Reliant UNIX 5.44 Printed 11/98
fp_dptbl(4) fp_dptbl(4)
FILES
/usr/include/sys/fixpri.h
/etc/conf/pack.d/fp/space.c
SEE ALSO
priocntl(1), dispadmin(1M), idbuild(1M), priocntl(2), mpcntl(3X).
Page 4 Reliant UNIX 5.44 Printed 11/98