Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ts_dptbl(4) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dispadmin(1M)

priocntl(1)

priocntl(2)

master(4)

mkboot(1M)



ts_dptbl(4)               FILE FORMATS                ts_dptbl(4)



NAME
     tsdptbl - time-sharing 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 supports  the  notion  of  scheduling  classes
     where  each  class  defines  a  scheduling  policy,  used to
     schedule processes within that class.  Associated 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 execu-
     tion the process with the highest global scheduling priority
     in the system.)  The priority queues associated with a given
     class are viewed by that class as a contiguous set of prior-
     ity  levels  numbered from 0 (lowest priority) to n (highest
     priority-a configuration-dependent value).  The set of  glo-
     bal  scheduling priorities that the queues for a given class
     are mapped into might not start at zero  and  might  not  be
     contiguous  (depending  on the configuration).  Processes in
     the time-sharing class which are running in user mode (or in
     kernel  mode  before going to sleep) are scheduled according
     to the parameters in  a  time-sharing  dispatcher  parameter
     table (tsdptbl).  (Time-sharing processes running in kernel
     mode after sleeping are run within a special range of prior-
     ities  reserved  for  such processes and are not affected by
     the parameters in the tsdptbl until  they  return  to  user
     mode.)   The  tsdptbl  consists  of  an  array of parameter
     structures (struct tsdpent), one for each of the n priority
     levels  used  by  time-sharing  processes in user mode.  The
     properties of a given priority level i are specified by  the
     ith parameter structure in this array (tsdptbli).  A param-
     eter structure consists of the following members.  These are
     also described in the /usr/include/sys/ts.h header file.

     tsglobpri
             The global scheduling priority associated with  this
             priority  level.   The  mapping between time-sharing
             priority levels and global scheduling priorities  is
             determined at boot time by the system configuration.
             tsglobpri is the only member of the tsdptbl  which
             cannot be changed with dispadmin(1M).

     tsquantum
             The  length  of  the  time  quantum   allocated   to
             processes at this level in ticks (HZ).

     tstqexp
             Priority level of the new queue on which to place  a
             process  running  at the current level if it exceeds



                                                                1





ts_dptbl(4)               FILE FORMATS                ts_dptbl(4)



             its time quantum.  Normally this field  links  to  a
             lower  priority time-sharing level that has a larger
             quantum.

     tsslpret
             Priority level of the new queue on which to place  a
             process,  that  was  previously in user mode at this
             level, when it returns to user mode after  sleeping.
             Normally this field links to a higher priority level
             that has a smaller quantum.

     tsmaxwait
             A per process counter, tsdispwait is initialized to
             zero each time a time-sharing process is placed back
             on the dispatcher queue after its time  quantum  has
             expired  or  when it is awakened (tsdispwait is not
             reset to zero when  a  process  is  preempted  by  a
             higher  priority  process).   This counter is incre-
             mented once per  second  for  each  process  on  the
             dispatcher  queue.  If a process's tsdispwait value
             exceeds the tsmaxwait  value  for  its  level,  the
             process's  priority  is changed to that indicated by
             tslwait.  The purpose of this field is  to  prevent
             starvation.

     tslwait
             Move  a  process  to  this  new  priority  level  if
             tsdispwait is greater than tsmaxwait.

     An administrator can affect the behavior of the time-sharing
     portion  of  the  scheduler  by  reconfiguring the tsdptbl.
     There are two methods available for doing this.

MASTER FILE
     The tsdptbl can be reconfigured at boot time by  specifying
     the  desired  values in the ts master file and reconfiguring
     the system using the auto-configuration boot procedure;  see
     mkboot(1M)  and master(4).  This is the only method that can
     be used to change the number of time-sharing priority levels
     or  the  set  of  global  scheduling  priorities used by the
     time-sharing class.

DISPADMIN CONFIGURATION FILE
     With the exception of tsglobpri all of the members  of  the
     tsdptbl  can  be  examined and modified on a running system
     using the dispadmin(1M) command.  Invoking dispadmin for the
     time-sharing  class allows the administrator to retrieve the
     current tsdptbl 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



                                                                2





ts_dptbl(4)               FILE FORMATS                ts_dptbl(4)



     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 tsquantum 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.
     For example, the finest resolution  currently  available  on
     the 3B2 is 10 milliseconds (1 ``tick'').  If res were 1000 a
     time quantum value of 34 would specify a quantum of 34  mil-
     liseconds,  which  would  be  rounded up to 4 ticks (40 mil-
     liseconds) on the 3B2.  The remaining lines in the file  are
     used  to  specify the parameter values for each of the time-
     sharing priority  levels.   The  first  line  specifies  the
     parameters  for time-sharing level 0, the second line speci-
     fies the parameters for time-sharing level  1,  etc.   There
     must  be  exactly  one line for each configured time-sharing
     priority level.

EXAMPLE
     The following excerpt from a  dispadmin  configuration  file
     illustrates  the format.  Note that for each line specifying
     a set of  parameters  there  is  a  comment  indicating  the
     corresponding  priority level.  These level numbers indicate
     priority within the  time-sharing  class,  and  the  mapping
     between  these time-sharing priorities and the corresponding
     global scheduling priorities is determined by the configura-
     tion specified in the ts master 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.  dispadmin assumes that the lines in the file are
     ordered by consecutive, increasing priority level (from 0 to
     the maximum configured time-sharing  priority).   The  level
     numbers in the comments should normally agree with this ord-
     ering; if for some reason they don't, however, dispadmin  is
     unaffected.
     # Time-Sharing Dispatcher Configuration File
     RES=1000

     # tsquantum tstqexp tsslpret tsmaxwait tslwait  PRIORITY LEVEL
           500        0       10          5        10         #  0
           500        0       11          5        11         #  1
           500        1       12          5        12         #  2
           500        1       13          5        13         #  3
           500        2       14          5        14         #  4
           500        2       15          5        15         #  5
           450        3       16          5        16         #  6
           450        3       17          5        17         #  7



                                                                3





ts_dptbl(4)               FILE FORMATS                ts_dptbl(4)



            .         .        .          .         .         .  .
            .         .        .          .         .         .  .
            .         .        .          .         .         .  .
            50       48       59          5        59         #  58
            50       49       59          5        59         #  59

FILES
     /usr/include/sys/ts.h

SEE ALSO
     dispadmin(1M),    priocntl(1),    priocntl(2),    master(4),
     mkboot(1M)    ``Scheduler''    chapter    in    the   System
     Administrator's Guide

NOTES
     dispadmin does some limited sanity checking  on  the  values
     supplied  in the configuration file.  The sanity checking is
     intended to ensure that the new tsdptbl values do not cause
     the  system  to panic.  The sanity checking does not attempt
     to analyze the effect that the new values will have  on  the
     performance  of the system.  Unusual tsdptbl configurations
     may have a dramatic negative impact on  the  performance  of
     the  system.   No  sanity  checking  is done on the tsdptbl
     values specified in  the  ts  master  file.   Specifying  an
     inconsistent  or  nonsensical tsdptbl configuration through
     the ts master file could cause serious performance  problems
     and/or cause the system to panic.




























                                                                4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026