Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
6 - 1
6
Communicating With Processes
This section describes how to use file-system procedures to communicate with other
processes. Specifically, this section covers the following topics:
How processes engage in two-way communication. Here, a process sends a
message to another process. After processing the message, the recipient replies
to the message.
How processes engage in one-way communication. In one-way communication,
the sender receives no meaningful information from the recipient. However, there
is a variation on one-way communication where, although the sender receives no
meaningful data in the reply, it does receive an error code.
How a server processes messages concurrently, then replies to them in any order.
How to handle system messages.
At the end of the section is a complete example of a simple application that makes use
of requesters and servers. For complex examples, see Section 21, Writing a
Requester Program, and Section 22, Writing a Server Program.
Throughout this section it is assumed that all processes involved already exist.
Section 2, Using the File System, gives some examples of how to create processes.
For more details about processes in general, refer to Section 16, Creating and
Managing Processes.
This section does not describe how to process the Startup message; Section 8,
Communicating With a TACL Process, provides details. Nor does this section describe
how user processes pass the Startup message to each other; Section 16, Creating and
Managing Processes, provides details. For details of a simplified process start-up
using SIO procedures, refer to Section 15, Using the Sequential Input/Output
Procedures.
This section does not discuss the use of sync IDs. It is possible, following a failure,
that a process could receive the same message twice. Sync IDs are used to
determine which one of a duplicated set of messages a process should respond to
following a failure.
Sending and Receiving Messages:
An Introduction
Interprocess communication (IPC):
Permits a user process to receive messages from other user processes, thus
providing the basis of the requester/server model introduced in Section 1,
Introduction to Guardian Programming, as well as allowing processes to pass