Next | Prev | Up | Top | Contents | Index

IRIX IPC

To meet the demands of parallel programming, IRIX provides a set of fast, low-overhead interprocess communication mechanisms, implemented as extended functions in the C library (which means they operate in user space, often without system calls). Although these mechanisms are powerful and easy to use, remember that they are IRIX-specific, so code using them is not portable to other systems.

The System V IPC mechanisms use their own name space (see "System V IPC"), but IRIX IPC mechanisms use the filesystem name space. To begin using IRIX IPC, a process must specify the name of a file to be used as a shared arena. The named file acts as the backing store for the arena segment (see "Page Validation").

Processes gain access to the arena by specifying its filename. All processes using the same arena have access to the same set of IPC mechanisms. This makes it relatively easy for unrelated processes to communicate using IRIX IPC. The shared arena file is mapped into each process's address space, which means that most of the shared arena IPC functions are done in library code, without need for system calls. This is one reason that the overhead on IRIX IPC is lower than the overhead on System V IPC.

IRIX IPC comprises four main mechanisms, two of which--semaphores and shared memory--resemble their System V counterparts. The other mechanisms are locks, simple busy-wait locks for low-level synchronization, and barriers, which provide rendezvous points for multiple processes.

Note: Modules using IRIX IPC routines should include <stdio.h> and <ulocks.h>, and should be linked with the libmpc.so shared object (ld option -lmpc). For more information on any of the routines presented here, see the appropriate reference pages. (Click on the name of a reference page to open it online.)

This section explains how to use IRIX IPC. Topics include the following:


Initializing a Shared Arena
Allocating in a Shared Arena
Exchanging the First Datum
Using IRIX Semaphores
Using Locks
Using Barriers

Next | Prev | Up | Top | Contents | Index