COMPILATION LISTING OF SEGMENT private_logical_volume 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 1021.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 private_logical_volume: proc (); 14 15 /* 16* 17* Written Janurary 1976 by R. Bratt 18* 19* Last modified: 20* 21* private_logical_volume maintains a per-process list of those LVs to which a process is 22* connected. The connect entry point enters a LV in this list. The disconnect entry point 23* removes an entry from this list. To prevent a process from using a LV after it disconnects from 24* it, the disconnect entry point setfaults all segments in the process' address space which reside 25* upon the LV it is disconnecting. Naturally seg_fault must not reconnect a sdw unless 26* the appropriate LV is mounted for the process. The lvt entry point is used by ring zero 27* to determine whether the process has the LV mounted. 28* 29**/ 30 31 dcl a_lvid bit (36) aligned, 32 a_code fixed bin (35), 33 a_lvx fixed bin (8); 34 35 dcl lvid bit (36) aligned, 36 kstex fixed bin (17), 37 lvx fixed bin (8); 38 39 dcl (error_table_$nrmkst, error_table_$logical_volume_not_connected, 40 error_table_$logical_volume_is_connected) ext fixed bin (35); 41 42 dcl setfaults$disconnect entry (fixed bin (17)); 43 44 /* */ 45 46 connect: entry (a_lvid, a_code); 47 lvid = a_lvid; 48 a_code = 0; 49 kst.lv (find_hole (lvid)) = lvid; 50 kst.lvs = kst.lvs + 1; 51 return; 52 53 lvx: entry (a_lvid, a_lvx, a_code); 54 a_lvx = 0; 55 a_code = 0; 56 a_lvx = find ((a_lvid)); 57 return; 58 59 disconnect: entry (a_lvid, a_code); 60 lvid = a_lvid; 61 a_code = 0; 62 lvx = find (lvid); 63 /* kung-fu segments connected to LV */ 64 do kstex = kst.lowseg to kst.highseg; 65 kstep = addr (kst.kst_entry (kstex)); 66 if ^kste.dirsw 67 then if kste.infcount = lvx 68 then do; 69 call setfaults$disconnect ((kste.segno)); /* fault him */ 70 kste.infcount = 0; /* mark as no longer connected to private LV */ 71 end; 72 end; 73 kst.lv (lvx) = "0"b; 74 kst.lvs = kst.lvs - 1; 75 return; 76 77 /* */ 78 79 find_hole: proc (lvid /* , kstp */) returns (fixed bin (8)); 80 dcl lvid bit (36) aligned, 81 lvx fixed bin (8), 82 lvs fixed bin (8), 83 hashx fixed bin (8), 84 holex fixed bin (8), 85 find bit (1) aligned init ("1"b); 86 87 find = "0"b; 88 89 find: entry (lvid /* , kstp */) returns (fixed bin (8)); 90 kstp = pds$kstp; 91 holex = 0; 92 lvs = kst.lvs; 93 hashx = mod (bin (bin (lvid), 35), dimension (kst.lv, 1)); 94 do lvx = hashx to dimension (kst.lv, 1), 95 1 to hashx while (lvs > 0); 96 if kst.lv (lvx) ^= "0"b 97 then do; 98 if kst.lv (lvx) = lvid 99 then if find 100 then return (lvx); 101 else call abort (error_table_$logical_volume_is_connected); 102 lvs = lvs - 1; 103 end; 104 else if holex = 0 then holex = lvx; 105 end; 106 if find 107 then call abort (error_table_$logical_volume_not_connected); 108 else if holex ^= 0 109 then return (holex); 110 else call abort (error_table_$nrmkst); 111 end find_hole; 112 113 abort: proc (code); 114 dcl code fixed bin (35); 115 a_code = code; 116 go to return_to_caller; 117 end abort; 118 119 return_to_caller: 120 return; 121 122 /* */ 123 1 1 /* START OF: kst.incl.pl1 * * * * * */ 1 2 1 3 /* 1 4*Modified March 1976 by R. Bratt 1 5*Modified November 1984 to remove hdr, Keith Loepere. */ 1 6 1 7 1 8 /****^ HISTORY COMMENTS: 1 9* 1) change(86-08-08,GDixon), approve(86-08-08,MCR7388), 1 10* audit(86-09-02,Farley), install(86-09-08,MR12.0-1150): 1 11* Add warning on use of kste.entryp. 1 12* END HISTORY COMMENTS */ 1 13 1 14 1 15 dcl pds$kstp ext ptr, 1 16 (kstp, kstep) ptr; 1 17 1 18 dcl 1 kst aligned based (kstp), /* KST header declaration */ 1 19 2 lowseg fixed bin (17), /* lowest segment number described by kst */ 1 20 2 highseg fixed bin (17), /* highest segment number described by kst */ 1 21 2 highest_used_segno fixed bin (17), /* highest segment number yet used */ 1 22 2 lvs fixed bin (8), /* number of private LVs this process is connected to */ 1 23 2 time_of_bootload fixed bin (71), /* bootload time during prelinking */ 1 24 2 garbage_collections fixed bin (17) unaligned, /* KST garbage collections */ 1 25 2 entries_collected fixed bin (17) unaligned, /* KST entries recovered by garbage collection */ 1 26 2 free_list bit (18) unaligned, /* relative pointer to first free kste */ 1 27 2 prelinked_ring (7) bit (1) unaligned, /* rings prelinked in process */ 1 28 2 template bit (1) unaligned, /* this is a template kst if set */ 1 29 2 allow_256K_connect bit (1) unaligned, /* can use 256K segments */ 1 30 2 unused_2 bit (9) unaligned, 1 31 2 uid_hash_bucket (0 : 127) bit (18) unaligned, /* hash buckets */ 1 32 2 kst_entry (0 refer (kst.lowseg):0 refer (kst.highseg)) aligned like kste, /* kst entries */ 1 33 2 lv (1:256) bit (36), /* private logical volume connection list */ 1 34 2 end_of_kst bit (36); 1 35 1 36 dcl 1 kste based (kstep) aligned, /* KST entry declaration */ 1 37 2 fp bit (18) unaligned, /* forward rel pointer */ 1 38 2 segno fixed bin (17) unaligned, /* segment number of this kste */ 1 39 2 usage_count (0:7) fixed bin (8) unaligned, /* outstanding initiates/ring */ 1 40 2 entryp ptr unaligned, /* branch pointer */ 1 41 /* See WARNING below for requirements to use entryp. */ 1 42 2 uid bit (36) aligned, /* unique identifier */ 1 43 2 access_information unaligned, 1 44 3 dtbm bit (36), /* date time branch modified */ 1 45 3 extended_access bit (33), /* extended access from the branch */ 1 46 3 access bit (3), /* rew */ 1 47 3 ex_rb (3) bit (3), /* ring brackets from branch */ 1 48 2 pad1 bit (3) unaligned, 1 49 2 flags unaligned, 1 50 3 dirsw bit (1), /* directory switch */ 1 51 3 allow_write bit (1), /* set if initiated with write permission */ 1 52 3 priv_init bit (1), /* privileged initiation */ 1 53 3 tms bit (1), /* transparent modification switch */ 1 54 3 tus bit (1), /* transparent usage switch */ 1 55 3 tpd bit (1), /* transparent paging device switch */ 1 56 3 audit bit (1), /* audit switch */ 1 57 3 explicit_deact_ok bit (1), /* set if I am willing to have a user force deactivate */ 1 58 3 pad bit (3), 1 59 2 infcount fixed bin (12) unaligned; /* _i_f dirsw _t_h_e_n inferior count _e_l_s_e lv index */ 1 60 1 61 1 62 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 63 /* */ 1 64 /* WARNING: Before using kste.entryp to get a pointer to the directory */ 1 65 /* entry associated with the kst entry, you must first validate its value */ 1 66 /* by calling sum$getbranch or sum$getbranch_root_my. This call also locks */ 1 67 /* the containing directory. The containing directory must remain locked */ 1 68 /* during the entire period when kste.entryp and the directory entry are */ 1 69 /* being referenced. Once the directory is unlocked, kste.entryp can no */ 1 70 /* longer be used to get a pointer to the entry within the unlocked */ 1 71 /* directory since the dir entry could have been moved within the directory */ 1 72 /* by another processor. */ 1 73 /* */ 1 74 /* If you only need a pointer to the directory containing the associated */ 1 75 /* dir entry (but not to the dir entry itself), you can use: */ 1 76 /* pointer (kste.entryp, 0) */ 1 77 /* without calling sum to lock the directory and validate entryp. GDixon */ 1 78 /* */ 1 79 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 80 1 81 /* END OF: kst.incl.pl1 * * * * * */ 124 125 126 end private_logical_volume; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0808.5 private_logical_volume.pl1 >spec>install>1112>private_logical_volume.pl1 124 1 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 31 set ref 46 48* 53 55* 59 61* 115* a_lvid parameter bit(36) dcl 31 ref 46 47 53 56 59 60 a_lvx parameter fixed bin(8,0) dcl 31 set ref 53 54* 56* code parameter fixed bin(35,0) dcl 114 ref 113 115 dirsw 7(12) based bit(1) level 3 packed packed unaligned dcl 1-36 ref 66 error_table_$logical_volume_is_connected 000014 external static fixed bin(35,0) dcl 39 set ref 101* error_table_$logical_volume_not_connected 000012 external static fixed bin(35,0) dcl 39 set ref 106* error_table_$nrmkst 000010 external static fixed bin(35,0) dcl 39 set ref 110* find 000126 automatic bit(1) initial dcl 80 set ref 80* 87* 98 106 flags 7(12) based structure level 2 packed packed unaligned dcl 1-36 hashx 000124 automatic fixed bin(8,0) dcl 80 set ref 93* 94 94 highseg 1 based fixed bin(17,0) level 2 dcl 1-18 ref 49 64 73 93 94 96 98 holex 000125 automatic fixed bin(8,0) dcl 80 set ref 91* 104 104* 108 108 infcount 7(23) based fixed bin(12,0) level 2 packed packed unaligned dcl 1-36 set ref 66 70* kst based structure level 1 dcl 1-18 kst_entry 110 based structure array level 2 dcl 1-18 set ref 65 kste based structure level 1 dcl 1-36 kstep 000106 automatic pointer dcl 1-15 set ref 65* 66 66 69 70 kstex 000101 automatic fixed bin(17,0) dcl 35 set ref 64* 65* kstp 000104 automatic pointer dcl 1-15 set ref 49 50 50 64 64 65 73 74 74 90* 92 93 94 96 98 lowseg based fixed bin(17,0) level 2 dcl 1-18 ref 49 64 65 73 93 94 96 98 lv based bit(36) array level 2 dcl 1-18 set ref 49* 73* 93 94 96 98 lvid parameter bit(36) dcl 80 in procedure "find_hole" ref 79 89 93 98 lvid 000100 automatic bit(36) dcl 35 in procedure "private_logical_volume" set ref 47* 49* 49 60* 62* lvs 000123 automatic fixed bin(8,0) dcl 80 in procedure "find_hole" set ref 92* 102* 102 105 lvs 3 based fixed bin(8,0) level 2 in structure "kst" dcl 1-18 in procedure "private_logical_volume" set ref 50* 50 74* 74 92 lvx 000102 automatic fixed bin(8,0) dcl 35 in procedure "private_logical_volume" set ref 62* 66 73 lvx 000122 automatic fixed bin(8,0) dcl 80 in procedure "find_hole" set ref 94* 96 98 98 104* pds$kstp 000020 external static pointer dcl 1-15 ref 90 segno 0(18) based fixed bin(17,0) level 2 packed packed unaligned dcl 1-36 ref 69 setfaults$disconnect 000016 constant entry external dcl 42 ref 69 NAMES DECLARED BY EXPLICIT CONTEXT. abort 000400 constant entry internal dcl 113 ref 101 106 110 connect 000024 constant entry external dcl 46 disconnect 000113 constant entry external dcl 59 find 000234 constant entry internal dcl 89 ref 56 62 find_hole 000227 constant entry internal dcl 79 ref 49 lvx 000063 constant entry external dcl 53 private_logical_volume 000012 constant entry external dcl 13 return_to_caller 000221 constant label dcl 119 ref 116 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 65 bin builtin function ref 93 93 dimension builtin function ref 93 94 mod builtin function ref 93 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 544 566 423 554 Length 764 423 22 162 120 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME private_logical_volume 116 external procedure is an external procedure. find_hole internal procedure shares stack frame of external procedure private_logical_volume. abort internal procedure shares stack frame of external procedure private_logical_volume. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME private_logical_volume 000100 lvid private_logical_volume 000101 kstex private_logical_volume 000102 lvx private_logical_volume 000104 kstp private_logical_volume 000106 kstep private_logical_volume 000122 lvx find_hole 000123 lvs find_hole 000124 hashx find_hole 000125 holex find_hole 000126 find find_hole THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac mdfx1 signal_op ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. setfaults$disconnect THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$logical_volume_is_connected error_table_$logical_volume_not_connected error_table_$nrmkst pds$kstp LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000011 46 000017 47 000034 48 000037 49 000040 50 000055 51 000056 53 000057 54 000073 55 000075 56 000076 57 000110 59 000111 60 000123 61 000126 62 000127 64 000131 65 000141 66 000152 69 000162 70 000175 72 000202 73 000204 74 000216 75 000220 119 000221 80 000223 79 000227 87 000232 89 000233 90 000237 91 000243 92 000244 93 000247 94 000255 96 000263 98 000277 101 000307 102 000316 103 000320 104 000321 105 000325 106 000346 108 000360 110 000365 111 000374 113 000400 115 000402 116 000404 ----------------------------------------------------------- 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