Synchronous Message Passing

In addition to mailboxes, REXIS also provides synchronous message passing which includes semantics for task synchronization. This eliminates the need for using multiple mailboxes, or having to use a MUTEX for synchronization. As with mailboxes, a message is an arbitrary number of bytes of data defined by the user and not interpreted by REXIS in any way. Unlike mailboxes, synchronous message passing copies actual messages between a sender and the receiver, not just passing a pointer. This is a better mechanism to create server and client tasks.

 

Synchronous message passing is more robust than other forms of Inter-process Communication (IPC), as tasks have well-defined synchronization points. Synchronous message passing is not a new idea; indeed, the inspiration came from QNX Neutrino, the message passing kernel that powered the BlackBerry smartphone devices in the early 2000s.

 

Synchronous message passing is a very useful concept. For example, it makes it simpler to write a “full-blown” OS (e.g. Linux) based on a microkernel. In such a system, OS services such as the file system support, networking etc. are written as regular tasks or processes instead of being part of the kernel code. Having a full OS is less important in a microcontroller system, but nevertheless, the use of synchronous message passing can give firmware a cleaner design. As a footnote, REXIS’ functions can be said to reflect those of a microkernel, perhaps pointing to a possible future path for its development.