MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


File Formats                                          fxdptbl(4)



NAME
     fxdptbl - fixed priority dispatcher parameter table

SYNOPSIS
     fxdptbl


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 execution the pro-
     cess with the highest global scheduling priority in the sys-
     tem.  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 contiguous, depend-
     ing on the configuration.


     Processes in the fixed priority class are scheduled  accord-
     ing to the parameters in a fixed-priority dispatcher parame-
     ter table (fxdptbl). The  fxdptbl  table  consists  of  an
     array  (configfxdptbl[])  of  parameter structures (struct
     fxdpentt), one for each of the n priority  levels  used  by
     fixed  priority  processes  in user mode. The structures are
     accessed by way of a pointer, (fxdptbl), to the array.  The
     properties  of a given priority level i are specified by the
     ith parameter structure in this array (fxdptbl[i]).


     A parameter structure consists  of  the  following  members.
     These   are  also  described  in  the  /usr/include/sys/fx.h
     header.

     fxglobpri    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.  fxglobpri
                   can not be changed with dispadmin(1M).






SunOS 5.11          Last change: 15 Oct 2002                    1






File Formats                                          fxdptbl(4)



     fxquantum    The length of the time  quantum  allocated  to
                   processes  at  this  level  in ticks (hz). The
                   time quantum value is only a default or start-
                   ing value for processes at a particular level,
                   as the time quantum of a fixed  priority  pro-
                   cess  can  be  changed  by  the  user with the
                   priocntl(1) command or the priocntl(2)  system
                   call.

                   In the high resolution clock mode  (hirestick
                   set  to  1),  the  value of hz is set to 1000.
                   Increase quantums to maintain the  same  abso-
                   lute time quantums.

                   An administrator can affect  the  behavior  of
                   the fixed priority portion of the scheduler by
                   reconfiguring  the  fxdptbl.  There  are  two
                   methods  available for doing this: reconfigure
                   with a loadable  module  at  boot-time  or  by
                   using dispadmin(1M) at run-time.


  fxdptbl Loadable Module
     The fxdptbl can be reconfigured with a loadable module that
     contains  a  new  fixed  priority dispatch table. The module
     containing the dispatch table is separate from the FX  load-
     able  module,  which contains the rest of the fixed priority
     software. This is the only method that can be used to change
     the  number  of fixed priority priority levels or the set of
     global scheduling priorities  used  by  the  fixed  priority
     class.  The  relevant procedure and source code is described
     in Replacing the fxdptbl Loadable Module below.

  dispadmin Configuration File
     The fxquantum values in the fxdptbl can  be  examined  and
     modified  on  a  running system using the dispadmin(1M) com-
     mand. Invoking dispadmin for the fixed-priority class allows
     the  administrator  to  retrieve the current fxdptbl confi-
     guration 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 as follows:

         o    Blank lines are ignored and any part of a  line  to
              the right of a # symbol is treated as a comment.

         o    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




SunOS 5.11          Last change: 15 Oct 2002                    2






File Formats                                          fxdptbl(4)



              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 you can  specify  very  fine  (nanosecond)
              resolution, the time quantum lengths are rounded up
              to the next integral multiple of the system clock's
              resolution.

         o    The remaining lines in the file are used to specify
              the  fxquantum  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, and so forth. There must be exactly one line for
              each configured fixed priority priority level. Each
              fxquantum  entry must be a positive integer speci-
              fying the desired time quantum  in  the  resolution
              given by res.


     See Examples for an example of an  excerpt  of  a  dispadmin
     configuration file.

  Replacing the fxdptbl Loadable Module
     To change the size of the fixed priority dispatch table, you
     must  build  the  loadable module that contains the dispatch
     table information. Save the existing module before using the
     following procedure.

         1.   Place the dispatch table code shown below in a file
              called  fxdptbl.c.  See  EXAMPLES,  below,  for an
              example of this file.

         2.   Compile the code using the  given  compilation  and
              link lines supplied:

                cc -c -0 -DKERNEL fxdptbl.c
                ld -r -o FXDPTBL fxdptbl.o



         3.   Copy    the    current    dispatch     table     in
              /usr/kernel/sched to FXDPTBL.bak.

         4.   Replace the current FXDPTBL in /usr/kernel/sched.

         5.   Make changes in the /etc/system file to reflect the
              changes  to the sizes of the tables. See system(4).
              The variables affected is  fxmaxupri.  The  syntax
              for setting this is as follows:




SunOS 5.11          Last change: 15 Oct 2002                    3






File Formats                                          fxdptbl(4)



                set  FX:fxmaxupri=(value for max fixed-priority user priority)



         6.   Reboot the system to use the new dispatch table.


     Exercise great care in using the preceding method to replace
     the  dispatch  table.  A  mistake can result in panics, thus
     making the system unusable.

