COMPILATION LISTING OF SEGMENT bj_cleanup_tables Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/04/85 1000.5 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 7 /* format: style4,indattr,ifthenstmt,ifthen,^indcomtxt,idind33 */ 8 9 bj_cleanup_tables$handler: 10 procedure (code); 11 12 /* DESCRIPTION: 13* A temporary procedure to address the need for a centralized 14*routine to undo changes to the PST during journalization. 15**/ 16 17 /* HISTORY: 18*Written by Mike Pandolf, 06/28/82. 19*Modified: 20*11/12/82 by M. Pandolf: elimiated call to ioa_ just before unlocking tables. 21*03/09/83 by M. Pandolf: to use new pste locking. 22*12/06/83 by L. A. Newcomb: Renamed before_journal_manager_static_ to 23* bjm_data_ and moved some cells from dm_data_ to bjm_data_. 24**/ 25 26 /* handler: entry for invocation from expected error handler 27* entry (code); */ 28 29 reason_invoked = HANDLER; 30 code = 0; 31 32 call BEGIN_CLEANUP; 33 34 return; 35 36 crawl_out: /* entry for invocation from unexpected error handler */ 37 entry (code); 38 39 reason_invoked = CRAWLOUT; 40 code = 0; 41 42 call BEGIN_CLEANUP; 43 44 return; 45 46 dead_process: /* entry for invocation after a process destruction */ 47 entry (code); 48 49 reason_invoked = DEAD_PROCESS; 50 code = 0; 51 52 call BEGIN_CLEANUP; 53 54 return; 55 56 57 58 /* INTERNAL PROCEDURES */ 59 60 BEGIN_CLEANUP: 61 procedure (); 62 63 my_process_id = get_process_id_ (); 64 65 bj_pst_ptr = bjm_data_$bj_pst_ptr; 66 67 do pste_no = 1 to bj_pst.max_n_entries; 68 if bj_pst.e (pste_no).lock.pid = my_process_id 69 then call bj_pste_lock$unlock_cleanup (addr (bj_pst.e (pste_no))); 70 end; 71 72 if bj_pst.lock.pid = my_process_id 73 then do; 74 call lock_manager_$unlock_fast (addr (bj_pst.lock), code); 75 end; 76 77 return; 78 79 end BEGIN_CLEANUP; 80 81 82 /* DECLARATIONS */ 83 84 /* Parameters */ 85 86 dcl code fixed bin (35) parameter; /* standard status code */ 87 88 /* Automatic */ 89 90 dcl reason_invoked fixed bin automatic; /* indicator for the rest of the procedure */ 91 dcl my_process_id bit (36) aligned; 92 dcl pste_no fixed bin; 93 94 /* Static, External */ 95 96 dcl bjm_data_$bj_pst_ptr pointer external static; 97 98 /* Entry */ 99 100 dcl bj_pste_lock$unlock_cleanup entry (ptr); 101 dcl lock_manager_$unlock_fast entry (ptr, fixed bin (35)); 102 dcl get_process_id_ entry returns (bit (36)); 103 104 /* Constants */ 105 106 dcl HANDLER internal static options (constant) fixed bin init (1); 107 dcl CRAWLOUT internal static options (constant) fixed bin init (2); 108 dcl DEAD_PROCESS internal static options (constant) fixed bin init (3); 109 110 /* Condition */ 111 112 dcl error condition; 113 114 /* Include Files */ 115 116 1 1 /* BEGIN dm_bj_static.incl.pl1 */ 1 2 /* 1 3*Modified: 1 4*10/04/82 by Lee A. Newcomb: To change from internal static to external 1 5* static. 1 6**/ 1 7 1 8 dcl dm_system_data_$bj_max_n_journals fixed bin ext static; 1 9 dcl dm_system_data_$bj_max_n_processes fixed bin ext static; 1 10 dcl dm_system_data_$max_n_transactions fixed bin ext static; 1 11 1 12 /* END dm_bj_static.incl.pl1 */ 1 13 117 118 2 1 /* BEGIN INCLUDE FILE: dm_bj_pst.incl.pl1 */ 2 2 /* 2 3*Layout of the before journal per-system table header and BJ table entries. 2 4* 2 5*Written by Andre Bensoussan 06-15-1982 2 6*Modified: 2 7*09/29/82 by Lee A. Newcomb: To use dm_system_data_ for determining 2 8* dimension of bj_pst.e and force bj_pst.mod_list_area and 2 9* bj_pst.e to even word boundaries. 2 10*04/27/82 by M. Pandolf: To add meter space by cutting away from mod_list_area. 2 11**/ 2 12 /* format: style4,indattr,idind33,^indcomtxt */ 2 13 2 14 dcl BJ_PST_VERSION_1 fixed bin internal static options (constant) init (1); 2 15 2 16 dcl bj_pst_ptr ptr; 2 17 2 18 dcl 1 bj_pst based (bj_pst_ptr) aligned, 2 19 2 version fixed bin, 2 20 2 pad1 bit (36), 2 21 2 lock, 2 22 3 pid bit (36), /* process_id holding lock */ 2 23 3 event bit (36), 2 24 2 time_of_bootload fixed bin (71), /* for ease of access */ 2 25 2 max_n_entries fixed bin, /* as determined from dm_system_data_$bj_max_n_journals */ 2 26 2 n_entries_used fixed bin, /* current # of BJs open on the system */ 2 27 2 highest_ix_used fixed bin, /* max. # of BJs that has ever been open of the system */ 2 28 2 pn_table_offset fixed bin (18) uns, /* relative offset of bj_pn_table in bj_pst seg. */ 2 29 2 check_in_table_offset fixed bin (18) uns, /* ditto for bj_check_in_table */ 2 30 2 buffer_table_offset fixed bin (18) uns, /* ditto for where our BJ buffers are located */ 2 31 2 max_n_buffers fixed bin, /* must be <= to max_n_entries */ 2 32 2 pad2 bit (36), /* force next on even word boundary */ 2 33 2 meters, /* dim (50) fixed bin (71), */ 2 34 3 n_calls_begin_txn fixed bin (71), /* meter (1) */ 2 35 3 n_calls_before_image fixed bin (71), /* meter (2) */ 2 36 3 n_calls_abort fixed bin (71), /* meter (3) */ 2 37 3 n_calls_commit fixed bin (71), /* meter (4) */ 2 38 3 n_calls_rb_mark fixed bin (71), /* meter (5) */ 2 39 3 n_calls_fm_pc_mark fixed bin (71), /* meter (6) */ 2 40 3 n_calls_fm_rbh fixed bin (71), /* meter (7) */ 2 41 3 n_calls_rollback fixed bin (71), /* meter (8) */ 2 42 3 meter dim (9:50) fixed bin (71), /* meter (9) - meter (50) */ 2 43 2 mod_list_area (100) fixed bin (35), /* for keeping track of pst mods */ 2 44 2 45 2 e dim (dm_system_data_$bj_max_n_journals refer (bj_pst.max_n_entries)) 2 46 like bj_pste; /* per system BJ table entries */ 2 47 2 48 2 49 /* END INCLUDE FILE: dm_bj_pst.incl.pl1 */ 119 120 3 1 /* BEGIN INCLUDE FILE: dm_bj_pste.incl.pl1 */ 3 2 3 3 /* DESCRIPTION 3 4* 3 5* Layout of the per-system before journal table 3 6* entries. This structure is used to contain information 3 7* about a before journal active in a running DMS. It is 3 8* currently also used as the header of a before journal 3 9* (see dm_bj_header.incl.pl1). Version changes to this 3 10* structure require either automatic conversion to be set 3 11* up, or users to be told to re-create their journals. 3 12* 3 13* Currently, a bj_pste must be 64 words long; any 3 14* future changes must at least make sure a bj_pste is an 3 15* even # of words for the alignment of some of its 3 16* elements. 3 17**/ 3 18 3 19 /* HISTORY: 3 20* 3 21*Written by Andre Bensoussan, 06/15/82. 3 22*Modified: 3 23*08/16/82 by Andre Bensoussan: to add stamp_for_last_ci_put. 3 24*09/29/82 by Lee A. Newcomb: to fix BJ_PSTE_VERSION_1 and fix some 3 25* alignments. 3 26*11/01/82 by Andre Bensoussan: to add "stamp_for_last_ci_on_disk", 3 27* "n_bi_still_unsafe", and "n_bi_being_saved". 3 28*02/08/83 by M. Pandolf: to add append_state structure. 3 29*03/19/83 by L. A. Newcomb: to fix up some alignments and spelling problems. 3 30*04/27/83 by M. Pandolf: to add meter structure at end. 3 31*02/11/85 by Lee A. Newcomb: Fixed version constant name to agree with its 3 32* value of 2; fixed references to page files or PF's; fixed format 3 33* of description and history sections. 3 34*03/07/85 by Lee A. Newcomb: Changed a pad word to be txn_storage_limit and 3 35* expanded on the description for future generations (no 3 36* version was made). 3 37*03/27/85 by Lee A. Newcomb: Changed one of the unused meters to 3 38* n_txn_storage_limit_hits (again without a version change). 3 39**/ 3 40 /* format: style2,ll79,ind3,^indprocbody,ifthendo,ifthen,^indnoniterdo,^inddcls,dclind5,idind35,linecom */ 3 41 3 42 dcl BJ_PSTE_VERSION_2 fixed bin internal static 3 43 options (constant) init (2); 3 44 3 45 dcl bj_pste_ptr ptr; 3 46 3 47 /* MUST HAVE EVEN NUMBER OR WORDS */ 3 48 dcl 1 bj_pste based (bj_pste_ptr) aligned, 3 49 2 version fixed bin, 3 50 2 bj_ix fixed bin, /* Index of this entry in bj_pst table */ 3 51 2 lock aligned, 3 52 3 pid bit (36), /* process ID of lock owner */ 3 53 3 event bit (36), 3 54 2 bj_uid bit (36), /* UID of BJ file */ 3 55 2 ci_size fixed bin, /* In number of bytes */ 3 56 2 max_size fixed bin, /* In number of ci's */ 3 57 2 active bit (1) aligned, /* 0 means journal not being used */ 3 58 2 time_header_updated fixed bin (71), 3 59 2 earliest_meaningful_time fixed bin (71), /* time stamp on first valid control interval */ 3 60 2 update_frequency fixed bin, /* Not used yet, probably will be how many CIs */ 3 61 2 last_rec_id bit (36), /* rec id of the last logical record in journal */ 3 62 2 n_processes fixed bin, /* Number of processes using this BJ */ 3 63 2 n_txn fixed bin, /* Number of txn in progress using this BJ */ 3 64 2 last_ci_info aligned, 3 65 3 last_ci_buffered fixed bin (24) uns, /* Last ci encached in the buffer */ 3 66 3 last_ci_put fixed bin (24) uns, /* Last ci put in the BJ */ 3 67 3 last_ci_flushed fixed bin (24) uns, /* Last ci for which flush initiated */ 3 68 3 last_ci_on_disk fixed bin (24) uns, /* Last ci of that portion of the BJ known to be ... */ 3 69 /* .. completely on disk */ 3 70 3 stamp_for_last_ci_put fixed bin (71), /* Time stamp associated with the last ci put in the BJ */ 3 71 3 stamp_for_last_ci_on_disk fixed bin (71), /* Time stamp associated with the last ci on disk in the BJ */ 3 72 2 n_bi_still_unsafe fixed bin, /* number of bi's still not on disk */ 3 73 2 n_bi_being_saved fixed bin, /* number of bi's for which flush initiated */ 3 74 2 buffer_offset fixed bin (18) uns, /* Now allocated in the bj_pst segment */ 3 75 2 txn_storage_limit fixed bin (35), /* # of bytes a single txn may write */ 3 76 2 cl aligned, /* Circular List */ 3 77 3 origin_ci fixed bin (24) uns, 3 78 3 lowest_ci fixed bin (24) uns, 3 79 3 highest_ci fixed bin (24) uns, 3 80 3 number_ci fixed bin (24) uns, 3 81 2 append_state aligned, 3 82 3 current_operation char (4), /* equal to "appe" when append in progress */ 3 83 3 pending_n_txn fixed bin, /* n_txn value when append done */ 3 84 3 pending_last_rec_id bit (36), /* last_rec_id value after append done */ 3 85 3 pending_last_element_id bit (36), /* last element id after append done */ 3 86 3 txte_rec_id_relp bit (18), /* rel ptr into seg containing TXT for txte.pending_bj_rec_id */ 3 87 2 pad_to_even_word1 bit (36) aligned, 3 88 2 meters aligned, /* dim (10) fixed bin (71), */ 3 89 3 n_bi_written fixed bin (71), /* meter (1) */ 3 90 3 n_bi_bytes_written fixed bin (71), /* meter (2) */ 3 91 3 n_journal_full fixed bin (71), /* meter (3) */ 3 92 3 n_successful_recycles fixed bin (71), /* meter (4) */ 3 93 3 n_ci_recycled fixed bin (71), /* meter (5) */ 3 94 3 n_txn_started fixed bin (71), /* meter (6) */ 3 95 3 n_non_null_txn fixed bin (71), /* meter (7) */ 3 96 3 n_txn_storage_limit_hits fixed bin (71), /* meter (8) */ 3 97 3 meter (9:10) fixed bin (71), 3 98 /* meter (9) - meter (10) */ 3 99 2 pad_to_64_words (6) bit (36); /* 64 is even (see below) */ 3 100 3 101 3 102 /* END INCLUDE FILE: dm_bj_pste.incl.pl1 */ 121 122 123 124 end bj_cleanup_tables$handler; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/04/85 0915.2 bj_cleanup_tables.pl1 >spec>on>7192.pbf-04/04/85>bj_cleanup_tables.pl1 117 1 01/07/85 0857.8 dm_bj_static.incl.pl1 >ldd>include>dm_bj_static.incl.pl1 119 2 01/07/85 0857.7 dm_bj_pst.incl.pl1 >ldd>include>dm_bj_pst.incl.pl1 121 3 04/04/85 0819.1 dm_bj_pste.incl.pl1 >spec>on>7192.pbf-04/04/85>dm_bj_pste.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. CRAWLOUT constant fixed bin(17,0) initial dcl 107 ref 39 DEAD_PROCESS constant fixed bin(17,0) initial dcl 108 ref 49 HANDLER constant fixed bin(17,0) initial dcl 106 ref 29 bj_pst based structure level 1 dcl 2-18 bj_pst_ptr 000104 automatic pointer dcl 2-16 set ref 65* 67 68 68 68 72 74 74 bj_pste based structure level 1 dcl 3-48 bj_pste_lock$unlock_cleanup 000012 constant entry external dcl 100 ref 68 bjm_data_$bj_pst_ptr 000010 external static pointer dcl 96 ref 65 code parameter fixed bin(35,0) dcl 86 set ref 9 30* 36 40* 46 50* 74* e 326 based structure array level 2 dcl 2-18 set ref 68 68 get_process_id_ 000016 constant entry external dcl 102 ref 63 lock 2 based structure level 2 in structure "bj_pst" dcl 2-18 in procedure "bj_cleanup_tables$handler" set ref 74 74 lock 330 based structure array level 3 in structure "bj_pst" dcl 2-18 in procedure "bj_cleanup_tables$handler" lock_manager_$unlock_fast 000014 constant entry external dcl 101 ref 74 max_n_entries 6 based fixed bin(17,0) level 2 dcl 2-18 ref 67 my_process_id 000101 automatic bit(36) dcl 91 set ref 63* 68 72 pid 330 based bit(36) array level 4 in structure "bj_pst" dcl 2-18 in procedure "bj_cleanup_tables$handler" set ref 68 pid 2 based bit(36) level 3 in structure "bj_pst" dcl 2-18 in procedure "bj_cleanup_tables$handler" set ref 72 pste_no 000102 automatic fixed bin(17,0) dcl 92 set ref 67* 68 68 68* reason_invoked 000100 automatic fixed bin(17,0) dcl 90 set ref 29* 39* 49* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BJ_PSTE_VERSION_2 internal static fixed bin(17,0) initial dcl 3-42 BJ_PST_VERSION_1 internal static fixed bin(17,0) initial dcl 2-14 bj_pste_ptr automatic pointer dcl 3-45 dm_system_data_$bj_max_n_journals external static fixed bin(17,0) dcl 1-8 dm_system_data_$bj_max_n_processes external static fixed bin(17,0) dcl 1-9 dm_system_data_$max_n_transactions external static fixed bin(17,0) dcl 1-10 error 000000 stack reference condition dcl 112 NAMES DECLARED BY EXPLICIT CONTEXT. BEGIN_CLEANUP 000054 constant entry internal dcl 60 ref 32 42 52 bj_cleanup_tables$handler 000007 constant entry external dcl 9 crawl_out 000024 constant entry external dcl 36 dead_process 000041 constant entry external dcl 46 NAME DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 68 68 74 74 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 272 312 145 302 Length 542 145 20 214 124 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bj_cleanup_tables$handler 90 external procedure is an external procedure. BEGIN_CLEANUP internal procedure shares stack frame of external procedure bj_cleanup_tables$handler. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bj_cleanup_tables$handler 000100 reason_invoked bj_cleanup_tables$handler 000101 my_process_id bj_cleanup_tables$handler 000102 pste_no bj_cleanup_tables$handler 000104 bj_pst_ptr bj_cleanup_tables$handler THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. bj_pste_lock$unlock_cleanup get_process_id_ lock_manager_$unlock_fast THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bjm_data_$bj_pst_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 9 000004 29 000014 30 000016 32 000020 34 000021 36 000022 39 000031 40 000033 42 000035 44 000036 46 000037 49 000046 50 000050 52 000052 54 000053 60 000054 63 000055 65 000066 67 000072 68 000103 70 000122 72 000124 74 000130 77 000144 ----------------------------------------------------------- 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