TOPS-10 Version 7.04 Monitor Internals Course
Total Page:16
File Type:pdf, Size:1020Kb
TOPS-10 Version 7.04 Monitor Internals Course This document is the student guide that accompanies the TOPS-10 Version 7.04 Monitor Internals Course. Revision/Update Information: Version 1.0 Digital Equipment Corporation June 1989 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. Copyright ©1986, 1987, 1988, 1989 by Digital Equipment Corporation All Rights Reserved. Printed in U.S.A. The postpaid READER'S COM:MENTS form on the last page of this document requests the user's critical evaluation to assist in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DEC DIBOL UNIBUS DEC/CMS EduSystem VAX DECIMMS lAS VAXcluster DECnet MASSBUS VMS DECsystem-10 PDP VT DECSYSTEM-20 PDT DECUS RSTS DECwriter RSX This document was prepared using VAX DOCUMENT, Version 1.1 Contents Chapter 1 Introduction to the TOPS-10 Monitor 1.1 User Program Addressing ............................................... 1-1 1.2 Monitor Calls ......................................................... 1-3 1.3 Interrupts ........................................................... 1-3 1.4 The Monitor .......................................................... 1-3 1.5 Structure of the Monitor .................................... "............ 1-4 1.6 The Monitor as an Event Processor ........................................ 1-5 Chapter 2 Monitor Cycle 2.1 The Control Routine .................................................... 2-1 2.1.1 Time Accounting ................................................ 2-1 2.1.2 Time Limit .................................................... 2-2 2.1.3 System Time Accounting ......................................... 2-2 2.1.4 Timing Requests ............................................... 2-3 2.1.5 Calling the Scheduler ............................................ 2-3 2.1.6 Context Switching .............................................. 2-3 2.1.7 CPU Tick Dependent Code ........................................ 2-3 2.1.8 Returning Control to the User ..................................... 2-4 2.2 Repeating the Cycle .................................................... 2-4 2.3 Clock Interrupt ....................................................... 2-4 2.4 Program Blocked ...................................................... 2-5 2.5 Saving the PC word .................................................... 2-5 iii Chapter 3 Command Processor 3.1 The Command Processor ................................................ 3-1 3.2 Terminal Considerations ................................................ 3-2 3.3 The Dispatch Process ................................................... 3-2 3.3.1 Command Tables ............................................... 3-2 3.3.2 Table Format ................................................ ~ . 3-2 3.3.3 Dispatching ................................................... 3-3 3.4 Long Routines ........................................................ 3-3 3.5 Forced Commands ..................................................... 3-4 3.6 Predispatch Bits ....................................................... 3-4 3.7 Postdispatch Bits ...................................................... 3-5 Chapter 4 Memory Management 4.1 Introduction .................................................. ' ........ 4-1 4.2 Allocation and Assignment ............................................... 4-2 4.3 Memory Management Data Base .......................................... 4-2 4.4 Memory Management Algorithms ......................................... 4-4 4.5 Core Allocation ........................................................ 4-4 4.5.1 CORE Command ............................................... 4-5 4.5.2 CORE DUO ................................................... 4-5 4.5.3 COREl Routine ................................................ 4--6 4.6 Core Assignment ...................................................... 4--6 4.7 Creating a UPr ....................................................... 4-7 4.8 Virtual Memory ....................................................... 4-9 4.8.1 Virtual Memory Data Base ...................................... 4-11 4.8.2 PAGE. DUO .................................................. 4-11 4.8.2.1 The .PAGIO Function ..................................... 4-12 4.8.2.2 The .PAGeD Function .................................... 4-13 4.8.2.3 The .PAGEM Function .................................... 4-13 4.8.2.4 The .PAGAA Function .......................... ' .......... 4-14 4.8.2.5 The .PAGWS Function .................................... 4-15 4.8.2.6 The .PAGGA Function .................................... 4-15 4.8.2.7 The .PAGCA Function .................................... 4-15 4.8.2.8 The .PAGeH Function .................................... 4-16 4.8.2.9 The .PAGCB Function .................................... 4-16 4.8.2.10 The .PAGSP Function .................................... 4-17 4.8.2.11 The .PAGSC Function .................................... 4-18 4.8.2.12 The .PAGBM Function .................................... 4-19 4.8.2.13 The .PAGAL Function .................................... 4-19 4.8.3 Internal Use of the PAGE. DUO .................................. 4-20 iv 4.8.4 Page Fault Handlers ........................................... 4-20 4.8.4.1 Page Failure ........................................... 4-21 4.8.4.2 Potential Page Failure .................................... 4-22 4.8.4.3 'Virtual Time 'I'rap ....................................... 4-22 4.8.4.4 Page Fault Handler Conditions ............................. 4-23 4.8.5 System Page Fault Handler (SYS:PFH.EXE) ......................... 4-23 4.8.6 Monitor Page Fault Handler (MONPFH) ............................ 4-24 4.9 Paging Queues ....................................................... 4-24 4.10 Internal Paging Queues ................................................ 4-25 4.11 Sharable High Segments ............................................... 4-25 4.11.1 High Segment Map ............................................. 4-25 4.11.2 Per-Job Database .............................................. 4-26 4.12 Alternate Contexts .................................................... 4-27 4.12.1 Saving and Restoring the State of a Job ............................ 4-27 4.12.2 System Services ............................................... 4-28 4.12.3 Program Interface ............................................. 4-28 4.12.4 CTX. UUO Functions ........................................... 4-30 4.12.5 Command Interface ............................................ 4-32 4.12.5.1 CONTEXT Command ..................................... 4-32 4.12.5.2 List Options ............................................ 4-32 4.12.5.3 Create Option .......................................... 4-32 4.12.5.4 Delete Option ........................................... 4-33 4.12.5.5 Naming Option ......................................... 4-33 4.12.5.6 Switch Option .......................................... 4-34 4.12.5.7 PUSH Command ........................................ 4-34 4.12.5.8 POP Command ..................................... .- .... 4-34 4.12.5.9 Auto-Save and Restore .................................... 4-35 4.12.5.10 SET WATCH Command ................................... 4-35 4.12.6 Conservation of System Resources ................................. 4-35 4.12.7 Administration ................................................ 4-36 Chapter 5 InterProcess Communication Facility (IPCF) 5.1 Introduction .......................................................... 5-1 5.1.1 Communicating with packets ...................................... 5-1 5.2 Identif:ying Processes ................................................... 5-1 5.2.1 Job Numbers and Job-Context Handles (JCH) ......................... 5-2 5.2.2 Process IDentification Numbers.(PIDs) .............................. 5-2 5.2.3 Symbolic Process Names ......................................... 5-2 5.3 System Processes and Known PIDs ....................... '.' ............... 5-2 5.3.1 [SYSTEM]IPCC ................................................ 5-3 5.3.2 [SYSTEM]INFO ................................................ 5-4 v 5.3.3 [SYSTEM]GOPHER ............................................. 5-4 5.3.3.1 LOOKUPs and ENTERs on File Daemon Protected Files .......... 5-4 5.3.3.2 QUEUE. UUOs .......................................... 5-5 5.3.3.3 IPCFM. Calls to [SYSTEM]INFO ............................. 5-5 5.4 Message-Sending Mechanics ............................................. 5-5 5.4.1 Short-Form Messages ............................................ 5-5 5.4.2 Long-Form (Page-Mode) Messages .................................. 5-6 5.4.3 Performance Considerations ....................................... 5-6 5.5 IPCF Data Structures .................................................. 5-6 5.5.1 System-Wide Common Data ....................................... 5-7 5.5.2 Job-specific data ................................................ 5-7 5.5.3 Context-specific data ...........................................