1 /* ***********************************************************
  2    *                                                         *
  3    * Copyright, (C) Honeywell Bull Inc., 1987                *
  4    *                                                         *
  5    * Copyright, (C) Honeywell Information Systems Inc., 1984 *
  6    *                                                         *
  7    * Copyright (c) 1972 by Massachusetts Institute of        *
  8    * Technology and Honeywell Information Systems, Inc.      *
  9    *                                                         *
 10    *********************************************************** */
 11 
 12 /* TC_DATA - This is the Traffic Controller Database. */
 13 /* Last modified (Date and reason):
 14    2/6/76 by S. Webber Initial coding
 15    6/20/79 by Mike Grady to init max_maxe
 16    3/4/81 by J. Bongiovanni not to set prds_length (it's done from the header
 17          or the TBLS Config Card)
 18    3/21/81 by J. Bongiovanni for max_stopped_stack_0, initialization NTO,
 19          response time metering
 20    6/27/81 by J. Bongiovanni for tuning parameter changes (-tcpu, +pre_empt_sample_time,
 21          gp_at_notify and gp_at_ptlnotify off by default
 22    1/82 BIM for stk truncation tuning parms.
 23    4/27/82 by J. Bongiovanni to change post_purge to OFF
 24    August 1982, J. Bongiovanni, for realtime_io parameters
 25    830916 to replace tty_polling_time with opc_polling_time... -E. A. Ranzenbach
 26    840120 to initialize apt_size by Keith Loepere
 27    841029 by M. Pandolf to init tc_suspend_lock
 28    841206 for next_ring0_timer by Keith Loepere.
 29 */
 30 
 31 tc_data: proc;
 32 
 33 /* This program creates the tc_data base */
 34 
 35 /* Automatic */
 36 
 37 dcl 1 cdsa aligned like cds_args;
 38 dcl  code fixed bin (35);
 39 dcl  big_time fixed bin (71);
 40 
 41 /* Based */
 42 
 43 dcl 1 tc_data aligned like tcm based (tcmp);
 44 
 45 /* Static */
 46 
 47 dcl  exclude_pad (1) char (32) aligned static options (constant) init ("pad*");
 48 
 49 /* Builtins */
 50 
 51 dcl (addr, bin, null, rel, size, string, unspec) builtin;
 52 
 53 /* Entries */
 54 
 55 dcl  com_err_ entry options (variable);
 56 dcl  create_data_segment_ entry (ptr, fixed bin (35));
 57 dcl  get_temp_segment_ entry (char (*), ptr, fixed bin (35));
 58 dcl  release_temp_segment_ entry (char (*), ptr, fixed bin (35));
 59 
 60 
 61 ^L
 62 
 63           call get_temp_segment_ ("tc_data", tcmp, code);
 64 
 65 /* Check offsets assumed by BOS */
 66 
 67           call check_offset_for_bos (addr (tc_data.apt_offset), 171, "apt_offset");
 68           call check_offset_for_bos (addr (tc_data.apt_size), 203, "apt_size");
 69           call check_offset_for_bos (addr (tc_data.apt_entry_size), 215, "apt_entry_size");
 70 
 71 
 72           tc_data.apt_offset = rel (addr (tc_data.apt));
 73           tc_data.apt_lock = -1;                            /* -1 = unlocked */
 74           tc_data.metering_lock = -1;                       /* 0 = locked */
 75           tc_data.working_set_factor = 1;
 76           tc_data.ncpu = 0;
 77           tc_data.itt_size = 155;
 78           tc_data.dst_size = 155;
 79           tc_data.apt_size = 40;
 80           tc_data.initializer_id = (36)"1"b;
 81           tc_data.max_eligible = 6*262144;
 82           tc_data.max_max_eligible = 16*262144;
 83           tc_data.max_stopped_stack_0 = 4;
 84           tc_data.apt_entry_size = size (apte);
 85           tc_data.pds_length = 1024;
 86 
 87           tc_data.interactive_q.fp = rel (addr (tc_data.interactive_q));
 88           tc_data.interactive_q.bp = rel (addr (tc_data.interactive_q));
 89           tc_data.interactive_q.sentinel = (36)"1"b;
 90 
 91           tc_data.max_hproc_segno = 191;                    /* largest (default) hardcore segment number */
 92           tc_data.dst_ptr = null;
 93           tc_data.old_user = null;
 94           tc_data.tefirst = 2000000;
 95           tc_data.telast = 2000000;
 96           tc_data.timax = 8000000;
 97           tc_data.process_initial_quantum = 2000000;
 98           tc_data.gp_at_notify = 0;                         /* off by default */
 99           tc_data.gp_at_ptlnotify = 0;                      /* off by default */
