Browse Prior Art Database

Inter-process Messages under OS/2

IP.com Disclosure Number: IPCOM000109000D
Original Publication Date: 1992-Jul-01
Included in the Prior Art Database: 2005-Mar-23
Document File: 4 page(s) / 154K

Publishing Venue

IBM

Related People

Reed, ND: AUTHOR

Abstract

Disclosed is a programming mechanism to coordinate messages communicating between processes running under an operating system such as OS/2*. A new approach yields benefits in speed and flexibility by concentrating less on a multiplicity of detail of the communication mechanism and more on the other communicating processes.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 47% of the total text.

Inter-process Messages under OS/2

       Disclosed is a programming mechanism to coordinate
messages communicating between processes running under an operating
system such as OS/2*.  A new approach yields benefits in speed and
flexibility by concentrating less on a multiplicity of detail of the
communication mechanism and more on the other communicating
processes.

      Three main inter-process communication mechanisms provided by
OS/2 are pipes, queues and shared memory.  Queues have the most
complex mechanism and are relatively slow.  Pipes, although faster
and simple to use, are more restrictive.  Shared memory is fast, but
care must be taken to avoid deadlock problems.  To use any of these
methods, a process must be intimately aware of the mechanism being
used.  The sender or receiver of a message is any other process using
the same mechanism in the same way.  This automatically leads to
problems when the number of processes is large and variable.  Further
exacerbations occur when the number of communication paths between
any two processes is greater than one.  The use of both pipes and/or
queues in such circumstances becomes virtually unmanageable and
highly inefficient.

      To solve the problems described, an alternative viewpoint was
taken.  Rather than a process being concerned with the mechanism of
communication, it would be concerned with which other processes it
was in communication with.  The design encompasses the following
objectives:
1.   Allow any number of source processes to send messages to any
number of destination processes without the destinations requiring to
know of the existence of the sources.
2.   To allow any destination process to reply to the source process
if required.
3.   To make the communication mechanism transparent to the processes
and independent of each other.
4.   To allow messages to be received chronologically according to
priority. '5.   To be fast.

      The mechanism used to achieve this was shared memory for both
speed and design flexibility.  The communication interface provides
the following functions:
      1. Open   2. Receive   3. Send   4. Close   5. Notify

      Processes wishing to communicate are required to have an
address consisting of a type and instance.  The type is used to
identify the general function of the process; controlling a user
terminal, handling communication with another computer, etc.  The
instance is used to identify multiple occurrences of the same type of
process where these need to be differentiated.  More than one process
can use a particular address if desired.
OPEN - This function must be called before beginning any form of
communication.  A process must first call the Open function with its
address.  Calling Open a second time without a preceding Close is
equivalent to Close followed by Open.
SEND - This function is called with the message, priority and
destination address to send a message to an...