COMPILATION LISTING OF SEGMENT deactivate 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 1023.9 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* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* 14* deactivate (astep, code) 15* deactivate$for_delete (astep, code) 16* 17* 18* 19*FUNCTION - 20* 21*The procedure "deactivate" deactivates the segment whose ASTE is pointed to by 22*the input argument "astep". If the deactivation is successful, it returns with 23*code=0; if the deactivation fails, it returns with code=0, or ehs=1. 24* 25*The procedure "deactivate" does not concern itself with the AST lock. It assumes 26*there is no race condition. It is the responsibility of the caller to make sure 27*there is no race condition. The initializer or shutdown of course may call 28*deactivate without locking the AST. For normal processes, however, the caller 29*must make sure the AST is locked before the call is issued, and it will be 30*unlocked upon return as soon as it is safe to do so. 31* 32*The ASTE is left in the circular list associated with the size of the page 33*table, at the first position, so that it will be found right away should an ASTE 34*of this size be needed. 35* 36*The ASTE is removed from the uid hash table. 37* 38*All items of the ASTE are zeroed except fp, bp, ptsi and marker. All PTW's are 39*initialized with a page not in core flag and a coded null disk address. 40* 41*deactivate$for_delete does not update the VTOCE 42* 43*MODIFICATIONS - 44* 45*10/13/82 J. Bongiovanni, to check number of pages in core after cleanup 46*09/17/82 J. Bongiovanni, for deactivate$for_delete 47*03/21/81 W. Olin Sibert, for ADP PTWs (or, rather, lack of them in this program) 48*04/19/81 W. Olin Sibert - Eliminated maintenance of aste.ic 49*11/18/80 E. N. Kittlitz - Modified for new dtu/dtm calculation. 50*04/10/75 Andre Bensoussan - Modified for the new storage system. 51* 52**/ 53 54 55 56 deactivate : proc (a_astep, a_code); 57 58 dcl a_astep ptr, 59 a_code fixed bin (35); 60 61 62 63 dcl pastep ptr, 64 (last, relp) bit (18) aligned, 65 code fixed bin (35), 66 for_delete_call 67 bit (1); 68 69 70 71 dcl (error_table_$illegal_deactivation, error_table_$deact_in_mem) fixed bin (35) ext; 72 73 dcl sst_seg$ external static; 74 dcl sst$deact_count fixed bin (35) external static; 75 dcl sstp pointer; 76 77 dcl 78 pc$cleanup entry (ptr), 79 setfaults entry (ptr, bit(1) aligned), 80 update_vtoce$deact entry (ptr, fixed bin (35)), 81 put_aste entry (ptr), 82 search_ast$hash_out entry (ptr); 83 84 dcl (addr, binary, bit, fixed, max, ptr, rel) builtin; 85 86 /* */ 87 88 for_delete_call = "0"b; 89 goto COMMON; 90 91 for_delete: 92 entry (a_astep, a_code); 93 94 for_delete_call = "1"b; 95 96 COMMON: 97 98 a_code = 0; /* zero return code */ 99 sstp = addr (sst_seg$); /* get a pointer to the SST */ 100 astep = a_astep; /* copy arguments */ 101 102 if (aste.infp ^= ""b) | aste.ehs | (aste.par_astep = ""b) | fixed (aste.np, 9) > 256 then do; 103 a_code = error_table_$illegal_deactivation; 104 return; 105 end; 106 107 call setfaults (astep, "0"b); /* set faults in all SDW's */ 108 109 call pc$cleanup (astep); /* cleanup the segment (page control) */ 110 if aste.np ^= ""b then do; /* cleanup failed */ 111 a_code = error_table_$deact_in_mem; 112 return; 113 end; 114 115 if ^for_delete_call then do; 116 call update_vtoce$deact (astep, code); /* update the vtoc entry */ 117 if code ^= 0 then do; 118 a_code = code; 119 return; 120 end; 121 end; 122 123 124 pastep = ptr (sstp, astep -> aste.par_astep); /* get a pointer to the parent AST entry */ 125 126 last = "0"b; /* delete the entry from the list of inferior entries */ 127 relp = pastep -> aste.infp; /* get pointer to inferior chain */ 128 do while (relp ^= rel(astep)); /* loop until end of list (shouldn't get to end ^= rel(astep)) */ 129 last = relp; /* go to next entry (but save pointer to previous one) */ 130 relp = ptr (sstp, relp) -> aste.infl; 131 end; 132 if last = "0"b then pastep -> aste.infp = astep -> aste.infl; 133 else ptr (sstp, last) -> aste.infl = astep -> aste.infl; 134 135 /* set dtu of parent to smallest reasonable value */ 136 pastep -> aste.dtu = bit (max (binary (pastep -> aste.dtu, 36), 137 binary (pastep -> aste.dtm, 36), binary (astep -> aste.dtu, 36)), 36); 138 139 call search_ast$hash_out (astep); 140 141 call put_aste (astep); 142 143 sst$deact_count = sst$deact_count + 1; /* meter */ 144 145 return; 146 147 /* BEGIN INCLUDE FILE ...aste.incl.pl1 ... */ 1 2 1 3 /* Template for an AST entry. Length = 12 words. */ 1 4 1 5 /* Words 0 to 7, and 11 are read by PC; they are read and modified by SC. 1 6* Words 8, 9 and 10 are modified by PC; they should never be modified without locking the PC lock */ 1 7 /* Modified January 1985 by Keith Loepere for multi_class. */ 1 8 1 9 dcl astep ptr; 1 10 1 11 dcl 1 aste based (astep) aligned, 1 12 1 13 (2 fp bit (18), /* forward used list rel pointer */ 1 14 2 bp bit (18), /* backward used list rel pointer */ 1 15 1 16 2 infl bit (18), /* ptr to NEXT in list of ASTE's of my brothers */ 1 17 2 infp bit (18), /* ptr to FIRST in list of ASTE's of my children */ 1 18 1 19 2 strp bit (18), /* rel pointer to process trailer */ 1 20 2 par_astep bit (18), /* rel pointer to parent aste */ 1 21 1 22 2 uid bit (36), /* segment unique id */ 1 23 1 24 2 msl bit (9), /* maximum segment length in 1024 word units */ 1 25 2 pvtx fixed bin (8), /* physical volume table index */ 1 26 2 vtocx fixed bin (17), /* vtoc entry index */ 1 27 1 28 2 usedf bit (1), /* ast entry is being used if non-zero */ 1 29 2 init bit (1), /* used bit - insure 1 lap */ 1 30 2 gtus bit (1), /* global transparent usage switch */ 1 31 2 gtms bit (1), /* global transparent modified switch */ 1 32 2 hc bit (1), /* hard core segment */ 1 33 2 hc_sdw bit (1), /* aste with sdw for hardcore seg if non-zero */ 1 34 2 any_access_on bit (1), /* any sdw allows access, unless write_access_on */ 1 35 2 write_access_on bit (1), /* any sdw allows write access */ 1 36 2 inhibit_cache bit (1), /* flag not to reset above bits */ 1 37 2 explicit_deact_ok bit (1), /* set if user can deactivate seg */ 1 38 2 deact_error bit (1), /* set if error occurred while deactivating */ 1 39 2 hc_part bit (1), /* set if pages are in a hardcore partition */ 1 40 2 fm_damaged bit (1), /* set if filemap checksum was ever bad */ 1 41 2 multi_class bit (1), /* set if page_control should watch state changes to this segment */ 1 42 2 pad1 bit (2), /* OO */ 1 43 2 dius bit (1), /* dumper in use switch */ 1 44 2 nid bit (1), /* if on prevents addtion to incremental dump map */ 1 45 2 dmpr_pad bit (1), 1 46 2 ehs bit (1), /* entry hold switch */ 1 47 2 nqsw bit (1), /* no quota switch - no checking for pages of this seg */ 1 48 2 dirsw bit (1), /* directory switch */ 1 49 2 master_dir bit (1), /* master dir - a root for the log volume */ 1 50 2 volmap_seg bit (1), /* volmap_seg for some volume */ 1 51 2 tqsw (0:1) bit (1), /* terminal quota switch - (0) for non dir pages */ 1 52 2 pad_ic bit (10), /* Used to be aste.ic */ 1 53 1 54 2 dtu bit (36), /* date and time segment last used */ 1 55 1 56 2 dtm bit (36), /* date and time segment last modified */ 1 57 1 58 1 59 2 quota (0:1) fixed bin (18) unsigned, /* sec storage quota - (0) for non dir pages */ 1 60 1 61 2 used (0:1) fixed bin (18) unsigned, /* sec storage used - (0) for non dir pages */ 1 62 1 63 2 csl bit (9), /* current segment length in 1024 words units */ 1 64 2 fmchanged bit (1), /* turned on by page if file map changed */ 1 65 2 fms bit (1), /* file modified switch */ 1 66 2 npfs bit (1), /* no page fault switch */ 1 67 2 gtpd bit (1), /* global transparent paging device switch */ 1 68 2 dnzp bit (1), /* don't null out if zero page switch */ 1 69 2 per_process bit (1), /* use master quota for this entry */ 1 70 2 ddnp bit (1), /* don't deposit nulled pages */ 1 71 2 pad2 bit (2), 1 72 2 records bit (9), /* number of records used by the seg in sec storage */ 1 73 2 np bit (9), /* number of pages in core */ 1 74 1 75 1 76 2 ht_fp bit (18), /* hash table forward rel pointer */ 1 77 2 fmchanged1 bit (1), /* value of "fmchanged" saved by pc$get_file_map */ 1 78 2 damaged bit (1), /* PC declared segment unusable */ 1 79 2 pack_ovfl bit (1), /* page fault on seg would cause pack overflow */ 1 80 2 synchronized bit (1), /* Data Management synchronized segment */ 1 81 2 pad3 bit (6), /* OOOOOOOOO */ 1 82 2 ptsi bit (2), /* page table size index */ 1 83 2 marker bit (6)) unaligned; /* marker to indicate last word of ASTE */ 1 84 1 85 1 86 dcl asta (0 : 8000) bit (36*12 /* sst-> sst.astsize */) based aligned; 1 87 1 88 1 89 dcl 1 aste_part aligned based (astep), 1 90 1 91 2 one bit (36) unaligned, /* fp and bp */ 1 92 2 two bit (36*11 - 8) unaligned, /* part that has to be zeroed when ASTE is freed */ 1 93 2 three bit (8) unaligned; /* ptsi and marker */ 1 94 1 95 1 96 dcl 1 seg_aste based (astep) aligned, /* Overlay because quota is only for dirs */ 1 97 2 pad1 bit (8*36), 1 98 2 usage fixed bin (35), /* page fault count: overlays quota */ 1 99 2 pad2 bit (3*36); 1 100 1 101 /* END INCLUDE FILE ... aste.incl.pl1 */ 147 148 149 end deactivate; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0808.4 deactivate.pl1 >spec>install>1112>deactivate.pl1 147 1 01/30/85 1523.9 aste.incl.pl1 >ldd>include>aste.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. a_astep parameter pointer dcl 58 ref 56 91 100 a_code parameter fixed bin(35,0) dcl 58 set ref 56 91 96* 103* 111* 118* addr builtin function dcl 84 ref 99 aste based structure level 1 dcl 1-11 astep 000110 automatic pointer dcl 1-9 set ref 100* 102 102 102 102 107* 109* 110 116* 124 128 132 133 136 139* 141* binary builtin function dcl 84 ref 136 136 136 bit builtin function dcl 84 ref 136 code 000104 automatic fixed bin(35,0) dcl 63 set ref 116* 117 118 dtm 7 based bit(36) level 2 packed packed unaligned dcl 1-11 ref 136 dtu 6 based bit(36) level 2 packed packed unaligned dcl 1-11 set ref 136* 136 136 ehs 5(19) based bit(1) level 2 packed packed unaligned dcl 1-11 ref 102 error_table_$deact_in_mem 000012 external static fixed bin(35,0) dcl 71 ref 111 error_table_$illegal_deactivation 000010 external static fixed bin(35,0) dcl 71 ref 103 fixed builtin function dcl 84 ref 102 for_delete_call 000105 automatic bit(1) packed unaligned dcl 63 set ref 88* 94* 115 infl 1 based bit(18) level 2 packed packed unaligned dcl 1-11 set ref 130 132 133* 133 infp 1(18) based bit(18) level 2 packed packed unaligned dcl 1-11 set ref 102 127 132* last 000102 automatic bit(18) dcl 63 set ref 126* 129* 132 133 max builtin function dcl 84 ref 136 np 12(27) based bit(9) level 2 packed packed unaligned dcl 1-11 ref 102 110 par_astep 2(18) based bit(18) level 2 packed packed unaligned dcl 1-11 ref 102 124 pastep 000100 automatic pointer dcl 63 set ref 124* 127 132 136 136 136 pc$cleanup 000020 constant entry external dcl 77 ref 109 ptr builtin function dcl 84 ref 124 130 133 put_aste 000026 constant entry external dcl 77 ref 141 rel builtin function dcl 84 ref 128 relp 000103 automatic bit(18) dcl 63 set ref 127* 128 129 130* 130 search_ast$hash_out 000030 constant entry external dcl 77 ref 139 setfaults 000022 constant entry external dcl 77 ref 107 sst$deact_count 000016 external static fixed bin(35,0) dcl 74 set ref 143* 143 sst_seg$ 000014 external static fixed bin(17,0) dcl 73 set ref 99 sstp 000106 automatic pointer dcl 75 set ref 99* 124 130 133 update_vtoce$deact 000024 constant entry external dcl 77 ref 116 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. asta based bit(432) array dcl 1-86 aste_part based structure level 1 dcl 1-89 seg_aste based structure level 1 dcl 1-96 NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000026 constant label dcl 96 ref 89 deactivate 000006 constant entry external dcl 56 for_delete 000017 constant entry external dcl 91 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 402 434 244 412 Length 626 244 32 156 136 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME deactivate 88 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME deactivate 000100 pastep deactivate 000102 last deactivate 000103 relp deactivate 000104 code deactivate 000105 for_delete_call deactivate 000106 sstp deactivate 000110 astep deactivate THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. pc$cleanup put_aste search_ast$hash_out setfaults update_vtoce$deact THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$deact_in_mem error_table_$illegal_deactivation sst$deact_count sst_seg$ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 56 000002 88 000013 89 000014 91 000015 94 000024 96 000026 99 000030 100 000033 102 000036 103 000053 104 000055 107 000056 109 000070 110 000077 111 000103 112 000107 115 000110 116 000112 117 000123 118 000125 119 000127 124 000130 126 000136 127 000137 128 000142 129 000145 130 000147 131 000154 132 000155 133 000165 136 000172 139 000220 141 000227 143 000236 145 000243 ----------------------------------------------------------- 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