System V IPC consists of three mechanisms:
* Messages : exchange messages with any process or server.
* Semaphores : allow unrelated processes to synchronize execution.
* Shared memory : allow unrelated processes to share memory.
* example Using shared memory.
* perms Description of access permissions.
* syscalls Overview of ipc system calls.
Access to all resources is permitted on the basis of permissions set
up when the resource was created.
A resource here consists of message queue, a semaphore set (array)
or a shared memory segment.
A resource must first be allocated by a creator before it is used.
The creator can assign a different owner. After use the resource must
be explicitly destroyed by the creator or owner.
A resource is identified by a numeric ID. Typically a creator
defines a KEY that may be used to access the resource. The user process
may then use this KEY in the "get" system call to obtain the ID for the
corresponding resource. This ID is then used for all further access. A
library call "ftok" is provided to translate pathnames or strings to
There are system and implementation defined limits on the number and
sizes of resources of any given type. Some of these are imposed by the
implementation and others by the system administrator when configuring
the kernel ( msglimits, semlimits, shmlimits).
There is an `msqid_ds', `semid_ds' or `shmid_ds' struct associated
with each message queue, semaphore array or shared segment. Each ipc
resource has an associated `ipc_perm' struct which defines the creator,
owner, access perms ..etc.., for the resource. These structures are
detailed in the following sections.
automatically generated by