Creating Remote Processes
Before a program in one machine can use resources in another, it must either create a new process in the remote machine, or gain access to an existing one. In either case, the local process must establish an IPC channel to a resident dispatching process within the remote system, specify the program to be started or contacted. and identify itself so that its access to the program can be established and billing carried out. After these preliminary steps have been accomplished, the requested process assumes responsibility for the IPC channel and substantive communication begins.
The manner in which the environment carries out the above scenario is largely dictated by the IPC facility upon which the distributed system is based. If the IPC facility itself provides single primitive that accomplishes the entire task, then the environment need only invoke that primitive. If, on the other hand, it only provides a mechanism by which the environment can establish a channel to the remote dispatcher, as is the case within the ARPA computer Network (the ARPANET), then the Protocol itself must contain provisions for naming the program to be run and presenting the required credential.
Adding to the Protocol the following system procedure enables the local environment to provide the remote dispatcher with the necessary information in this latter case:
INIPROCESS (program, credential)
CHARSTR LIST (user, password, account)
CHARSTR CHARSTR CHARSTR
Its arguments include the name of the applications PROGRAM to be run; and the USER name, PASSWORD, and ACCOUNT of the local user to whom its use is to be billed.
This new procedure effectively adds to the Model the notion of "creation," and enables the environment to offer the following primitives to its applications program:
CRTPROCESS (computer, program, credential -> ph)
CHARSTR CHARSTR (as above) INDEX
DELPROCESS (ph)
INDEX
The first primitive creates a new process or establishes contact with an existing one by first creating a channel to the dispatcher within the indicated COMPUTER and then invoking the remote system procedure INIPROCESS with the specified PROGRAM name and CREDENTIALS as arguments. The primitive returns a "process handle PH" by which the applications program can refer to the newly created process in subsequent dialog with the local environment by the IPC facility, an index into a table within the environment, or anything else the environment's implementor may find convenient.
The second primitive "deletes" the previously created process whose handle PH is specified by simply deleting the IPC channel to the remote process and reclaiming any internal table space that may have been allocated to the process.