COMPILATION LISTING OF SEGMENT demand_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 1047.1 mst Sat Options: optimize map 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 13 /* format: style4 */ 14 demand_deactivate: proc (a_segptr, a_code); 15 16 /* Written March 30, 1976 by R. Bratt 17* 18* This module allows priveleged users to deactivate a segment if certain 19* conditions obtain. These conditions are: 20* * the segment must be known in the calling process 21* * the segment must be active 22* * all users who have connected to the aste must have specified explicit_deact_ok, 23* * or this is force entry 24* * the aste must be deactivateable 25* 26* Modified for external static SST, 04/19/81, W. Olin Sibert 27* Modified for $force entrypoint, 04/21/81, WOS 28* Modified for $force_given_segno entrypoint, 02/28/82, J. Bongiovanni 29* Modified to lock ast on search, 05/30/83, E. N. Kittlitz 30* Modified to respect threaded-out-ness, 84-01-08 BIM. 31**/ 32 33 dcl a_segptr ptr parameter; 34 dcl a_seg_uid bit (36) aligned parameter; 35 dcl a_code fixed bin (35) parameter; 36 37 dcl segno fixed bin (17); 38 dcl code fixed bin (35); 39 dcl uid bit (36) aligned; 40 dcl force_sw bit (1) aligned; 41 42 dcl sst$demand_deact_attempts fixed bin (35) external static; 43 dcl sst$demand_deactivations fixed bin (35) external static; 44 45 dcl deactivate entry (ptr, fixed bin (35)); 46 dcl get_kstep entry (fixed bin, pointer, fixed bin (35)); 47 dcl lock$lock_ast entry (); 48 dcl lock$unlock_ast entry (); 49 dcl search_ast entry (bit (36) aligned) returns (pointer); 50 51 dcl error_table_$illegal_deactivation fixed bin(35) ext static; 52 53 dcl (baseno, binary, null) builtin; 54 55 56 57 force_sw = "0"b; /* Don't, unless we're allowed to */ 58 goto FIND_UID; 59 60 61 demand_deactivate$force_given_segno: 62 entry (a_segptr, a_code); 63 64 force_sw = "1"b; 65 66 FIND_UID: 67 segno = binary (baseno (a_segptr), 18); /* Find the UID for the segment */ 68 69 call get_kstep (segno, kstep, code); 70 if code ^= 0 then do; /* Bad segno, or something */ 71 a_code = code; 72 return; 73 end; 74 75 uid = kste.uid; 76 goto COMMON; 77 78 79 demand_deactivate$force: entry (a_seg_uid, a_code); /* Deactivate by UID, rather than segno, and force */ 80 81 uid = a_seg_uid; 82 force_sw = "1"b; /* Deactivate, if at all possible */ 83 84 85 COMMON: code = 0; /* Assume success */ 86 sst$demand_deact_attempts = sst$demand_deact_attempts + 1; 87 call lock$lock_ast (); 88 89 /* we don't go to the expense of deriving pvid, vtocx. If we have a double-uid, 90* we'll either find the right segment active, or we'll harrass the other segment 91* with the same uid. In either case, the segment we want will end up inactive, if possible. */ 92 93 astep = search_ast (uid); 94 if astep ^= null () then 95 if force_sw | aste.explicit_deact_ok then do;/* We're allowed to try it */ 96 if (astep -> aste.fp | astep -> aste.bp) = ""b 97 then do; 98 code = error_table_$illegal_deactivation; 99 go to RETURN; 100 end; 101 call deactivate (astep, code); /* See what happens */ 102 103 if code = 0 then sst$demand_deactivations = sst$demand_deactivations + 1; 104 end; /* Record successes */ 105 RETURN: 106 call lock$unlock_ast (); 107 a_code = code; 108 return; 109 110 /*format: off */ 111 /* 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 */ 111 112 /* START OF: kst.incl.pl1 * * * * * */ 2 2 2 3 /* 2 4*Modified March 1976 by R. Bratt 2 5*Modified November 1984 to remove hdr, Keith Loepere. */ 2 6 2 7 2 8 /****^ HISTORY COMMENTS: 2 9* 1) change(86-08-08,GDixon), approve(86-08-08,MCR7388), 2 10* audit(86-09-02,Farley), install(86-09-08,MR12.0-1150): 2 11* Add warning on use of kste.entryp. 2 12* END HISTORY COMMENTS */ 2 13 2 14 2 15 dcl pds$kstp ext ptr, 2 16 (kstp, kstep) ptr; 2 17 2 18 dcl 1 kst aligned based (kstp), /* KST header declaration */ 2 19 2 lowseg fixed bin (17), /* lowest segment number described by kst */ 2 20 2 highseg fixed bin (17), /* highest segment number described by kst */ 2 21 2 highest_used_segno fixed bin (17), /* highest segment number yet used */ 2 22 2 lvs fixed bin (8), /* number of private LVs this process is connected to */ 2 23 2 time_of_bootload fixed bin (71), /* bootload time during prelinking */ 2 24 2 garbage_collections fixed bin (17) unaligned, /* KST garbage collections */ 2 25 2 entries_collected fixed bin (17) unaligned, /* KST entries recovered by garbage collection */ 2 26 2 free_list bit (18) unaligned, /* relative pointer to first free kste */ 2 27 2 prelinked_ring (7) bit (1) unaligned, /* rings prelinked in process */ 2 28 2 template bit (1) unaligned, /* this is a template kst if set */ 2 29 2 allow_256K_connect bit (1) unaligned, /* can use 256K segments */ 2 30 2 unused_2 bit (9) unaligned, 2 31 2 uid_hash_bucket (0 : 127) bit (18) unaligned, /* hash buckets */ 2 32 2 kst_entry (0 refer (kst.lowseg):0 refer (kst.highseg)) aligned like kste, /* kst entries */ 2 33 2 lv (1:256) bit (36), /* private logical volume connection list */ 2 34 2 end_of_kst bit (36); 2 35 2 36 dcl 1 kste based (kstep) aligned, /* KST entry declaration */ 2 37 2 fp bit (18) unaligned, /* forward rel pointer */ 2 38 2 segno fixed bin (17) unaligned, /* segment number of this kste */ 2 39 2 usage_count (0:7) fixed bin (8) unaligned, /* outstanding initiates/ring */ 2 40 2 entryp ptr unaligned, /* branch pointer */ 2 41 /* See WARNING below for requirements to use entryp. */ 2 42 2 uid bit (36) aligned, /* unique identifier */ 2 43 2 access_information unaligned, 2 44 3 dtbm bit (36), /* date time branch modified */ 2 45 3 extended_access bit (33), /* extended access from the branch */ 2 46 3 access bit (3), /* rew */ 2 47 3 ex_rb (3) bit (3), /* ring brackets from branch */ 2 48 2 pad1 bit (3) unaligned, 2 49 2 flags unaligned, 2 50 3 dirsw bit (1), /* directory switch */ 2 51 3 allow_write bit (1), /* set if initiated with write permission */ 2 52 3 priv_init bit (1), /* privileged initiation */ 2 53 3 tms bit (1), /* transparent modification switch */ 2 54 3 tus bit (1), /* transparent usage switch */ 2 55 3 tpd bit (1), /* transparent paging device switch */ 2 56 3 audit bit (1), /* audit switch */ 2 57 3 explicit_deact_ok bit (1), /* set if I am willing to have a user force deactivate */ 2 58 3 pad bit (3), 2 59 2 infcount fixed bin (12) unaligned; /* _i_f dirsw _t_h_e_n inferior count _e_l_s_e lv index */ 2 60 2 61 2 62 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 63 /* */ 2 64 /* WARNING: Before using kste.entryp to get a pointer to the directory */ 2 65 /* entry associated with the kst entry, you must first validate its value */ 2 66 /* by calling sum$getbranch or sum$getbranch_root_my. This call also locks */ 2 67 /* the containing directory. The containing directory must remain locked */ 2 68 /* during the entire period when kste.entryp and the directory entry are */ 2 69 /* being referenced. Once the directory is unlocked, kste.entryp can no */ 2 70 /* longer be used to get a pointer to the entry within the unlocked */ 2 71 /* directory since the dir entry could have been moved within the directory */ 2 72 /* by another processor. */ 2 73 /* */ 2 74 /* If you only need a pointer to the directory containing the associated */ 2 75 /* dir entry (but not to the dir entry itself), you can use: */ 2 76 /* pointer (kste.entryp, 0) */ 2 77 /* without calling sum to lock the directory and validate entryp. GDixon */ 2 78 /* */ 2 79 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 80 2 81 /* END OF: kst.incl.pl1 * * * * * */ 112 113 114 end demand_deactivate; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0800.4 demand_deactivate.pl1 >spec>install>1110>demand_deactivate.pl1 111 1 01/30/85 1523.9 aste.incl.pl1 >ldd>include>aste.incl.pl1 112 2 09/18/86 1308.1 kst.incl.pl1 >ldd>include>kst.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_code parameter fixed bin(35,0) dcl 35 set ref 14 61 71* 79 107* a_seg_uid parameter bit(36) dcl 34 ref 79 81 a_segptr parameter pointer dcl 33 ref 14 61 66 aste based structure level 1 dcl 1-11 astep 000104 automatic pointer dcl 1-9 set ref 93* 94 94 96 96 101* baseno builtin function dcl 53 ref 66 binary builtin function dcl 53 ref 66 bp 0(18) based bit(18) level 2 packed packed unaligned dcl 1-11 ref 96 code 000101 automatic fixed bin(35,0) dcl 38 set ref 69* 70 71 85* 98* 101* 103 107 deactivate 000014 constant entry external dcl 45 ref 101 error_table_$illegal_deactivation 000026 external static fixed bin(35,0) dcl 51 ref 98 explicit_deact_ok 5(09) based bit(1) level 2 packed packed unaligned dcl 1-11 ref 94 force_sw 000103 automatic bit(1) dcl 40 set ref 57* 64* 82* 94 fp based bit(18) level 2 packed packed unaligned dcl 1-11 ref 96 get_kstep 000016 constant entry external dcl 46 ref 69 kste based structure level 1 dcl 2-36 kstep 000106 automatic pointer dcl 2-15 set ref 69* 75 lock$lock_ast 000020 constant entry external dcl 47 ref 87 lock$unlock_ast 000022 constant entry external dcl 48 ref 105 null builtin function dcl 53 ref 94 search_ast 000024 constant entry external dcl 49 ref 93 segno 000100 automatic fixed bin(17,0) dcl 37 set ref 66* 69* sst$demand_deact_attempts 000010 external static fixed bin(35,0) dcl 42 set ref 86* 86 sst$demand_deactivations 000012 external static fixed bin(35,0) dcl 43 set ref 103* 103 uid 4 based bit(36) level 2 in structure "kste" dcl 2-36 in procedure "demand_deactivate" ref 75 uid 000102 automatic bit(36) dcl 39 in procedure "demand_deactivate" set ref 75* 81* 93* 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 kst based structure level 1 dcl 2-18 kstp automatic pointer dcl 2-15 pds$kstp external static pointer dcl 2-15 seg_aste based structure level 1 dcl 1-96 NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000103 constant label dcl 85 set ref 76 FIND_UID 000032 constant label dcl 66 ref 58 RETURN 000173 constant label dcl 105 ref 99 demand_deactivate 000012 constant entry external dcl 14 demand_deactivate$force 000071 constant entry external dcl 79 demand_deactivate$force_given_segno 000023 constant entry external dcl 61 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 374 424 204 404 Length 640 204 30 177 170 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME demand_deactivate 81 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME demand_deactivate 000100 segno demand_deactivate 000101 code demand_deactivate 000102 uid demand_deactivate 000103 force_sw demand_deactivate 000104 astep demand_deactivate 000106 kstep demand_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. deactivate get_kstep lock$lock_ast lock$unlock_ast search_ast THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$illegal_deactivation sst$demand_deact_attempts sst$demand_deactivations LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 14 000006 57 000017 58 000020 61 000021 64 000030 66 000032 69 000041 70 000054 71 000056 72 000060 75 000061 76 000064 79 000065 81 000076 82 000101 85 000103 86 000104 87 000111 93 000115 94 000126 96 000140 98 000147 99 000152 101 000153 103 000164 105 000173 107 000200 108 000203 ----------------------------------------------------------- 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