Mach enforces that all objects to be local independent and transparent to the user. This means that all #message passing could be done or seems to be done locally. The **messages#** passed will contain typed data objects, which compared to alternative where data in them will be untyped streams of bytes, are easier to parse even if the byte ordering is different from the sender and receiver.
To receive messages, every object in Mach, upon creation, must have a port where those messages could send to and queue at. If the queue is full, the sender could abort the send operation and then wait for its turn when the queue is once more available for queuing, or the kernel could deliver that message on behalf of the sender. The port creation share similarity with standard PID concept in UNIX. If the port specified in message# cannot be translated into internal port data structure address, it will then be passed to 202204231514# from the kernel.
Ports could be collected in a set called port set where they share the same message queue. A port can only be a member of one port set at a time. When a port needs to send or receive messages, these messages will be queued at the port set’s queue rather than direct communication between two ports. However, port set may not be passed in the format of message.
Port right is a protection mechanism to port which contains the port name and its capability (send to or receive from that port). It could be given out from the creator of the object in the form of messages, where the sender will be relinquished of that right, or to be revoked when the port is destroyed.
On any given port, only one task can have receive rights, but many tasks could have send rights. Upon revocation of the receive rights, tasks that hold the send rights could be notified.
Mach IPC could be used for thread synchronisation where its mechanism is similar to semaphore# due to the nature of queue.