System Interface Guide

Configuring Scheduling

Associated with each scheduling class is a parameter table, config_rt_dptbl (RT), and config_ts_dptbl (TS). These tables are configurable by using a loadable module at boot time, or with dispadmin(1M) during runtime.

The Dispatcher Parameter Table

The in-core table for realtime establishes the properties for RT scheduling. The config_rt_dptbl structure consists of an array of parameters, struct rt_dpent, one for each of the n priority levels. The properties of a given priority level i are specified by the ith parameter structure in the array, config_rt_dptbl[i].

A parameter structure consists of the following members (also described in the /usr/include/sys/rt.h header file).

rt_globpri

The global scheduling priority associated with this priority level. The rt_globpri values cannot be changed with dispadmin(1M).  

rt_quantum

The length of the time quantum allocated to processes at this level in ticks (see "Timestamp Functions"). The time quantum value is only a default or starting value for processes at a particular level. The time quantum of a realtime process can be changed by using the priocntl(1) command or the priocntl(2) system call.

Reconfiguring config_rt_dptbl

A realtime administrator can change the behavior of the realtime portion of the scheduler by reconfiguring the config_rt_dptbl at any time. Two methods are described here.

The first method is to reconfigure the config_rt_dptbl parameter table with a loadable module that contains a new dispatch table loaded at boot time. The module containing the dispatch table is a separate module. This is the only method that can be used to change the number of realtime priority levels or the set of global scheduling priorities used by the realtime class. Note that changing the config_rt_dptbl affects the realtime processes that you set after the table gets updated.

A second method for examining or modifying the realtime parameter table on a running system is through using the dispadmin(1M) command. Invoking dispadmin for the realtime class allows retrieval of the current rt_quantum values in the current config_rt_dptbl configuration from the kernel's in-core table. When overwriting the current in-core table, the configuration file used for input to dispadmin must conform to the specific format described in the manual page for config_rt_dptbl found in the man Pages(1M): System Administration Commands.

Following is an example of prioritized processes rtdpent_t with their associated time quantum config_rt_dptbl[] value as they might appear in config_rt_dptbl[].

rtdpent_t   rt_dptbl[] = {       
      /* prilevel Time quantum */
                 100,    100,
                 101,    100,
                 102,    100,
                 103,    100,
                 104,    100,
                 105,    100,
                 106,    100,
                 107,    100,
                 108,    100,
                 109,    100,
                 110,    80,
                 111,    80,
                 112,    80,
                 113,    80,
                 114,    80,
                 115,    80,
                 116,    80,
                 117,    80,
                 118,    80,
                 119,    80,
                 120,    60,
                 121,    60,
                 122,    60,
                 123,    60,
                 124,    60,
                 125,    60,
                 126,    60,
                 127,    60,
                 128,    60,
                 129,    60,
                 130,    40,
                 131,    40,
                 132,    40,
                 133,    40,
               
                134,    40,
                 135,    40,
                 136,    40,
                 137,    40,
                 138,    40
                 139,    40,
                 140,    20,
                 141,    20,
                 142,    20,
                 143,    20,
                 144,    20,
                 145,    20,
                 146,    20,
                 147,    20,
                 148,    20,
                 149,    20,
                 150,    10,
                 151,    10,
                 152,    10,
                 153,    10,
                 154,    10,
                 155,    10,
                 156,    10,
                 157,    10,
                 158,    10,
                 159,    10,
 }