SCIOPTALogo System Software for Safety-Critical Embedded Applications
Technical Articles
Boards Presentation
Products Contact Company Support Documentation CPUs
Technical Article
SCIOPTA Design Rules
As you already know, SCIOPTA is a message based real-time operating system. Interprocess communication and synchronization is done by way of message passing. This is a very performant and strong design technology. Nevertheless the SCIOPTA user has to follow some rules to design message based systems efficiently and easy to debug.
Correct designed SCIOPTA systems should use only a few priority levels. When designing a system avoid to control it with priorities.

A system should be controlled by message passing and message flow. Priorities should be used to guarantee fast response time to external events.
Concurrent Work
If you identify work which is concurrent do not try to place the code in one process. Simultaneous work should be placed in different processes.
Reply Messages
Avoid to send a lot of messages from a process without waiting for reply messages. The receiving process might not be activated until the sender process becomes not ready.
Re-entrant Methods
Methods and functions which will be accessed from more than one process must be re-entrant while executing.

There are system calls to handle per-process local data (sc_procVar*).
Global Variables
As it is true for all well designed systems, it is strongly recommended to not using global variables. If it cannot be avoided you must disable interrupts or lock the scheduler while accessing them.
Auto Array
To simplify the calculation of stack requirements, try to avoid using of large auto arrays in processes written in C. Rather allocate a buffer from a message pool.
I/O-ports must be encapsulated in a SCIOPTA process. Otherwise they must be treated the same way as global variables.
Error Hook
Always include an Error-hook in your system. Setting a breakpoint there allows you to track down system errors easily.
Message Data Buffers
Do not modify message data (buffers) after you have sent it.