COMPILATION LISTING OF SEGMENT other_process_info 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 1044.3 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 6* * * 7* *********************************************************** */ 8 9 /* format: style4 */ 10 11 /* other_process_info - find out things about another process, typically 12* by snooping in its pds */ 13 14 /* 83-05-09 coded E. N. Kittlitz */ 15 /* 83-12-05 modified to lock AST while peeking at other guy's PDS */ 16 17 other_process_info: proc; 18 19 dcl a_code fixed bin (35); 20 dcl a_processid bit (36) aligned; 21 dcl a_privs bit (36) aligned; 22 23 dcl abs_seg_ptr ptr; 24 dcl pds_sdw bit (72) aligned; 25 dcl pds_sdw_ptr ptr; 26 dcl processid bit (36) aligned; 27 28 dcl 1 process_auth aligned like aim_template; 29 30 dcl error_table_$process_unknown fixed bin (35) ext static; 31 dcl initializer_abs_seg$ fixed bin ext static; 32 dcl sst$ fixed bin ext static; 33 34 dcl 1 pds$access_authorization aligned like aim_template ext static; 35 36 dcl get_ptrs_$given_astep entry (ptr) returns (bit (72) aligned); 37 dcl lock$lock_ast entry; 38 dcl lock$unlock_ast entry; 39 dcl privileged_mode_ut$swap_sdw entry (ptr, ptr); 40 dcl tc_util$get_aptep entry (bit (36) aligned, bit (1) aligned) returns (ptr); 41 42 dcl (addr, null, ptr, rel) builtin; 43 44 return; 45 46 47 get_privileges: entry (a_processid, a_privs, a_code); 48 49 processid = a_processid; 50 aptep = tc_util$get_aptep (processid, "1"b); 51 if aptep = null then go to foo_process; 52 abs_seg_ptr = addr (initializer_abs_seg$); 53 pds_sdw_ptr = addr (pds_sdw); 54 55 call lock$lock_ast; /* AST LOCKED */ 56 57 pds_sdw = get_ptrs_$given_astep (ptr (addr (sst$), aptep -> apte.pds)); 58 call privileged_mode_ut$swap_sdw (abs_seg_ptr, pds_sdw_ptr); 59 process_auth = ptr (abs_seg_ptr, rel (addr (pds$access_authorization))) -> aim_template; 60 61 call lock$unlock_ast; /* AST UNLOCKED */ 62 63 pds_sdw = ""b; 64 call privileged_mode_ut$swap_sdw (abs_seg_ptr, pds_sdw_ptr); 65 if apte.processid ^= processid then /* something changed behind our backs */ 66 go to foo_process; 67 a_privs = unspec (addr (process_auth) -> aim_template.privileges); 68 a_code = 0; 69 return; 70 71 foo_process: a_code = error_table_$process_unknown; 72 a_privs = ""b; 73 return; 74 75 /* BEGIN INCLUDE FILE aim_template.incl.pl1 */ 1 2 1 3 /* Created 740723 by PG */ 1 4 /* Modified 06/28/78 by C. D. Tavares to add rcp privilege */ 1 5 /* Modified 83-05-10 by E. N. Kitltitz to add communications privilege */ 1 6 1 7 /* This structure defines the components of both an access 1 8* class and an access authorization as interpreted by the 1 9* Access Isolation Mechanism. */ 1 10 1 11 1 12 dcl 1 aim_template aligned based, /* authorization/access class template */ 1 13 2 categories bit (36), /* access categories */ 1 14 2 level fixed bin (17) unaligned, /* sensitivity level */ 1 15 2 privileges unaligned, /* special access privileges (in authorization only) */ 1 16 (3 ipc, /* interprocess communication privilege */ 1 17 3 dir, /* directory privilege */ 1 18 3 seg, /* segment privilege */ 1 19 3 soos, /* security out-of-service privilege */ 1 20 3 ring1, /* ring 1 access privilege */ 1 21 3 rcp, /* RCP resource access privilege */ 1 22 3 comm) bit (1), /* communications cross-AIM privilege */ 1 23 3 pad bit (11); 1 24 1 25 1 26 /* END INCLUDE FILE aim_template.incl.pl1 */ 75 76 /* BEGIN INCLUDE FILE ... apte.incl.pl1 */ 2 2 2 3 /* Modified 1984-11-11 by E. Swenson for IPC event channel validation. */ 2 4 2 5 dcl aptep pointer; 2 6 2 7 dcl 1 apte based (aptep) aligned, /* APT entry declaration for an active (known) process */ 2 8 2 thread unaligned, /* List thread */ 2 9 3 fp bit (18), /* Forward pointer */ 2 10 3 bp bit (18), /* Backward pointer */ 2 11 2 flags unaligned, /* Flags and miscellaneous */ 2 12 3 mbz bit (1), /* This bit must be zero (sentinel bit) */ 2 13 3 wakeup_waiting bit (1), /* ON if process has received wakeup */ 2 14 3 stop_pending bit (1), /* ON if process has received stop connect */ 2 15 3 pre_empted bit (1), /* ON if process is being pre-empted by get_processor */ 2 16 3 hproc bit (1), /* ON if process is hardcore process */ 2 17 3 loaded bit (1), /* ON if required per-process pages are in memory and wired */ 2 18 3 eligible bit (1), /* ON if process is eligible */ 2 19 3 idle bit (1), /* ON if this is an idle process */ 2 20 3 interaction bit (1), /* ON if process has interacted recently */ 2 21 3 pre_empt_pending bit (1), /* ON if process has received pre-empt connect */ 2 22 3 default_procs_required bit (1), /* ON if apte.procs_required is system default */ 2 23 3 realtime_burst bit (1), /* ON if next eligibility is realtime */ 2 24 3 always_loaded bit (1), /* ON if process is not to be unloaded */ 2 25 3 dbr_loaded bit (1), /* ON if DBR is loaded on some CPU */ 2 26 3 being_loaded bit (1), /* ON if somebody loading this process */ 2 27 3 shared_stack_0 bit (1), /* ON if a shared stack_0 is assigned */ 2 28 3 page_wait_flag bit (1), /* flag ON if waiting for page */ 2 29 3 firstsw bit (1), /* OFF until process is intialized */ 2 30 3 state bit (18), /* execution state */ 2 31 2 page_faults fixed bin (35), /* total page faults for the process */ 2 32 2 processid bit (36), /* bit 0-17: offset of ATPE */ 2 33 /* bit 18-35: sequential number */ 2 34 2 te fixed bin (35), /* virtual time since eligibility award */ 2 35 2 ts fixed bin (35), /* virtual time since scheduling */ 2 36 2 ti fixed bin (35), /* virtual time since interaction */ 2 37 2 timax fixed bin (35), /* maximum value allowed for apte.ti */ 2 38 2 39 /* * * * * * * * */ 2 40 2 41 2 ipc_pointers unaligned, 2 42 3 event_thread bit (18), /* relative pointer to ITT list */ 2 43 3 pad3 bit (18), 2 44 2 ips_message bit (36), /* IPS signals pending */ 2 45 2 asteps unaligned, /* relative ASTE pointers */ 2 46 3 pds bit (18), /* PDS (per-process) */ 2 47 3 dseg bit (18), /* DSEG (per-process) */ 2 48 3 prds bit (18), /* PRDS (per-processor) */ 2 49 2 savex7 bit (18) unaligned, /* x7 at call to getwork (return point in pxss) */ 2 50 2 term_processid bit (36), /* process to send wakeup at temination */ 2 51 2 lock_id bit (36), /* File System unqieu ID associated with process */ 2 52 2 time_used_clock fixed bin (71), /* Total CPU time when process last lost CPU */ 2 53 2 54 /* * * * * * * * */ 2 55 2 56 2 wait_event bit (36) aligned, /* Event ID process awaiting */ 2 57 2 wct_index bit (18) unaligned, /* rel offset of WCTE */ 2 58 2 flags2 unaligned, 2 59 3 priority_scheduling bit (1), /* ON if guaranteed eligibility */ 2 60 3 special_wakeups bit (6), /* Special wakeup channels */ 2 61 3 pad7 bit (7), 2 62 3 batch bit (1), /* ON if absentee */ 2 63 3 pr_tag bit (3), /* CPU tag running or last run */ 2 64 2 state_change_time fixed bin (71), /* Time apte.state last changed */ 2 65 2 alarm_event fixed bin (71), /* wakeup event for alarm clock manager */ 2 66 2 alarm_time_thread bit (18) unaligned, /* thread of processes with pending alarms */ 2 67 2 alarm_time bit (54) unaligned, /* wakeup time for alarm */ 2 68 2 69 /* * * * * * */ 2 70 2 71 2 term_channel fixed bin (71), /* wakeup event for account overflow */ 2 72 2 ws_size fixed bin, /* working set estimate for the process */ 2 73 2 temax fixed bin (35), /* maximum eligibility slice (vcpu) */ 2 74 2 deadline fixed bin (71), /* time of next run */ 2 75 2 lock bit (18) unaligned, /* 0 => APTE locked, unlocked => return point of last unlock */ 2 76 2 unusable bit (18) unaligned, /* locking routines destroy */ 2 77 2 cpu_monitor fixed bin (35), /* if not 0, send wakeup to term_processid when virtual cpu 2 78* /* reaches this (units = 1/1024 sec) */ 2 79 2 paging_measure fixed bin (71), /* cumulative memory units */ 2 80 2 access_authorization bit (72), /* authorization of this process */ 2 81 2 dbr fixed bin (71), /* DBR value (constant since DSEG entry-held) */ 2 82 2 83 2 virtual_cpu_time fixed bin (71), /* cumulative virtual CPU time for the process */ 2 84 2 ittes_sent fixed bin (18), /* Unprocessed ITTs sent by this process */ 2 85 2 ittes_got fixed bin (18), /* Unprocessed ITTs received by this process */ 2 86 2 87 /* Cells used to drive and instrument finite-state model for response time 2 88* measurement. Maintained by meter_response_time */ 2 89 2 90 2 current_response_state fixed bin (17) unaligned, /* Process state in modle */ 2 91 2 pad18 bit (18) unaligned, 2 92 2 number_processing fixed bin (35), /* Number interactions */ 2 93 2 last_response_state_time fixed bin (71), /* Clock time at last response state change */ 2 94 2 total_processing_time fixed bin (71), /* Total interaction processing time */ 2 95 2 96 /* * * * * * */ 2 97 2 98 2 begin_interaction_vcpu fixed bin (71), /* Virtual cpu at beginning of last interaction */ 2 99 2 100 /* End of cells for finite-state model */ 2 101 2 102 2 saved_temax fixed bin (35), /* temax at eligibility award */ 2 103 2 procs_required bit (8) unaligned, /* bit mask of CPUs this process can run */ 2 104 2 pad4 bit (28) unaligned, 2 105 2 ipc_r_offset fixed bin (18) unsigned, 2 106 2 ipc_r_factor fixed bin (35) unsigned, 2 107 2 apad (10) fixed bin (35); 2 108 2 109 /* END INCLUDE FILE ... apte.incl.pl1 */ 76 77 78 end other_process_info; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0800.6 other_process_info.pl1 >spec>install>1110>other_process_info.pl1 75 1 09/07/83 1610.6 aim_template.incl.pl1 >ldd>include>aim_template.incl.pl1 76 2 01/06/85 1422.2 apte.incl.pl1 >ldd>include>apte.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 19 set ref 47 68* 71* a_privs parameter bit(36) dcl 21 set ref 47 67* 72* a_processid parameter bit(36) dcl 20 ref 47 49 abs_seg_ptr 000100 automatic pointer dcl 23 set ref 52* 58* 59 64* addr builtin function dcl 42 ref 52 53 57 57 59 67 aim_template based structure level 1 dcl 1-12 ref 59 apte based structure level 1 dcl 2-7 aptep 000112 automatic pointer dcl 2-5 set ref 50* 51 57 57 65 asteps 12 based structure level 2 packed packed unaligned dcl 2-7 error_table_$process_unknown 000010 external static fixed bin(35,0) dcl 30 ref 71 get_ptrs_$given_astep 000020 constant entry external dcl 36 ref 57 initializer_abs_seg$ 000012 external static fixed bin(17,0) dcl 31 set ref 52 lock$lock_ast 000022 constant entry external dcl 37 ref 55 lock$unlock_ast 000024 constant entry external dcl 38 ref 61 null builtin function dcl 42 ref 51 pds 12 based bit(18) level 3 packed packed unaligned dcl 2-7 ref 57 57 pds$access_authorization 000016 external static structure level 1 dcl 34 set ref 59 pds_sdw 000102 automatic bit(72) dcl 24 set ref 53 57* 63* pds_sdw_ptr 000104 automatic pointer dcl 25 set ref 53* 58* 64* privileged_mode_ut$swap_sdw 000026 constant entry external dcl 39 ref 58 64 privileges 1(18) based structure level 2 packed packed unaligned dcl 1-12 ref 67 process_auth 000110 automatic structure level 1 dcl 28 set ref 59* 67 processid 3 based bit(36) level 2 in structure "apte" dcl 2-7 in procedure "other_process_info" ref 65 processid 000106 automatic bit(36) dcl 26 in procedure "other_process_info" set ref 49* 50* 65 ptr builtin function dcl 42 ref 57 57 59 rel builtin function dcl 42 ref 59 sst$ 000014 external static fixed bin(17,0) dcl 32 set ref 57 57 tc_util$get_aptep 000030 constant entry external dcl 40 ref 50 NAMES DECLARED BY EXPLICIT CONTEXT. foo_process 000162 constant label dcl 71 ref 51 65 get_privileges 000023 constant entry external dcl 47 other_process_info 000011 constant entry external dcl 17 NAME DECLARED BY CONTEXT OR IMPLICATION. unspec builtin function ref 67 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 340 372 170 350 Length 606 170 32 177 150 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME other_process_info 90 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME other_process_info 000100 abs_seg_ptr other_process_info 000102 pds_sdw other_process_info 000104 pds_sdw_ptr other_process_info 000106 processid other_process_info 000110 process_auth other_process_info 000112 aptep other_process_info 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. get_ptrs_$given_astep lock$lock_ast lock$unlock_ast privileged_mode_ut$swap_sdw tc_util$get_aptep THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$process_unknown initializer_abs_seg$ pds$access_authorization sst$ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 17 000010 44 000016 47 000017 49 000030 50 000033 51 000050 52 000054 53 000057 55 000061 57 000065 58 000106 59 000117 61 000127 63 000134 64 000136 65 000147 67 000153 68 000160 69 000161 71 000162 72 000166 73 000167 ----------------------------------------------------------- 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