EXAMPLES
     Example 1 Configuration File Excerpt


     The following excerpt from a  dispadmin  configuration  file
     illustrates  the  correct  format.  Note that, for each line
     specifying a set of parameters, there is a comment  indicat-
     ing  the  corresponding  priority level. These level numbers
     indicate priority within the fixed priority class; the  map-
     ping   between   these  fixed-priority  priorities  and  the
     corresponding global scheduling priorities is determined  by
     the configuration specified in the FXDPTBL loadable module.
     The level numbers are strictly for the  convenience  of  the
     administrator  reading  the  file  and, as with any comment,
     they are ignored by dispadmin. The dispadmin command assumes
     that  the  lines  in  the  file  are ordered by consecutive,
     increasing priority level (from 0 to the maximum  configured
     fixed-priority  priority).  For  the sake of someone reading
     the file, the level numbers in  the  comments  should  agree
     with  this ordering. If for some reason they do not, dispad-
     min is unaffected.


       # Fixed Priority Dispatcher Configuration File RES=1000

       RES=1000
       #   TIME QUANTUM              PRIORITY
       # (fxquantum)                LEVEL
       200                           #   0
       200                           #   1
       200                           #   2
       200                           #   3
       200                           #   4
       200                           #   5
       200                           #   6
       200                           #   7
        .                            .   .
        .                            .   .
        .                            .   .
       20                            #   58
       20                            #   59



SunOS 5.11          Last change: 15 Oct 2002                    4






File Formats                                          fxdptbl(4)



       20                            #   60



     Example 2 fxdptbl.c File Used for Building the New fxdptbl


     The following is an example of a fxdptbl.c  file  used  for
     building the new fxdptbl.


       /* BEGIN fxdptbl.c */

       #include 
       #include 
       #include 
       #include 
       #include 
       #include 


       /*
        * This is the loadable module wrapper.
        */

       #include 

       extern struct modops modmiscops;

       /*
        * Module linkage information for the kernel.
        */

       static struct modlmisc modlmisc = {
          &modmiscops, "Fixed priority dispatch table"
       };

       static struct modlinkage modlinkage = {
          MODREV1, &modlmisc, 0
       };

       init()
       {
          return (modinstall(&modlinkage));
       }

       info(modinfop)
          struct modinfo *modinfop;
       {
          return (modinfo(&modlinkage, modinfop));
       }




SunOS 5.11          Last change: 15 Oct 2002                    5






File Formats                                          fxdptbl(4)



       #define FXGPUP0 0   /* Global priority for FX user priority 0 */
       fxdpentt configfxdptbl[] = {

       /*  glbpri      qntm */

          FXGPUP0]0,   20,
          FXGPUP0]1,   20,
          FXGPUP0]2,   20,
          FXGPUP0]3,   20,
          FXGPUP0]4,   20,
          FXGPUP0]5,   20,
          FXGPUP0]6,   20,
          FXGPUP0]7,   20,
          FXGPUP0]8,   20,
          FXGPUP0]9,   20,
          FXGPUP0]10,  16,
          FXGPUP0]11,  16,
          FXGPUP0]12,  16,
          FXGPUP0]13,  16,
          FXGPUP0]14,  16,
          FXGPUP0]15,  16,
          FXGPUP0]16,  16,
          FXGPUP0]17,  16,
          FXGPUP0]18,  16,
          FXGPUP0]19,  16,
          FXGPUP0]20,  12,
          FXGPUP0]21,  12,
          FXGPUP0]22,  12,
          FXGPUP0]23,  12,
          FXGPUP0]24,  12,
          FXGPUP0]25,  12,
          FXGPUP0]26,  12,
          FXGPUP0]27,  12,
          FXGPUP0]28,  12,
          FXGPUP0]29,  12,
          FXGPUP0]30,   8,
          FXGPUP0]31,   8,
          FXGPUP0]32,   8,
          FXGPUP0]33,   8,
          FXGPUP0]34,   8,
          FXGPUP0]35,   8,
          FXGPUP0]36,   8,
          FXGPUP0]37,   8,
          FXGPUP0]38,   8,
          FXGPUP0]39,   8,
          FXGPUP0]40,   4,
          FXGPUP0]41,   4,
          FXGPUP0]42,   4,
          FXGPUP0]43,   4,
          FXGPUP0]44,   4,
          FXGPUP0]45,   4,
          FXGPUP0]46,   4,



SunOS 5.11          Last change: 15 Oct 2002                    6






File Formats                                          fxdptbl(4)



          FXGPUP0]47,   4,
          FXGPUP0]48,   4,
          FXGPUP0]49,   4,
          FXGPUP0]50,   4,
          FXGPUP0]51,   4,
          FXGPUP0]52,   4,
          FXGPUP0]53,   4,
          FXGPUP0]54,   4,
          FXGPUP0]55,   4,
          FXGPUP0]56,   4,
          FXGPUP0]57,   4,
          FXGPUP0]58,   4,
          FXGPUP0]59,   2,
          FXGPUP0]60    2,
       };



       prit configfxmaxumdpri =
                       sizeof (configfxdptbl) / sizeof (fxdpentt) - 1;

       /*
        * Return the address of configfxdptbl
        */
       fxdpentt *
       fxgetdptbl()
       {
          return (configfxdptbl);
       }

       /*
        * Return the address of fxmaxumdpri
        */
       prit
       fxgetmaxumdpri()
       {
       /*
        * the configfxdptbl table.
        */
          return (configfxmaxumdpri);
       }



SEE ALSO
     priocntl(1), dispadmin(1M), priocntl(2), system(4)


     System Administration  Guide,  Volume  1,  System  Interface
     Guide





SunOS 5.11          Last change: 15 Oct 2002                    7






File Formats                                          fxdptbl(4)



NOTES
     In order to improve performance  under  heavy  system  load,
     both  the  nfsd daemon and the lockd daemon utilize the max-
     imum priority in the FX class. Unusual  fxdptbl  configura-
     tions  may  have  significant negative impact on the perfor-
     mance of the nfsd and lockd daemons.

















































SunOS 5.11          Last change: 15 Oct 2002                    8



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™