COMPILATION LISTING OF SEGMENT mcs_timer_daemon Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 0938.4 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* *********************************************************** */ 8 9 /* format: style4,delnl,insnl,ifthenstmt,indnoniterend */ 10 mcs_timer_daemon: 11 procedure; 12 13 dcl mcs_timer$poll entry returns (fixed bin (71)); 14 dcl pxss$block entry; 15 dcl set_alarm_timer entry (fixed bin (71), fixed bin, fixed bin (71)); 16 dcl syserr entry options (variable); 17 18 dcl next_time fixed bin (71); 19 20 dcl any_other condition; 21 22 dcl addr builtin; 23 24 /* * * * * * * * * * MCS_TIMER_DAEMON * * * * * * * * * * */ 25 26 reinit: 27 ttybp = addr (tty_buf$); 28 on any_other 29 begin; 30 call syserr (CRASH, "mcs_timer_daemon: Unexpected fault."); 31 goto reinit; 32 end; 33 34 do while ("1"b); 35 next_time = mcs_timer$poll (); 36 if next_time > 0 then call set_alarm_timer (next_time, 2, tty_buf.timer_ev_chn); 37 call pxss$block (); 38 end; 39 1 1 /* BEGIN INCLUDE FILE ... tty_buf.incl.pl1 */ 1 2 1 3 /* Date Last Modified and Reason 1 4* Created 04/19/77 by J. Stern (from part of tty.incl.pl1) 1 5* Modified January 1978 by Robert Coren and Larry Johnson for variable-size buffers 1 6* Modified 2/6/78 by Robert Coren to make circular_queue size settable 1 7* Modified Aug 78 by J. Nicholls to move the buffer block format to a file of its own 1 8* and wtcb to its own plus other modification for ring 0 multiplexing, tty_buffer_block.incl.pl1 1 9* Modified 7/17/79 by B. Greenberg for echo negotiation meters. 1 10* Modified November 1979 by C. Hornig for MCS tracing. 1 11* Modified December 1979 by Robert Coren to add FNP channel lock meter 1 12* Modified February 1980 by Robert Coren to remove all references to circular buffer 1 13* Modified March 1980 by Robert Coren to reorganize metering information 1 14* Modified December 1980 by Robert Coren to add FNP-specific events 1 15* Modified 24 March 1982, W. Olin Sibert, to add mcs_timer support, recoverable_error_severity 1 16* Modified November 1984 by Robert Coren to add tty_area_lock 1 17**/ 1 18 1 19 dcl ttybp ptr, 1 20 tty_buf$ ext static, /* tty buffer segment */ 1 21 tty_ev fixed bin int static options (constant) init (57), /* event used for wait and notify */ 1 22 abs_buf_limit fixed bin (18) static options (constant) init (64), /* minimum number of words we will leave free */ 1 23 input_bpart fixed bin (18) static options (constant) init (2), /* fraction of bleft we will allow for input */ 1 24 output_bpart fixed bin (18) static options (constant) init (4); /* fraction of bleft we will allow for output */ 1 25 1 26 1 27 dcl qblock_size fixed bin int static options (constant) init (16); /* size in words of a delay queue block */ 1 28 dcl bsizec fixed bin int static options (constant) init (60); /* number of characters in smallest buffer */ 1 29 dcl buf_per_second fixed bin int static options (constant) init (10); /* for figuring out max. buffer size based on speed */ 1 30 1 31 dcl FNP_DUMP_PATCH_EVENT fixed bin int static options (constant) init (58); 1 32 dcl FNP_METER_EVENT fixed bin int static options (constant) init (59); 1 33 dcl TTY_AREA_LOCK_EVENT bit (36) aligned int static options (constant) init ("74"b3); 1 34 1 35 dcl 1 tty_buf aligned based (ttybp), /* declaration of tty buffer seg */ 1 36 2 slock bit (36), /* per system lock */ 1 37 2 absorig fixed bin (24), /* abs address of this seg */ 1 38 2 borig bit (18), /* index of start of buffer area */ 1 39 2 bleft fixed bin (18), /* words left in pool */ 1 40 2 free bit (18), /* pointer to start of free pool */ 1 41 2 fnp_config_flags (8) bit (1) unal, /* flag(i) ON if fnp(i) configured */ 1 42 2 padb1 bit (28) unaligned, 1 43 2 lct_ptr ptr, /* pointer to logical channel table */ 1 44 1 45 2 nrawread fixed bin (35), /* number of raw chars input, total */ 1 46 2 nrawwrite fixed bin (35), /* number of raw characters output */ 1 47 2 ninchars fixed bin (35), /* total input chars after conversion */ 1 48 2 noutchars fixed bin (35), /* total output chars before conversion */ 1 49 2 readblocked fixed bin (35), /* number of times go input blocked */ 1 50 2 nblocked fixed bin (35), /* number of times process output blocked */ 1 51 2 minbuf fixed bin (18), /* min output buffer size */ 1 52 2 totbuf fixed bin (35), /* divide by nblocked to get ave buffer size */ 1 53 1 54 2 preconverted fixed bin (35), /* number of converted chars held in tty_buf */ 1 55 2 input_restart fixed bin, /* number of times tty_read had to start over */ 1 56 2 output_restart fixed bin, /* number of times tty_write has had to start over */ 1 57 2 output_buffer_overflow fixed bin, /* number of times tty_write has run out of buffers */ 1 58 2 read_time fixed bin (71), /* total time spent in tty_read */ 1 59 2 write_time fixed bin (71), /* total time spent in tty_write */ 1 60 1 61 2 read_calls fixed bin (35), /* number of calls to tty_read */ 1 62 2 write_calls fixed bin (35), /* number of calls to tty_write */ 1 63 2 bfx fixed bin, /* used in calls to iobm */ 1 64 2 nquits fixed bin (35), /* number of quits */ 1 65 2 space_needed_data, 1 66 3 space_needed bit (1) unal, /* space_needed bit on in at least 1 lcte */ 1 67 3 space_needed_calls fixed bin (34) unal, /* meter of uses of this facility */ 1 68 2 space_lock_count fixed bin (35), /* count of times tty_buf.slock locked */ 1 69 2 space_lock_wait_count fixed bin (35), /* count of times necessary to loop to lock it */ 1 70 2 space_lock_wait_time fixed bin (35), /* total time looped trying to lock it */ 1 71 1 72 2 alloc_calls fixed bin (35), /* total number of allocations performed in tty_buf */ 1 73 2 free_calls fixed bin (35), /* total number of freeings in tty_buf */ 1 74 2 alloc_time fixed bin (35), /* time spent masked in tty_space_man$get entries */ 1 75 2 free_time fixed bin (35), /* time spent masked in tty_space_man$free entries */ 1 76 2 total_alloc_steps fixed bin (35), /* number of steps thru free chain while doing above */ 1 77 2 alloc_failures fixed bin (35), /* number of unsuccessful attempts to allocate space */ 1 78 2 cumulative_input_space fixed bin (71), /* cumulative amount of space allocated for input */ 1 79 1 80 2 cumulative_output_space fixed bin (71), /* cumulative amount of space allocated for output */ 1 81 2 cumulative_control_space fixed bin (71), /* cumulative amount of space allocated by tty_space_man$get_space */ 1 82 2 input_space_updates fixed bin (35), /* number of increments to cumulative_input_space */ 1 83 2 output_space_updates fixed bin (35), /* number of increments to cumulative_output_space */ 1 84 2 control_space_updates fixed bin (35), /* number of increments to cumulative_control_space */ 1 85 2 minimum_free_space fixed bin (18), /* smallest amount of free space ever available */ 1 86 1 87 2 current_input_space fixed bin (18), /* amount of space currently allocated for input */ 1 88 2 current_output_space fixed bin (18), /* amount of space currently allocated for output */ 1 89 2 current_control_space fixed bin (18), /* amount of space currently allocated by get_space */ 1 90 2 tty_lock_calls fixed bin (35), /* number of calls to tty_lock$lock entries */ 1 91 2 found_channel_locked fixed bin (35), /* number of times tty_lock found channel already locked */ 1 92 2 max_wait_time fixed bin (35), /* longest time waited for any channel lock */ 1 93 2 total_wait_time fixed bin (71), /* total amount of time spent waiting for channel locks */ 1 94 1 95 2 echo_neg_time fixed bin (71), /* cumulative time spent doing echo negotiation */ 1 96 2 echo_neg_interrupts fixed bin (35), /* Echo-negotiated shipments */ 1 97 2 echo_neg_r0_chars fixed bin (35), /* Chars echoed by ring 0 */ 1 98 2 echo_neg_mux_chars fixed bin (35), /* Chars echoed by mux */ 1 99 2 echo_neg_sndopt_restarts fixed bin (35), /* Echo reinits */ 1 100 2 echo_neg_mux_nonecho fixed bin (35), 1 101 2 echo_neg_entries fixed bin (35), /* Entries into negotiate */ 1 102 1 103 2 echo_neg_mux_inhibit bit (1) aligned, /* For testing */ 1 104 2 n_queued_interrupts fixed bin (35), /* number of interrupts queued by tty_lock */ 1 105 2 trace unaligned, /* tracing information */ 1 106 3 flags, 1 107 4 enable bit, /* global tracing control */ 1 108 4 default_mode bit, /* whether to trace channels by default */ 1 109 4 read bit, /* read */ 1 110 4 write bit, /* write */ 1 111 4 data bit, /* buffers on reads and writes */ 1 112 4 control bit, /* control, priv_control, and hpriv_control */ 1 113 4 modes bit, /* (get set check)_modes */ 1 114 4 interrupt bit, /* interrupt, interrupt_later */ 1 115 4 init bit, /* init_multiplexer, terminate_multiplexer */ 1 116 4 start bit, /* start, stop */ 1 117 4 shutdown bit, /* shutdown */ 1 118 4 space_man bit, /* tty_space_man$* */ 1 119 4 pad_flags bit (6), 1 120 3 data_offset bit (18), /* offset of tracing data */ 1 121 1 122 2 recoverable_error_severity fixed bin, /* Syserr severity for recoverable MCS errors */ 1 123 1 124 2 timer_lock bit (36) aligned, /* Lock owned by mcs_timer */ 1 125 2 next_timer_offset bit (18) aligned, /* Offset of next timer to come due */ 1 126 2 timer_count fixed bin, /* Number of timers outstanding */ 1 127 2 timer_process bit (36) aligned, /* Who is doing timers? */ 1 128 1 129 2 timer_ev_chn fixed bin (71), /* How get get him */ 1 130 2 timer_lock_wait_time fixed bin (71), /* CPU time spent spinning on timer lock */ 1 131 1 132 2 timer_lock_count fixed bin (35), /* Number of times timer lock locked */ 1 133 2 timer_lock_wait_count fixed bin (35), /* Number of times imer lock waited on */ 1 134 2 timer_call_time fixed bin (71), /* CPU time spent in call side timer operations */ 1 135 1 136 2 timer_polling_time fixed bin (71), /* CPU time spent polling (including channel_manager) */ 1 137 2 timer_set_calls fixed bin (35), /* Number of calls to mcs_timer$set, set_wired */ 1 138 2 timer_reset_calls fixed bin (35), /* Number of calls to mcs_timer$reset, reset_wired */ 1 139 1 140 2 timer_change_calls fixed bin (35), /* Number of calls to mcs_timer$change, change_wired */ 1 141 2 timer_poll_calls fixed bin (35), /* Number of calls to mcs_timer$poll */ 1 142 2 timer_error_calls fixed bin (35), /* Number of mcs_timer calls ending with recoverable errors */ 1 143 2 timer_duplicate_pollings fixed bin (35), /* Number of timer polling found in progress on other CPU */ 1 144 1 145 2 tty_area_lock like hc_fast_lock, /* to prevent contention in allocating/freeing in tty_area */ 1 146 1 147 2 pad2 (13) fixed bin (35), 1 148 1 149 2 free_space fixed bin; /* start of free space region */ 1 150 1 151 2 1 /* BEGIN INCLUDE FILE...hc_fast_lock.incl.pl1 */ 2 2 2 3 /* Created November 1984 by Robert Coren to replace hc_lock.incl.pl1 */ 2 4 2 5 /* Lock format suitable for use with lock$lock_fast, unlock_fast */ 2 6 2 7 /* format: style3 */ 2 8 2 9 declare lock_ptr pointer; 2 10 declare 1 hc_fast_lock aligned based (lock_ptr), 2 11 2 pid bit (36) aligned, /* holder of lock */ 2 12 2 event bit (36) aligned, /* event associated with lock */ 2 13 2 flags aligned, 2 14 3 notify_sw bit (1) unaligned, 2 15 3 pad bit (35) unaligned; /* certain locks use this pad, like dirs */ 2 16 2 17 /* END INCLUDE FILE...hc_fast_lock.incl.pl1 */ 1 152 1 153 1 154 /* END INCLUDE FILE ... tty_buf.incl.pl1 */ 40 3 1 /* BEGIN INCLUDE FILE syserr_constants.incl.pl1 ... 11/11/80 W. Olin Sibert */ 3 2 /* 85-02-12, EJ Sharpe - Added sorting class constants, removed AIM_MESSAGE, added new action code names. */ 3 3 /* 85-04-24, G. Palter - Renamed SYSERR_UNUSED_10 to SYSERR_RING1_ERROR to reflect its actual use. */ 3 4 3 5 /* This include file has an ALM version. Keep 'em in sync! */ 3 6 3 7 dcl ( 3 8 3 9 /* The following constants define the message action codes. This indicates 3 10*how a message is to be handled. */ 3 11 3 12 SYSERR_CRASH_SYSTEM init (1), 3 13 CRASH init (1), /* Crash the system, and bleat plaintively. */ 3 14 3 15 SYSERR_TERMINATE_PROCESS init (2), 3 16 TERMINATE_PROCESS init (2), /* Terminate the process, print the message, and beep. */ 3 17 3 18 SYSERR_PRINT_WITH_ALARM init (3), 3 19 BEEP init (3), /* Beep and print the message on the console. */ 3 20 3 21 SYSERR_PRINT_ON_CONSOLE init (0), 3 22 ANNOUNCE init (0), /* Just print the message on the console. */ 3 23 3 24 SYSERR_LOG_OR_PRINT init (4), 3 25 LOG init (4), /* Log the message, or print it if it can't be logged */ 3 26 3 27 SYSERR_LOG_OR_DISCARD init (5), 3 28 JUST_LOG init (5), /* Just try to log the message, and discard it if it can't be */ 3 29 3 30 3 31 /* The following constants are added to the normal severities to indicate 3 32*different sorting classes of messages. */ 3 33 3 34 SYSERR_SYSTEM_ERROR init (00), /* indicates a standard level system error */ 3 35 SYSERR_RING1_ERROR init (10), /* indicates an error detected in ring 1 (mseg_, RCP) */ 3 36 SYSERR_COVERT_CHANNEL init (20), /* indicates covert channel audit trail message */ 3 37 SYSERR_UNSUCCESSFUL_ACCESS init (30), /* indicates access denial audit trail message */ 3 38 SYSERR_SUCCESSFUL_ACCESS init (40) /* indicates access grant audit trail message */ 3 39 ) fixed bin internal static options (constant); 3 40 3 41 /* END INCLUDE FILE syserr_constants.incl.pl1 */ 41 42 43 end mcs_timer_daemon; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0826.9 mcs_timer_daemon.pl1 >spec>install>1112>mcs_timer_daemon.pl1 40 1 01/06/85 1422.1 tty_buf.incl.pl1 >ldd>include>tty_buf.incl.pl1 1-152 2 01/06/85 1422.1 hc_fast_lock.incl.pl1 >ldd>include>hc_fast_lock.incl.pl1 41 3 05/17/85 0615.7 syserr_constants.incl.pl1 >ldd>include>syserr_constants.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. CRASH 000002 constant fixed bin(17,0) initial dcl 3-7 set ref 30* addr builtin function dcl 22 ref 26 any_other 000102 stack reference condition dcl 20 ref 28 hc_fast_lock based structure level 1 dcl 2-10 mcs_timer$poll 000010 constant entry external dcl 13 ref 35 next_time 000100 automatic fixed bin(71,0) dcl 18 set ref 35* 36 36* pxss$block 000012 constant entry external dcl 14 ref 37 set_alarm_timer 000014 constant entry external dcl 15 ref 36 syserr 000016 constant entry external dcl 16 ref 30 timer_ev_chn 110 based fixed bin(71,0) level 2 dcl 1-35 set ref 36* tty_buf based structure level 1 dcl 1-35 tty_buf$ 000020 external static fixed bin(17,0) dcl 1-19 set ref 26 ttybp 000110 automatic pointer dcl 1-19 set ref 26* 36 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ANNOUNCE internal static fixed bin(17,0) initial dcl 3-7 BEEP internal static fixed bin(17,0) initial dcl 3-7 FNP_DUMP_PATCH_EVENT internal static fixed bin(17,0) initial dcl 1-31 FNP_METER_EVENT internal static fixed bin(17,0) initial dcl 1-32 JUST_LOG internal static fixed bin(17,0) initial dcl 3-7 LOG internal static fixed bin(17,0) initial dcl 3-7 SYSERR_COVERT_CHANNEL internal static fixed bin(17,0) initial dcl 3-7 SYSERR_CRASH_SYSTEM internal static fixed bin(17,0) initial dcl 3-7 SYSERR_LOG_OR_DISCARD internal static fixed bin(17,0) initial dcl 3-7 SYSERR_LOG_OR_PRINT internal static fixed bin(17,0) initial dcl 3-7 SYSERR_PRINT_ON_CONSOLE internal static fixed bin(17,0) initial dcl 3-7 SYSERR_PRINT_WITH_ALARM internal static fixed bin(17,0) initial dcl 3-7 SYSERR_RING1_ERROR internal static fixed bin(17,0) initial dcl 3-7 SYSERR_SUCCESSFUL_ACCESS internal static fixed bin(17,0) initial dcl 3-7 SYSERR_SYSTEM_ERROR internal static fixed bin(17,0) initial dcl 3-7 SYSERR_TERMINATE_PROCESS internal static fixed bin(17,0) initial dcl 3-7 SYSERR_UNSUCCESSFUL_ACCESS internal static fixed bin(17,0) initial dcl 3-7 TERMINATE_PROCESS internal static fixed bin(17,0) initial dcl 3-7 TTY_AREA_LOCK_EVENT internal static bit(36) initial dcl 1-33 abs_buf_limit internal static fixed bin(18,0) initial dcl 1-19 bsizec internal static fixed bin(17,0) initial dcl 1-28 buf_per_second internal static fixed bin(17,0) initial dcl 1-29 input_bpart internal static fixed bin(18,0) initial dcl 1-19 lock_ptr automatic pointer dcl 2-9 output_bpart internal static fixed bin(18,0) initial dcl 1-19 qblock_size internal static fixed bin(17,0) initial dcl 1-27 tty_ev internal static fixed bin(17,0) initial dcl 1-19 NAMES DECLARED BY EXPLICIT CONTEXT. mcs_timer_daemon 000021 constant entry external dcl 10 reinit 000026 constant label dcl 26 ref 31 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 222 244 126 232 Length 466 126 22 205 74 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mcs_timer_daemon 88 external procedure is an external procedure. on unit on line 28 84 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mcs_timer_daemon 000100 next_time mcs_timer_daemon 000110 ttybp mcs_timer_daemon THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac tra_ext_1 enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mcs_timer$poll pxss$block set_alarm_timer syserr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. tty_buf$ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000020 26 000026 28 000031 30 000045 31 000064 34 000067 35 000070 36 000077 37 000117 38 000124 43 000125 ----------------------------------------------------------- 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