Read about the general concept of inter-process communication (IPC).

On Mach, an IPC is done by invoking a port.

The two fundamental operations, to send and receive messages, are used to implement a RPC system.

Sequence numbering.

The Unofficial GNU Mach IPC beginner's guide