|
System V Interprocess Communication
|
 |
Platform<ToolKit> for UNIX
supports the three kinds of UNIX System V Interprocess Communication (System V
IPC) mechanisms available: message queues, shared memory, and semaphores,
including semaphore arrays. Each of these mechanisms is described in detail in
this chapter.
The following important concepts
of System V IPC are discussed throughout this chapter.
- System V IPC
overview -Characteristics and constructors of System V IPC objects. Also
includes a discussion of methods of constructing public and private keys.
- Message queue
-Sends raw data between processes on the same machine.
- Shared memory
segment -Area of memory where a process can attach.
- System V
semaphore and semaphore array -Object or objects that manage one or more
shared resources.
System V IPC Object Characteristics
System V IPC mechanisms are
useful tools for performing reliable, system-wide communication, especially
when flow control and priority processing are required. This section discusses
characteristics and constructors of System V IPC objects, as well as the
construction of public and private keys.
It is important to note the
following characteristics of System V IPC objects.
- When created, the object is
allocated a system-wide ID by the kernel. If a process knows the ID of a
Systems V IPC object, the process constructs a reference to the object and
accesses the object using its ID.
- When created, the object
can be "tagged" with a public key. If a process knows the key of
a Systems V IPC object, the process can construct a reference to the
object and access it using the key. The
os_key
class can conveniently construct a key from either an integer or a
<path/integer> pair.
- The object remains in the
system until explicitly removed, even if the process that constructed the
object terminates.
- The object stores the user
and group of the object's creator, the user and group of the object's
owner, and a set of permissions flags. By default, the user and group
fields are set from the process that created the object.
- The object cannot be copied
or assigned.
Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only.