DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8cf79c6bf⟧ Ada Source

    Length: 14336 (0x3800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Scheduler, pragma Module_Name 4 3923, pragma Subsystem Os_Commands, seg_001b88

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Machine;

package Scheduler is

    subtype Job_Id       is Machine.Job_Id;
    subtype Cpu_Priority is Natural range 0 .. 6;
    subtype Milliseconds is Long_Integer;


    procedure Disable (Job : Job_Id);
    procedure Enable  (Job : Job_Id);
    function  Enabled (Job : Job_Id) return Boolean;

    function Get_Cpu_Priority (Job : Job_Id) return Cpu_Priority;

    type Job_Kind is (Ce, Oe, Attached, Detached, Server, Terminated);
    function Get_Job_Kind (Job : Job_Id) return Job_Kind;

    type Job_State is (Run, Wait, Idle, Disabled, Queued);
    function Get_Job_State (Job : Job_Id) return Job_State;

    -- returns the current state of job.
    --   RUN:      the job is currently runnable
    --   WAIT:     the job is runnable but being withheld by the scheduler.
    --   IDLE:     the job isn't using cpu time and has no unblocked tasks.
    --   DISABLED: an external agent has disabled the job from running.
    --   QUEUED:   the job is DETACHED and must wait for another to complete.

    function Get_Cpu_Time_Used (Job : Job_Id) return Milliseconds;

    -- returns the number of milliseconds of cpu time used by the job.
    -- belongs on the previous page, put here for compatability reasons

    function Disk_Waits (Job : Job_Id) return Long_Integer;

    -- returns the number of disk_waits the job has done since last initialized

    function Working_Set_Size (Job : Job_Id) return Natural;

    -- returns the number of pages in the job's working set.

    subtype Load_Factor is Natural;

    -- for run queues, number of tasks * 100

    procedure Get_Run_Queue_Load (Last_Sample     : out Load_Factor;
                                  Last_Minute     : out Load_Factor;
                                  Last_5_Minutes  : out Load_Factor;
                                  Last_15_Minutes : out Load_Factor);
    -- number of runnable tasks * 100

    procedure Get_Disk_Wait_Load (Last_Sample     : out Load_Factor;
                                  Last_Minute     : out Load_Factor;
                                  Last_5_Minutes  : out Load_Factor;
                                  Last_15_Minutes : out Load_Factor);
    -- number of tasks waiting for a page on the disk wait queue * 100

    procedure Get_Withheld_Task_Load (Last_Sample     : out Load_Factor;
                                      Last_Minute     : out Load_Factor;
                                      Last_5_Minutes  : out Load_Factor;
                                      Last_15_Minutes : out Load_Factor);
    -- returns the average number of tasks withheld from running by
    -- the scheduler * 100. In this call LAST_SAMPLE is the number of tasks
    -- held at the last 100ms scheduling cycle.

    procedure State;

    -- print scheduler state

    procedure Display (Show_Parameters : Boolean := True;
                       Show_Queues     : Boolean := True);
    -- display current scheduler state and queues

    type Job_Descriptor is
        record
            The_Cpu_Priority            : Cpu_Priority;
            The_State                   : Job_State;
            The_Disk_Waits              : Long_Integer;
            The_Time_Consumed           : Milliseconds;
            The_Working_Set_Size        : Natural;
            The_Working_Set_Limit       : Natural;
            The_Milliseconds_Per_Second : Natural;
            The_Disk_Waits_Per_Second   : Natural;
            The_Maps_To                 : Job_Id;
            The_Kind                    : Job_Kind;
            The_Made_Runnable           : Long_Integer;
            The_Total_Runnable          : Long_Integer;
            The_Made_Idle               : Long_Integer;
            The_Made_Wait               : Long_Integer;
            The_Wait_Disk_Total         : Long_Integer;
            The_Wait_Memory_Total       : Long_Integer;
            The_Wait_Cpu_Total          : Long_Integer;
            The_Min_Working_Set_Limit   : Long_Integer;
            The_Max_Working_Set_Limit   : Long_Integer;
        end record;

    function Get_Job_Descriptor (Job : Job_Id) return Job_Descriptor;

    -- use to get a consistent snapshot of a job's statistics.

    generic
        with procedure Put (Descriptor : Job_Descriptor);

    procedure Traverse_Job_Descriptors (First, Last : Job_Id);

    -- use to get a consistent, efficient snapshot of a range of
    -- job's statistics.


    procedure Set (Parameter : String := ""; Value : Integer);
    function  Get (Parameter : String) return Integer;

    -- Programmatic versions of set and display
    --     initial parameters         Default      Units
    --     CPU_Scheduling                  1        1 or 0 (true or false)
    --     Percent_For_Background         10        %
    --     Min_Foreground_Budget        -250        milliseconds (-5000..0)
    --     Max_Foreground_Budget         250        milliseconds (0..5000)
    --     Withhold_Run_Load             130        load * 100
    --     Withhold_Multiple_Jobs          0        1 or 0(true or false)

    --     Memory_Scheduling               1        1 or 0 (true or false)
    --     Environment_Wsl             11000        pages
    --     Min_Ce_Wsl                    400        pages
    --     Max_Ce_Wsl                   1000        pages
    --     Min_Oe_Wsl                    250        pages
    --     Max_Oe_Wsl                   2000        pages
    --     Min_Attached_Wsl               50        pages
    --     Max_Attached_Wsl             2000        pages
    --     Min_Detached_Wsl               50        pages
    --     Max_Detached_Wsl             4000        pages
    --     Min_Server_Wsl                400        pages
    --     Max_Server_Wsl               1000        pages
    --     Daemon_Wsl                    200        pages
    --     Wsl_Decay_Factor               50        pages
    --     Wsl_Growth_Factor              50        pages
    --     Min_Available_Memory         2048        pages
    --     Page_Withdrawl_Rate             1        n*640 pages/sec (n in 0..64)

    --     Disk_Scheduling                 1        1 or 0 (true or false)
    --     Max_Disk_Load                 250        Load_Factor
    --     Min_Disk_Load                 200        Load_Factor

    --     Foreground_Time_Limit          60        seconds
    --     Background_Streams              3
    --     Stream_Time N              2,5,20        minutes
    --     Stream_Jobs N               3,0,0        jobs
    --     Strict_Stream_Policy            0        1 or 0 (true or false)


    procedure Set_Job_Attribute (Job       : Job_Id;
                                 Attribute : String := "Kind";
                                 Value     : String := "Server");
    function  Get_Job_Attribute
                (Job : Job_Id; Attribute : String := "Kind") return String;

    -- These interfaces exist to deal with ongoing changes to scheduler
    -- characteristics without requiring new proedures.
    --
    -- The default parameters to Set_Job_Attributes make the indicated job
    -- a server.
    --
    -- See the documentation for other attributes.


    procedure Set_Wsl_Limits         (Job : Job_Id; Min, Max : Natural);
    procedure Get_Wsl_Limits         (Job : Job_Id; Min, Max : out Natural);
    procedure Use_Default_Wsl_Limits (Job : Job_Id);

    -- Each class of job has a default for working set min and max.
    -- Set_Parameter lets you change the default value. Set_Wsl_Limits lets
    -- you override the default for a specific job.  Use_Default_Wsl_Limits
    -- restores the values to the defaults, cancelling any prior Set_Wsl_Limits
    -- call.
    -- Get_Wsl_Limits returns the current values for a specific job.
    -- Min and Max specify the range (in number of pages) in which the
    -- working set limit is set.  The scheduler chooses the working set
    -- limit based on prevailing conditions on the machine.  If Min and
    -- Max are the same, the a fixed limit is specified.
    -- Min must be less than or equal to Max and Max less than the memory size.
    -- Error messages are sent to an output window in the case of errors.
    -- No message of any kind if success.


    pragma Subsystem (Os_Commands);
    pragma Module_Name (4, 3923);

end Scheduler;

E3 Meta Data

    nblk1=d
    nid=0
    hdr6=1a
        [0x00] rec0=1c rec1=00 rec2=01 rec3=034
        [0x01] rec0=00 rec1=00 rec2=0c rec3=010
        [0x02] rec0=19 rec1=00 rec2=02 rec3=05a
        [0x03] rec0=14 rec1=00 rec2=03 rec3=024
        [0x04] rec0=14 rec1=00 rec2=04 rec3=04e
        [0x05] rec0=05 rec1=00 rec2=0d rec3=020
        [0x06] rec0=17 rec1=00 rec2=05 rec3=074
        [0x07] rec0=00 rec1=00 rec2=0b rec3=002
        [0x08] rec0=12 rec1=00 rec2=06 rec3=026
        [0x09] rec0=14 rec1=00 rec2=07 rec3=060
        [0x0a] rec0=00 rec1=00 rec2=0a rec3=002
        [0x0b] rec0=15 rec1=00 rec2=08 rec3=00e
        [0x0c] rec0=0a rec1=00 rec2=09 rec3=000
    tail 0x20100f04c7da18d50bcc7 0x42a00088462065003