Interprocess Communication (IPC)
Interprocess Communication (IPC)
plays a fundamental role in the transformation of the microkernel
from an embedded realtime kernel into a full-scale
POSIX operating system. As various service-providing
processes are added to the microkernel, IPC is the
glue
that connects those components into a
cohesive whole.
Although message passing is the primary form of IPC in the QNX OS,
several other forms are available as well. Unless
otherwise noted, those other forms of IPC are built over our
native message passing. The strategy is to create a simple,
robust IPC service that can be tuned for performance through
a simplified code path in the microkernel; more
feature-cluttered
IPC services can then be
implemented from these.
Service: | Implemented in: |
---|---|
Message-passing | Kernel |
Signals | Kernel |
POSIX message queues | Kernel plus external process for administration |
Shared memory | Process manager |
Pipes | External process |
FIFOs | External process |
The designer can select these services on the basis of bandwidth requirements, the need for queuing, etc. The trade-off can be complex, but the flexibility is useful.
As part of the engineering effort that went into defining the microkernel, the focus on message passing as the fundamental IPC primitive was deliberate. As a form of IPC, message passing (as implemented in MsgSend(), MsgReceive(), and MsgReply()) is synchronous and copies data. Let's explore these two attributes in more detail.