Embedded Software Architectures

Software Architectures and Complexity

Embedded software architectures which are used on tiny microcontrollers (MCUs) depend on the complexity of the problem at hand. To say that a scheduler is best or an RTOS is best is dependent on the complexity of the application. Here the measure of best is the total cost of owernership or TCO. By minimizing your total costs over the life of the product line you maximize profits.

This graph shows the complexity of systems and how the TCO changes as a function of the software architecture chosen. Schedulers work for trivial problems very well but are difficult and costly to maintain. A real-time kernel (free or otherwise) is good for simple scheduling without I/O. As soon as I/O is required, it suffers because the user must invent their own I/O models. RTOS solutions are great for simple or complex problems; however, by adding POSIX standards to the RTOS, substantial advantages occur. A POSIX based micro-kernel or nano-kernel based RTOS offers the best of all worlds.

POSIX Offers Mainstream Compatibility

POSIX is the main standard that the world has adopted for all operating systems. Real-time embedded operating systems are no exception to this rule provided that they use an MMU. For MCUs where an MMU is not used, proprietary systems are often used when there are significant disadvantages to doing so. In the figure, you can see that Unison and DSPnano have the same POSIX standardization as all the major operating systems and real-time operating systems that use MMUs.

Some proprietary kernels layer POSIX on a real-time RTOS. This layer may add inefficiency and extra size. In the case of Unison and DSPnano, the layer is not required as the implementation is the native POSIX calls. In addition, Unison and DSPnano have an ultra tiny footprint which makes them ideal for system on a chip MCUs.

One caution for selecting a POSIX RTOS for an MCU is the features that are actually implemented. Unison and DSPnano offer a class 1 and class 2 real-time POSIX solution which includes a pthread and kernel API as well as a complete POSIX I/O model with Berkely compatible sockets. This approach makes porting applications to Unison or DSPnano RTOS very simple.