Guardian Programmer's Guide

Table Of Contents
Introduction to Guardian Programming
Guardian Programmer’s Guide 421922-014
1 - 6
The File System
Interprocess Communication
The message system allows processes to pass messages to each other. This
subsystem not only provides critical links between various process modules within the
operating system itself but also provides the mechanism for user processes to send
messages to each other and for user processes to receive messages from the
operating system.
Interprocess communication is done using request-response interactions. The term
“message” is used to refer to the request part of the communication. The response is
usually called a “reply.” The reply can contain data, or it might contain no useful data
other than an acknowledgment that the request has been accepted. However, there is
always a reply of some kind.
To send messages to another process, you first establish a connection to that process
by opening the process and then write to the file number returned by the open.
Because a process might not know in advance which processes will send messages to
it and in which order, all messages to a process arrive using a single file-system
connection that is established when the process opens a file using the special name of
$RECEIVE.
Section 6, Communicating With Processes, provides details on how to pass messages
between user processes and receive messages from the operating system.
DEFINEs
A DEFINE is a named set of attributes and values that you use to pass information to a
process before running the process. For example, you can pass labeled-tape
attributes to a process using a DEFINE; this way you can make the process access a
different labeled-tape file and for a different purpose each time you run it.
Section 7, Using DEFINEs, describes how to program with DEFINEs.
Devices
As already mentioned, terminals, printers, magnetic tape devices, and data
communications lines are treated as files. Section
9, Communicating With Devices,
provides an overview of common information about the programmatic interface to all
devices.
For terminals, an application process can perform read and write operations in a way
similar to reading from and writing to other files. The application can also control the
operation of a terminal; for example, the program can control the action taken when the
user presses the BREAK key and whether input typed by the user is displayed on the
terminal screen. You can write an application program that simulates a terminal.
Section 10, Communicating With Terminals, describes terminal I/O operations.
Section 24, Writing a Terminal Simulator, provides information on how to write a
terminal-simulation process.