REXIS Design Philosophy

REXIS is a modern RTOS designed for embedded projects. Features such as a preemptive kernel, synchronous message passing for inter-process communication, and MUTEX with priority inheritance make for a clean design; while the use of a single kernel stack, careful design of the internal data structures and system safety features such as using the hardware watchdog timer, stack checking, automatic stack calculation, and memory tracking set REXIS apart from other RTOSes. The addition of mailboxes makes porting third party stacks to REXIS easy.

In designing the REXIS tasking model, we feel that a preemptive priority-based round robin scheduler is the simplest model for users, because it allows the natural “functions as tasks” style of writing programs. It places no restriction on how users may structure their code, and users do not need to work around the tasking model. The scheduler gets called whenever a high-priority task becomes ready to run, providing very fast response to real-time events.

To minimize resource consumption, a separate kernel stack is used by the kernel, so that each task does not need to provide the stack resources needed by the kernel.

For process synchronization and inter-process communication, a set of three synchronous message passing API functions provides a robust and fast solution to both synchronization and inter-process communication requirements, plus it handles the problem of priority inversion. The MUTEX and semaphores provide other forms of synchronization mechanisms.

For developers who are more used to mailboxes and message queues, REXIS also supports mailboxes, for example, allowing it to work with a TCP/IP such as lwIP easily.

As many embedded systems are used in low-power situations, REXIS places the system in low-power mode to conserve power whenever “nothing is happening”, to be awakened by peripheral I/O interrupts or timer events.

Memory overwrite and, in particular, stack overflow are common sources of problems in embedded software. As most CPUs do not have any support for stack checking, this problem can manifest in mysterious system crashes that are difficult to track down. REXIS provides stack checking at every task switch to ensure that stack overflows are caught. Lastly, future REXIS versions will include a post-processing utility to compute the optimal task stack sizes for all the tasks in the firmware.