System Administration Guide

Scheduler Parameter Tables

The scheduler tables are described in Table 67-2.

Table 67-2 Scheduler Parameters

Table 

Used to Manage ... 

rt_dptbl

Real-time processes 

ts_dptbl

Timesharing processes 

ts_kmdpris

Sleeping timesharing processes that own critical resources 

These tables define scheduling policy by setting the scheduling parameters to use for real-time and timesharing processes. The parameters specify how much CPU time processes get at different priority levels.

Default time slices for the priority levels are specified in the ts_dptbl and rt_dptbl configuration tables, which are defined in the TS_DPTBL and RT_DPTBL loadable modules. These modules are automatically loaded from the /kernel/sched directory into the kernel as needed.

The time slices are specified in units (quanta) with a resolution defined by a "resolution" line. The default resolution is 1000, which means the time quantum values are interpreted as milliseconds. This is derived from the reciprocal of the specified resolution in seconds. The quanta are rounded up to the next integral multiple of the system clock's resolution in clock ticks. (The system clock ticks HZ times per second, where HZ is a hardware-dependent constant defined in the param.h header file.) For example, if the clock tick is 10 milliseconds, 42 quanta is rounded up to 50 milliseconds.

Timesharing Parameter Table

A default version of the ts_dptb, is delivered with the system in /kernel/sched/TS_DPTBL. The default configuration has 60 timesharing priorities.

The dispadmin -c TS -g command displays a sample ts_dptbl table.


$ dispadmin -c TS -g
# Time Sharing Dispatcher Configuration
RES=1000
 
# ts_quantum  ts_tqexp  ts_slpret  ts_maxwait ts_lwait  PRIORITY LEVEL
       200         0        50           0        50        #     0
       200         0        50           0        50        #     1
       200         0        50           0        50        #     2
       200         0        50           0        50        #     3
       200         0        50           0        50        #     4
       200         0        50           0        50        #     5
       200         0        50           0        50        #     6
       200         0        50           0        50        #     7
       200         0        50           0        50        #     8
       200         0        50           0        50        #     9
       160         0        51           0        51        #    10
       160         1        51           0        51        #    11
       160         2        51           0        51        #    12
       160         3        51           0        51        #    13
       160         4        51           0        51        #    14
       160         5        51           0        51        #    15
       160         6        51           0        51        #    16
       160         7        51           0        51        #    17
       160         8        51           0        51        #    18
       160         9        51           0        51        #    19
       120        10        52           0        52        #    20
       120        11        52           0        52        #    21
       120        12        52           0        52        #    22
       120        13        52           0        52        #    23
       120        14        52           0        52        #    24
       120        15        52           0        52        #    25
       120        16        52           0        52        #    26
       120        17        52           0        52        #    27
       120        18        52           0        52        #    28
       120        19        52           0        52        #    29
        80        20        53           0        53        #    30
        80        21        53           0        53        #    31
        80        22        53           0        53        #    32
        80        23        53           0        53        #    33
        80        24        53           0        53        #    34
        80        25        54           0        54        #    35
        80        26        54           0        54        #    36
        80        27        54           0        54        #    37
        80        28        54           0        54        #    38
        80        29        54           0        54        #    39
        40        30        55           0        55        #    40
        40        31        55           0        55        #    41
        40        32        55           0        55        #    42
        40        33        55           0        55        #    43
        40        34        55           0        55        #    44
        40        35        56           0        56        #    45
        40        36        57           0        57        #    46
        40        37        58           0        58        #    47
        40        38        58           0        58        #    48
        40        39        58           0        59        #    49
        40        40        58           0        59        #    50
        40        41        58           0        59        #    51
        40        42        58           0        59        #    52
        40        43        58           0        59        #    53
        40        44        58           0        59        #    54
        40        45        58           0        59        #    55
        40        46        58           0        59        #    56
        40        47        58           0        59        #    57
        40        48        58           0        59        #    58
        20        49        59       32000        59        #    59
