User`s manual

SCIOPTA - Real-Time Kernel
13-2 Manual Version 4.1 User’s Manual
SCIOPTA - Real-Time Kernel
13 SCIOPTA Design Hints and Tips
13.2 Some SCIOPTA Design Rules
As already stated in this document, SCIOPTA is a message based real-time operating system. Interprocess com-
munication and synchronization is done by way of message passing
. This is a very powerful and strong design tech-
nology. Nevertheless the SCIOPTA user has to follow some rules to design mess
age based systems efficiently and
easy to debug.
Correct designed SCIOPTA systems should use
only a few priority levels. When designing a sys-
tem avoid to control it with priorities. A system
should be controlled by message passing and mes-
sage flow. Priorities should be used to guarantee
fast response time to external events.
Avoid to send a lot of messages from a
process without waiting for reply mes-
sages. The receiving process might not
be activated until the sender process be-
comes not ready.
Always include an Error-
hook in your system. Setting
a breakpoint there allows
you to track down system er-
rors easily.
To simplify the calcu-
lation of stack require-
ments, try to avoid
using of large auto ar-
rays in processes writ-
ten in C. Rather
allocate a buffer from a
message pool.
Do not modify message data (buffers) after you have sent it.
I/O-ports must be encap-
sulated in a SCIOPTA
process. Otherwise they
must be treated the same
way as 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.
Methods and functions which will be accessed from more than
one process must be re-entrant while executing. There are sys-
tem calls to handle per-process local data (sc_procVar*).
If you identify work which is
concurrent do not try to place
the code in one process. Simul-
taneous work should be placed
in different processes.