!TITLE Processes !<Initiation of Processes ! Processes are created by communication with process DIRECT, in three ! ways: ! ! * By the arrival of a log-on message from the front-end network. ! ! * By a (batch) start-up message from SPOOLR. ! ! * By an operator command to DIRECT: D/START username ! ! For an 'interactive' start, DIRECT first checks that the request is ! valid, ie the username is good and the password is correct, and that it ! can be honoured, ie the system is 'open to users'. ! ! Next, DIRECT checks that the user does not already have as many ! processes running as he is allowed (typically 1 interactive, 1 batch ! and a total of 2). The 'invocation number' is calculated and this is ! appended to the names of workfiles to make them unique. DIRECT now ! creates ! ! a stack file #STK n ! a local controller stack file #LCSTK n ! the Director GLA #DGLA n ! for an interactive start, ! a terminal buffer T#IT n ! a user information file #UINFI n ! ! If this is done successfully, DIRECT requests Supervisor to start the ! new process. ! ! The new process is entered via the procedure Director which ! connects ! ! the System Call table ! DIRLOG ! #UINFI n ! ! then creates and connects the signal stack, #SIGSTK n and connects ! the nominated basefile (or the default if none is specified or if the ! specified basefile is not available). Finally, it creates and ! connects the 'base GLA' #BGLA n. (A total of 7 work files). !> !<Fields in the User Record ! The User Record contains several fields which specify how the process ! should run. Some of these fields are determined exclusively by the ! System Manager, others are controlled by the process owner. These ! fields can be set by use of the Director procedure DSFI, invoked either ! from the System Manager's process MANAGR or in a previous invocation of ! the user's process. Some of the fields may also be set by commands to ! the DIRECT process. The following is a list of fields relevant to ! process start-up: ! ! Field DSFI TYPE no. DIRECT command ! ! Basefile name 0 D/SETBASEF ! Batch basefile name ! D/BASEF ! Interactive and batch 5 ! passwords ! ACR level at which the 7 (priv.) D/ACR ! process is to run ! Director version number 8 (priv.) ! Process stack file size 10 ! Process concurrency limits 14 (priv.) ! Director monitor level 16 ! Contingency monitor level 17 ! Director monitor file name 19 ! Test basefile name 35 ! ! The items marked "priv." may be set only by privileged processes, in ! particular, the MANAGR process. !> !<Entry to the subsystem ! To enter the subsystem, Director proceeds as follows: ! ! * The processor PC is set to point to the address which is the ! basefile segment address plus the contents of the second word of ! the basefile. ! ! * The processor LNB is set to the start of the processor stack ! segment, currently local segment 4. ! ! * The processor SF is set to be 7 words greater than LNB. ! ! * The processor PSR is set to contain the ACR level equal to that ! specified in the ACR field of the index (see Director procedure ! DSFI, TYPE=7, a zero field in the index specifies the default ! subsystem ACR level, currently 6). Settings of other PSR bits are ! not specified. ! ! The subsystem is then entered as though by standard 2900 procedure CALL ! with two 32-bit (integer) parameters. The two parameters are: ! ! 1) An integer = 1, to be used to achieve compatibility ! in the event of future changes. ! ! 2) The address of the UINFF record. ! ! The first action of the subsystem should be to copy the GLAP, which ! follows the code in the basefile, into the GLA segment. Apart from the ! copying, the code which does this may only access the code segment and ! the stack segment. !> !<Process Termination ! When a process terminates under control of Director (as should always ! be the case in principle), Director prints a message in Dirlog ! indicating the reason for stopping. If the subsystem requested ! termination of the process by calling Director procedure DSTOP, the ! integer parameter REASON is printed. Conventionally, 100 means success ! and values greater than this indicate an error condition detected by ! the Subsystem. However, if Director initiates the stop sequence, for ! example because a contingency has been incorrectly handled, then a ! REASON less than 100 is printed.