$ 

Table 67-3 describes the fields in the ts_dptbl table.

Table 67-3 Fields in the ts_dptbl Table

Field Name 

Description 

ts_quantum

(runtime) 

Contains the time slice (in milliseconds by default) that a process at a given priority is allowed to run before the scheduler reevaluates its priority. If the process uses up its entire time slice, it is put on the expired-level (ts_tqexp) queue. Time slices run from 40 milliseconds for the highest priority (59) to 200 milliseconds (0) for the lowest priority.

ts_tqexp

(expired level) 

Determines the new process priority for a process whose time slice has expired. If a process uses its whole time slice without sleeping, the scheduler changes its priority to the level indicated in the ts_tqexp column. The expired level is lower than the prior level. For example, a process with a priority of 30 that used up its time slice (80 milliseconds) will get a new priority of 20.

ts_slpret

(sleep level)  

Determines the priority assigned to a process when it returns from sleep. A process may sleep during certain system calls or when waiting for I/O (for example, servicing a page fault or waiting for a lock). When a process returns from sleep, it is always a given a priority of 59.

ts_maxwait

(wait time)  

Specifies the number of seconds a process will be left on a dispatch queue without its time slice expiring. If it does not use its time slice (in ts_maxwait seconds), its new priority will be set to ts_lwait. This is used to prevent a low-priority process from being starved of CPU time.

ts_lwait

(wait level)  

Contains the new priority for a ready-to-run process that has exceeded the maximum wait time (ts_maxwait) without getting its full time slice.

PRIORITY LEVEL

Contains global priorities. Processes put in queues at the higher priority levels run first. The global priorities run from a high of 59 to a low of 0. This is the only column in the table that is not tunable.

Real-Time Parameter Table

A default version of rt_dptbl is delivered with the system in the /kernel/sched/RT_DPTBL loadable module.

The dispadmin -c RT -g command displays rt_dptbl information similar to the following.


$ dispadmin -c RT -g
# Real Time Dispatcher Configuration
RES=1000
 
# TIME QUANTUM                    PRIORITY
# (rt_quantum)                      LEVEL
      1000                    #        0
      1000                    #        1
      1000                    #        2
      1000                    #        3
      1000                    #        4
      1000                    #        5
      1000                    #        6
      1000                    #        7
      1000                    #        8
      1000                    #        9
       800                    #       10
       800                    #       11
       800                    #       12
       800                    #       13
       800                    #       14
       800                    #       15
       800                    #       16
       800                    #       17
       800                    #       18
       800                    #       19
       600                    #       20
       600                    #       21
       600                    #       22
       600                    #       23
       600                    #       24
       600                    #       25
       600                    #       26
       600                    #       27
       600                    #       28
       600                    #       29
       400                    #       30
       400                    #       31
       400                    #       32
       400                    #       33
       400                    #       34
       400                    #       35
       400                    #       36
       400                    #       37
       400                    #       38
       400                    #       39
       200                    #       40
       200                    #       41
       200                    #       42
       200                    #       43
       200                    #       44
       200                    #       45
       200                    #       46
       200                    #       47
       200                    #       48
       200                    #       49
       100                    #       50
       100                    #       51
       100                    #       52
       100                    #       53
       100                    #       54
       100                    #       55
       100                    #       56
       100                    #       57
       100                    #       58
       100                    #       59
$
 

Table 67-4 describes the fields in the real-time parameter table.

Table 67-4 Fields in the rt_dptbl Table

Field Name 

Description 

rt_glbpri

Contains global priorities. Processes put in queues at the higher priority levels run first. Note that the dispadmin command, which you can use to display the table, shows only the relative priorities within the class, and not the global priorities. This column cannot be changed with dispadmin.

rt_qntm

Describes the default time slice (in milliseconds) a process with this priority (rt_glbpri) may run before the scheduler gives another process a chance. The time slice for a real-time process can be specified with the priocntl -t command.