COMPILATION LISTING OF SEGMENT tune_work_class Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1745.3 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 tune_work_class: twc: proc; 12 13 /* Coded by RE Mullen Winter '76 */ 14 /* Recoded RE Mullen Autumn '76 */ 15 /* Modified by M.Pierret 29 October '80 to accept -pin_weight */ 16 /* Modified by J. Bongiovanni June 1981 for governed */ 17 /* Modified by J. Bongiovanni May 1982 for int_queue */ 18 19 dcl linkage_error condition; 20 21 dcl 1 wctu aligned like work_class_tune_info; 22 23 dcl onf bit (1) aligned; 24 dcl f float bin; 25 dcl d fixed bin; 26 dcl i fixed bin; 27 28 dcl me char (16) aligned internal static options (constant) init ("tune_work_class"); 29 30 dcl nargs fixed bin; 31 dcl arg char (al) based (ap); 32 dcl ap ptr; 33 dcl al fixed bin; 34 dcl ca char (16) aligned; /* control arg copied here */ 35 36 dcl hphcs_$tune_work_class entry (ptr, fixed bin (35)); 37 dcl cu_$arg_count entry returns (fixed bin); 38 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 39 dcl cv_float_ entry (char (*), fixed bin (35)) returns (float bin); 40 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin); 41 dcl (com_err_, ioa_) entry options (variable); 42 dcl error_table_$noarg ext static fixed bin (35); 43 44 dcl code fixed bin (35); 45 46 dcl (addr, substr, unspec) builtin; 47 48 49 50 unspec (wctu) = ""b; 51 wctu.wc_number = -1; /* If unchanged, user has blundered */ 52 wctu.version = WCTI_version_3; /* tell hardcore our vintage */ 53 54 nargs = cu_$arg_count (); 55 if nargs = 0 then do; /* the hint convention */ 56 57 call ioa_ ("Usage: tune_work_class -work_class NN param_1 value_1 .."); 58 call ioa_ (" value in seconds: int_response int_quantum response quantum"); 59 call ioa_ (" value on/off: realtime post_purge io_priority int_queue"); 60 call ioa_ (" integer value: wc_max_eligible pin_weight"); 61 call ioa_ (" governed: off or percent"); 62 return; 63 end; 64 65 do i = 1 by 2 while (i <= nargs); 66 /* pick up parameter name */ 67 call cu_$arg_ptr (i, ap, al, code); 68 if code ^= 0 then do; 69 ERR: 70 call com_err_ (code, me, " "); 71 return; 72 end; 73 74 if al = 0 then go to BAD_PARM; 75 if substr (arg, 1, 1) = "-" then do; 76 ca = substr (arg, 2, al-1); 77 end; 78 else ca = arg; 79 80 81 /* pick up parameter value */ 82 call cu_$arg_ptr (i+1, ap, al, code); 83 if code ^= 0 then go to NOARG; 84 85 if ca = "wc" | ca = "work_class" then do; 86 call fix; 87 wctu.wc_number = d; 88 end; 89 else if ca = "ir" | ca = "int_response" then do; 90 wctu.set.resp1 = "1"b; 91 call flo; 92 wctu.resp1 = 1e6 * f; 93 end; 94 else if ca = "r" | ca = "response" then do; 95 wctu.set.resp2 = "1"b; 96 call flo; 97 wctu.resp2 = 1e6 * f; 98 end; 99 else if ca = "iq" | ca = "int_quantum" then do; 100 wctu.set.quantum1 = "1"b; 101 call flo; 102 wctu.quantum1 = 1e6 * f; 103 end; 104 else if ca = "q" | ca = "quantum" then do; 105 wctu.set.quantum2 = "1"b; 106 call flo; 107 wctu.quantum2 = 1e6 * f; 108 end; 109 else if ca = "post_purge" | ca = "pp" then do; 110 wctu.set.purging = "1"b; 111 call chr; 112 wctu.flags.purging = onf; 113 end; 114 else if ca = "wc_maxe" | ca = "wc_max_eligible" then do; 115 wctu.set.maxel = "1"b; 116 call fix; 117 wctu.maxel = d; 118 end; 119 else if ca = "realtime" | ca = "rt" | ca = "realt" then do; 120 wctu.set.realtime = "1"b; 121 call chr; 122 wctu.flags.realtime = onf; 123 end; 124 else if ca = "pin_weight" | ca = "pw" then do; 125 wctu.set.pin_weight = "1"b; 126 call fix; 127 wctu.pin_weight = d; 128 end; 129 else if ca = "io_priority" | ca = "iop" then do; 130 wctu.set.io_priority = "1"b; 131 call chr; 132 wctu.flags.io_priority = onf; 133 end; 134 else if ca = "governed" | ca = "gv" then do; 135 wctu.set.governed = "1"b; 136 if arg = "off" then 137 wctu.max_percent = 0; 138 else do; 139 call fix; 140 if d <= 0 | d > 100 then 141 goto BAD_PERCENT; 142 wctu.max_percent = d; 143 end; 144 end; 145 else if ca = "int_queue" then do; 146 wctu.set.interactive_q = "1"b; 147 call chr; 148 wctu.flags.interactive_q = onf; 149 end; 150 else go to BAD_PARM; 151 152 end; 153 154 if wctu.wc_number = -1 then do; 155 ca = "work_class"; 156 NOARG: call com_err_ (error_table_$noarg, me, "^a", ca); 157 return; 158 end; 159 160 161 on linkage_error begin; 162 call ioa_ ("tune_work_class: This command requires access to hphcs_."); 163 go to MAIN_RETURN; 164 end; 165 166 call hphcs_$tune_work_class (addr (wctu), code); 167 if code ^= 0 then go to ERR; 168 MAIN_RETURN: return; /* come here to bust out */ 169 170 /* ----------------------------------------------------- */ 171 172 173 flo: proc; 174 175 f = cv_float_ (arg, code); 176 if code ^= 0 then go to BAD_NUM; 177 end flo; 178 179 180 181 fix: proc; 182 d = cv_dec_check_ (arg, code); 183 if code ^= 0 then go to BAD_NUM; 184 end fix; 185 186 187 188 chr: proc; 189 190 if arg = "on" then onf = "1"b; 191 else if arg = "off" then onf = "0"b; 192 else go to BAD_ONF; 193 end chr; 194 195 196 BAD_ONF: call com_err_ (0, me, "Value for ^a must be ""on"" or ""off""", ca); 197 return; 198 199 BAD_NUM: call com_err_ (0, me, "Value for ^a is non-numeric: ^a", 200 ca, arg); 201 return; 202 203 204 BAD_PARM: call com_err_ (0, me, "Unrecognized parameter: ^a", ca); 205 return; 206 207 BAD_PERCENT: 208 call com_err_ (0, me, "^a not percent between 1 and 100", arg); 209 return; 210 211 212 /* */ 1 1 /* BEGIN INCLUDE FILE ... work_class_info.incl.pl1 ... Mod REM 1/76 */ 1 2 1 3 1 4 /* This include file provides the structure used to call 1 5* hphcs_$define_work_classes. The version number should be set by 1 6* the caller to WCI_version_N */ 1 7 1 8 dcl wcip ptr; /* pointer on which work_class_info is based */ 1 9 dcl WCI_version_3 fixed bin int static init (3); /* current version of the structure */ 1 10 1 11 dcl 1 work_class_info aligned based (wcip), 1 12 2 version fixed bin, /* version of this structure */ 1 13 2 switches aligned, /* one word of switches */ 1 14 3 user_wc_defined (16) bit (1) unaligned, /* which user work classes are defined ("1"b = defined) */ 1 15 3 set_system_wc bit (1) unaligned, /* = "1"b if percent of system work class to be changed */ 1 16 3 set_user_wc bit (1) unaligned, /* = "1"b if definitions of user work classes to be changed */ 1 17 3 set_sked_mode bit (1) unal, /* "1"b if setting deadline | percent mode */ 1 18 3 set_max_batch_elig bit (1) unal, /* "1"b if setting max batch elig */ 1 19 3 pad bit (16) unal, /* rest of word */ 1 20 2 system_wc_min_pct fixed bin, /* new percent for system work class */ 1 21 2 user_wc_min_pct (16) fixed bin, /* percents for the normal user work classes */ 1 22 2 error_process_id bit (36) aligned, /* returned if we tried to undefine this process's work class */ 1 23 2 error_work_class fixed bin, /* the work class that had the above process in it */ 1 24 /* Version 1 limit */ 1 25 2 flags aligned, 1 26 3 deadline_mode bit (1) unal, /* = "1"b if virtual deadline for the many */ 1 27 3 realtime (16) bit (1) unaligned, /* which user work classes are realtime */ 1 28 3 governed (16) bit (1) unal, /* which work classes are governed ("1"b = defined)*/ 1 29 3 pad bit (3) unal, 1 30 2 max_batch_elig fixed bin, /* if nonzero is max batch elig */ 1 31 2 resp1 (16) fixed bin (35), /* response time after interaction(micro_sec) */ 1 32 2 quantum1 (16) fixed bin (35), /* first time slice after interaction(micro_sec) */ 1 33 2 resp2 (16) fixed bin (35), /* time between sucessive time slices(micro_sec) */ 1 34 2 quantum2 (16) fixed bin (35), /* second and following time slices(micro_sec) */ 1 35 2 wc_max_elig (0:16) fixed bin (35), /* Added if answering service ever decides to use it */ 1 36 2 io_priority (0:16) fixed bin (35), 1 37 2 pin_weight (0:16) fixed bin (35), 1 38 2 user_wc_max_pct (16) fixed bin; /* max percent of total cpu for governed WC */ 1 39 1 40 /* structure for calling hphcs_$tune_work_class */ 1 41 1 42 dcl WCTI_version_3 fixed bin int static init (3); 1 43 1 44 dcl 1 work_class_tune_info aligned based, 1 45 2 version fixed bin, 1 46 2 wc_number fixed bin (35), /* which workclass is to be changed */ 1 47 2 resp1 fixed bin (71), /* time til quantum after interact(micro_sec) */ 1 48 2 resp2 fixed bin (71), /* time between successive quanta(micro_sec) */ 1 49 2 quantum1 fixed bin (35), /* quantum after interaction(micro_sec) */ 1 50 2 quantum2 fixed bin (35), /* successive quanta(micro_sec) */ 1 51 2 maxel fixed bin (35), /* maxeligible for this workclass */ 1 52 2 set aligned, 1 53 3 resp1 bit (1) unal, 1 54 3 resp2 bit (1) unal, 1 55 3 quantum1 bit (1) unal, 1 56 3 quantum2 bit (1) unal, 1 57 3 maxel bit (1) unal, 1 58 3 purging bit (1) unal, 1 59 3 realtime bit (1) unal, 1 60 3 pin_weight bit (1) unal, 1 61 3 io_priority bit (1) unal, 1 62 3 governed bit (1) unal, 1 63 3 interactive_q bit (1) unal, 1 64 3 pad bit (25) unal, 1 65 2 pin_weight fixed bin (35), 1 66 2 max_percent fixed bin (35), 1 67 2 flags aligned, 1 68 3 io_priority bit (1) unal, 1 69 3 purging bit (1) unal, 1 70 3 realtime bit (1) unal, 1 71 3 interactive_q bit (1) unal, 1 72 3 pad bit (33) unal; 1 73 1 74 1 75 /* END INCLUDE FILE ... work_class_info.incl.pl1 */ 213 214 end tune_work_class; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1453.7 tune_work_class.pl1 >dumps>old>recomp>tune_work_class.pl1 213 1 06/21/82 1202.4 work_class_info.incl.pl1 >ldd>include>work_class_info.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. WCTI_version_3 constant fixed bin(17,0) initial dcl 1-42 ref 52 addr builtin function dcl 46 ref 166 166 al 000134 automatic fixed bin(17,0) dcl 33 set ref 67* 74 75 76 76 78 82* 136 175 175 182 182 190 191 199 199 207 207 ap 000132 automatic pointer dcl 32 set ref 67* 75 76 78 82* 136 175 182 190 191 199 207 arg based char unaligned dcl 31 set ref 75 76 78 136 175* 182* 190 191 199* 207* ca 000135 automatic char(16) dcl 34 set ref 76* 78* 85 85 89 89 94 94 99 99 104 104 109 109 114 114 119 119 119 124 124 129 129 134 134 145 155* 156* 196* 199* 204* code 000141 automatic fixed bin(35,0) dcl 44 set ref 67* 68 69* 82* 83 166* 167 175* 176 182* 183 com_err_ 000022 constant entry external dcl 41 ref 69 156 196 199 204 207 cu_$arg_count 000012 constant entry external dcl 37 ref 54 cu_$arg_ptr 000014 constant entry external dcl 38 ref 67 82 cv_dec_check_ 000020 constant entry external dcl 40 ref 182 cv_float_ 000016 constant entry external dcl 39 ref 175 d 000126 automatic fixed bin(17,0) dcl 25 set ref 87 117 127 140 140 142 182* error_table_$noarg 000026 external static fixed bin(35,0) dcl 42 set ref 156* f 000125 automatic float bin(27) dcl 24 set ref 92 97 102 107 175* flags 14 000106 automatic structure level 2 dcl 21 governed 11(09) 000106 automatic bit(1) level 3 packed unaligned dcl 21 set ref 135* hphcs_$tune_work_class 000010 constant entry external dcl 36 ref 166 i 000127 automatic fixed bin(17,0) dcl 26 set ref 65* 65* 67* 82* interactive_q 11(10) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 146* interactive_q 14(03) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 148* io_priority 14 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 132* io_priority 11(08) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 130* ioa_ 000024 constant entry external dcl 41 ref 57 58 59 60 61 162 linkage_error 000100 stack reference condition dcl 19 ref 161 max_percent 13 000106 automatic fixed bin(35,0) level 2 dcl 21 set ref 136* 142* maxel 10 000106 automatic fixed bin(35,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 117* maxel 11(04) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 115* me 000000 constant char(16) initial dcl 28 set ref 69* 156* 196* 199* 204* 207* nargs 000130 automatic fixed bin(17,0) dcl 30 set ref 54* 55 65 onf 000124 automatic bit(1) dcl 23 set ref 112 122 132 148 190* 191* pin_weight 12 000106 automatic fixed bin(35,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 127* pin_weight 11(07) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 125* purging 11(05) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 110* purging 14(01) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 112* quantum1 11(02) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 100* quantum1 6 000106 automatic fixed bin(35,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 102* quantum2 11(03) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 105* quantum2 7 000106 automatic fixed bin(35,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 107* realtime 11(06) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 120* realtime 14(02) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 122* resp1 11 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 90* resp1 2 000106 automatic fixed bin(71,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 92* resp2 4 000106 automatic fixed bin(71,0) level 2 in structure "wctu" dcl 21 in procedure "twc" set ref 97* resp2 11(01) 000106 automatic bit(1) level 3 in structure "wctu" packed unaligned dcl 21 in procedure "twc" set ref 95* set 11 000106 automatic structure level 2 dcl 21 substr builtin function dcl 46 ref 75 76 unspec builtin function dcl 46 set ref 50* version 000106 automatic fixed bin(17,0) level 2 dcl 21 set ref 52* wc_number 1 000106 automatic fixed bin(35,0) level 2 dcl 21 set ref 51* 87* 154 wctu 000106 automatic structure level 1 dcl 21 set ref 50* 166 166 work_class_tune_info based structure level 1 dcl 1-44 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. WCI_version_3 internal static fixed bin(17,0) initial dcl 1-9 wcip automatic pointer dcl 1-8 work_class_info based structure level 1 dcl 1-11 NAMES DECLARED BY EXPLICIT CONTEXT. BAD_NUM 001164 constant label dcl 199 ref 176 183 BAD_ONF 001133 constant label dcl 196 ref 191 BAD_PARM 001224 constant label dcl 204 ref 74 145 BAD_PERCENT 001255 constant label dcl 207 ref 140 ERR 000433 constant label dcl 69 ref 167 MAIN_RETURN 001132 constant label dcl 168 ref 163 NOARG 001034 constant label dcl 156 ref 83 chr 001372 constant entry internal dcl 188 ref 111 121 131 147 fix 001342 constant entry internal dcl 181 ref 86 116 126 139 flo 001312 constant entry internal dcl 173 ref 91 96 101 106 tune_work_class 000266 constant entry external dcl 11 twc 000257 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1550 1600 1426 1560 Length 2006 1426 30 171 122 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME twc 232 external procedure is an external procedure. on unit on line 161 84 on unit flo internal procedure shares stack frame of external procedure twc. fix internal procedure shares stack frame of external procedure twc. chr internal procedure shares stack frame of external procedure twc. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME twc 000106 wctu twc 000124 onf twc 000125 f twc 000126 d twc 000127 i twc 000130 nargs twc 000132 ap twc 000134 al twc 000135 ca twc 000141 code twc THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return fl2_to_fx1 fl2_to_fx2 tra_ext enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ cv_float_ hphcs_$tune_work_class ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000256 50 000273 51 000276 52 000300 54 000302 55 000310 57 000312 58 000326 59 000342 60 000356 61 000372 62 000406 65 000407 67 000414 68 000431 69 000433 71 000456 74 000457 75 000461 76 000466 77 000472 78 000473 82 000476 83 000516 85 000520 86 000530 87 000531 88 000533 89 000534 90 000544 91 000546 92 000547 93 000553 94 000554 95 000564 96 000566 97 000567 98 000573 99 000574 100 000604 101 000606 102 000607 103 000613 104 000614 105 000624 106 000626 107 000627 108 000633 109 000634 110 000644 111 000646 112 000647 113 000654 114 000655 115 000665 116 000667 117 000670 118 000672 119 000673 120 000707 121 000711 122 000712 123 000717 124 000720 125 000730 126 000732 127 000733 128 000735 129 000736 130 000746 131 000750 132 000751 133 000755 134 000756 135 000766 136 000770 139 001000 140 001001 142 001005 144 001006 145 001007 146 001013 147 001015 148 001016 152 001023 154 001026 155 001031 156 001034 157 001062 161 001063 162 001077 163 001112 166 001115 167 001130 168 001132 196 001133 197 001163 199 001164 201 001223 204 001224 205 001254 207 001255 209 001311 173 001312 175 001313 176 001337 177 001341 181 001342 182 001343 183 001367 184 001371 188 001372 190 001373 191 001404 193 001411 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved