-- $Id: sizes.ads,v 1.1 2003/11/18 01:30:12 baker Exp baker $ -- configurable values that define the experiments to run with Ada.Text_IO; use Ada.Text_IO; with System_Type; use System_Type; with Random_Tools; use Random_Tools; package Sizes is -- common declarations of programs "test_all", "test_rms", and "psizes". type Int_Array is array (Integer range <>) of Integer; type Float_Array is array (integer range <>) of float; -- ??? consider moving type declarations like these into a separate package -- set of values to try for average inter-arrival time -- of jobs for aperiodic server subtype IATS is integer range 1..3; Interarrival_Time_Data: constant Float_Array(IATS):= (1800.0, 3600.0, 5400.0); -- number of different periodic task -- sets we want to test subtype Runs is integer range 1..3; -- set of load levels for the aperiodic subtype Loads is integer range 1..11; type Float_Table is array(Runs) of Float_Array(Loads); Aperiodic_Load: constant Float_Table:= ((0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55), (0.025, 0.05, 0.075, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275), (0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11)); Server_Period: constant:= 5400; -- set of average utilization values for the -- periodic task set that is competing with -- the aperiodic server U: constant Int_Array(Runs):= (40,69,88); -- ??? consider allow a variable number of periodic tasks -- This would require a way of telling what this value -- should be for each run. -- ??? consider computing utlization values from -- the periodic task sets (below), rather than hard-coding -- here as separate constants; it would be less trouble -- if we want to change the task sets -- periodic task sets to run -- in competition with the aperiodic server -- 40% utilization Process_List_40: constant System_Type.Process_List:= ((0, 200, 5400), -- (first release time, execution time, period) (0, 600, 10800), (0, 1600, 21600), (0, 3000, 27000), (0, 400, 36000), (0, 1200, 43200), (0, 1000, 54000), (0, 1500, 67500), (0, 1000,108000), (0, 4000,120000)); -- 69% utilization Process_List_69: constant Process_List:= ((0, 600, 5400), (0, 600, 14400), (0, 500, 24000), (0, 6400, 43200), (0, 3000, 54000), (0, 4500, 67500), (0, 7200, 72000), (0, 3600, 90000), (0, 2000,108000), (0,10500,120000)); -- 88% utilization Process_List_88: constant Process_List:= ((0, 300, 5400), (0, 1000, 10800), (0, 2800, 21600), (0, 1400, 30000), (0, 7200, 43200), (0,11000, 54000), (0, 3600, 60000), (0, 6600, 90000), (0, 2000,108000), (0, 4000,120000)); -- ??? consider combining the utilization levels -- and the corresponding process lists into a single -- array of structures, indexed by run number type Process_Table is array(Runs) of Process_List; Processes: constant Process_Table:= (Process_List_40, Process_List_69, Process_List_88); -- list of aperiodic server algorithms type Servers is (BGS, PLS, DDS, DSS, DXS); -- BGS = Background Server -- PLS = Polling Server -- DDS = Deferrable Server -- DSS = Sporadic Server -- DXS = Exchange Server -- We abuse these names for both deadline and fixed-task-priority -- variants of the algorithms, in different applications. type Server_Size_List is array (Servers) of Integer; type Server_Size_Table is array (Runs) of Server_Size_List; -- Maximum server budgets for Rate Monotonic versions -- of servers, based on utliization bound. -- Budgets for DDS and DXS are lower, because the -- analyses for these are different. RM_Size: constant Server_Size_Table:= ((BGS|PLS|DSS=>3160, DDS=>3181, DXS=>3093), (BGS|PLS|DSS=>1109, DDS=>1081, DXS=>1085), (BGS|PLS|DSS=> 125, DDS=> 117, DXS=> 117)); -- Maximum server budget for deadline-bases versions -- of servers. -- Maximum server budgets for Rate Monotonic version -- of servers, based on utliization bound. EDF_Size: constant Server_Size_Table:= ((BGS|PLS|DSS|DXS=>3240, DDS=>3181), -- (BGS|PLS|DSS|DXS=>1674, DDS=>1622), (BGS|PLS|DSS|DXS|DDS=>1400), (BGS|PLS|DSS|DXS=> 648, DDS=> 623)); -- Seeds for pseudo-random number generator. -- Need to change these if we want to try different -- random experiments. Default_I: constant Seed_Range_1:= 18; Default_J: constant Seed_Range_1:= 40; Default_K: constant Seed_Range_1:= 69; Default_L: constant Seed_Range_2:= 88; type Float_Cube is array(Servers) of Float_Table; -- statistics, indexed by: -- 1) type of server -- 2) run (corresponding to periodic load level) -- ???? Why are these in this package? -- they are not configurable values. -- average response time of aperiodic request Avg: Float_Cube:= (others=> (others=> (others=> 1.0))); -- standard deviation SD: Float_Cube:= (others=> (others=> (others=> 1.0))); -- maximum Max: Float_Cube:= (others=> (others=> (others=> 1.0))); -- utilization Util: Float_Cube:= (others=> (others=> (others=> 1.0))); type Int_Table is array(Runs) of Int_Array(Loads); type Int_Cube is array(Servers) of Int_Table; -- time usage break down, indexed by: -- 1) type of server -- 2) run (corresponding to periodic load level) -- These are used to check consistency of the simulation, -- to verify that we have not used more or less time -- than should have elapsed on the clock. -- ???? Why are these in this package? -- they are not configurable values. Reqstd: Int_Cube:= (others=> (others=> (others=> 1))); Comptd: Int_Cube:= (others=> (others=> (others=> 1))); Missed: Int_Cube:= (others=> (others=> (others=> 1))); -- execution time consumed Exec: Int_Cube:= (others=> (others=> (others=> 1))); -- constants used to compute various confidence levels Z90: constant:= 1.6449; -- for 90% confidence interval Z95: constant:= 1.9600; -- for 95% confidence interval Z99: constant:= 2.5758; -- for 99% confidence interval -- Number of times to repeat the experiments; -- the default value can be overridden by the command line. Repeat: integer:= 1; -- output files -- for LaTeX to produce tables. -- and for Gnuplot to produce plots. Tex, Plot: File_Type; -- ???? Why are these files in this package? -- they are not configurable values. end Sizes;