100           tc_data.pre_empt_sample_time = 40000;             /* 40 milliseconds */
101           tc_data.max_timer_register = 40000;
102 
103           tc_data.tc_suspend_lock = ""b;
104 
105           tc_data.sort_to_elhead = 1;
106           tc_data.auto_tune_ws = 1;
107           tc_data.ocore = .01b;
108           tc_data.stk_truncate = "1"b;
109           tc_data.stk_truncate_always = "0"b;
110 
111 /* See fast_hc_ipc, but the rolling average of steps/block is calculated */
112 /* as NEW_AVERAGE = factor*NEW_VALUE + (1-factor)*OLD_AVERAGE */
113 
114           tc_data.stk_trunc_avg_f1 = 0.9375; /* 15/16 */
115           tc_data.stk_trunc_avg_f2 = 1b - tc_data.stk_trunc_avg_f1;
116 
117           tc_data.lock_error_severity = 1; /* CRASH */
118 
119           tc_data.realtime_q.fp = rel (addr (tc_data.realtime_q));
120           tc_data.realtime_q.bp = rel (addr (tc_data.realtime_q));
121           tc_data.realtime_q.sentinel = (36)"1"b;
122 
123           tc_data.eligible_q_head.fp = rel (addr (tc_data.eligible_q_tail));
124           tc_data.eligible_q_head.bp = "0"b;
125           tc_data.eligible_q_head.sentinel = (36)"1"b;
126 
127           tc_data.eligible_q_tail.fp = rel (addr (tc_data.idle_tail));
128           tc_data.eligible_q_tail.bp = rel (addr (tc_data.eligible_q_head));
129           tc_data.eligible_q_tail.sentinel = (36)"1"b;
130 
131           tc_data.idle_tail.fp = "0"b;
132           tc_data.idle_tail.bp = rel (addr (tc_data.eligible_q_tail));
133           tc_data.idle_tail.sentinel = (36)"1"b;
134 
135           tc_data.min_eligible = 2*262144;
136           tc_data.guaranteed_elig_inc = 250000;
137           tc_data.priority_sched_inc = 80000000;
138           tc_data.int_q_enabled = 1;
139           tc_data.fnp_buffer_threshold = 30;                /* fnp tries to keep > this many free buff */
140 
141           unspec (big_time) = "000000000000000000001111111111111111111111111111111111111111111111111111"b;
142           tc_data.end_of_time = big_time;
143           tc_data.next_alarm_time = big_time;               /* gets zeroed by tc_init$part_2 */
144           tc_data.priority_sched_time = big_time;
145           tc_data.opc_polling_time = big_time;
146           tc_data.disk_polling_time = big_time;
147           tc_data.tape_polling_time = big_time;
148           tc_data.imp_polling_time = big_time;
149           tc_data.mos_polling_time = big_time;
150           tc_data.volmap_polling_time = big_time;
151           tc_data.next_ring0_timer = big_time;
152           tc_data.realtime_io_deadline = 0;
153           tc_data.realtime_io_quantum = 5000;               /* 5 milliseconds */
154 
155           tc_data.max_channels = 6;
156 
157           tc_data.init_wait_timeout = 5000000;              /* 5 second NTO during initialization             */
158           tc_data.init_timeout_severity = 0;                /* beep                                           */
159           tc_data.vcpu_response_bounds_size = VCPU_RESPONSE_BOUNDS;
160           tc_data.vcpu_response_bounds (1) = 500000;        /* 1/2 second                                     */
161           tc_data.vcpu_response_bounds (2) = 1000000;       /* 1 second                                       */
162           tc_data.vcpu_response_bounds (3) = 10000000;      /* 10 seconds                                     */
163 
164 
165           tc_data.default_procs_required = (8) "1"b;        /* all CPUs */
166 /* Now set up call to create data base */
167 
168           cdsa.sections (1).p = addr (tc_data);
169           cdsa.sections (1).len = size (tc_data);
170           cdsa.sections (1).struct_name = "tc_data";
171 
172           cdsa.seg_name = "tc_data";
173           cdsa.num_exclude_names = 1;
174           cdsa.exclude_array_ptr = addr (exclude_pad);
175 
176           string (cdsa.switches) = "0"b;
177           cdsa.switches.have_text = "1"b;
178 
179           call create_data_segment_ (addr (cdsa), code);
180 
181           call release_temp_segment_ ("tc_data", tcmp, code);
182 
183 ^L
184 check_offset_for_bos:
185           proc (item_ptr, bos_offset, item_name);
186 
187           dcl item_ptr ptr;                                 /* pointer to item in tc_data                     */
188           dcl bos_offset fixed bin (18);                    /* location assumed by BOS                        */
189           dcl item_name char (*);                           /* name of item in structure                      */
190 
191           if bin (rel (item_ptr)) ^= bos_offset
192                then call com_err_ (0, "tc_data", "^a not at BOS-assumed offset (^d=^oo)",
193                item_name, bos_offset, bos_offset);
194 
195 
196      end check_offset_for_bos;
197 
198 
199 
200 
201 ^L
202 
203 % include cds_args;
204 
205 ^L
206 
207 % include apte;
208 
209 ^L
210 
211 % include tcm;
212 
213 ^L
214 
215 % include hc_lock;
216 
217      end tc_data;