This article will explain some Real Time Operating Systems (RTOS) basics. The material presented here is not intended as a complete coverage of different RTOS and their features. For the purposes of simplification, I will briefly cover the most important features of a representative RTOS. After we explore what constitutes an RTOS and why we might want to use one, I'll explain each of the basic components of a typical RTOS and show how these building blocks are integrated into the system. For the few code examples in this article we will use ThreadX from Express Logic.
Designing applications for an embedded application is almost always challenging, to say the least. One way to decrease the complexity of your application is to use a thread-oriented design and divide a project into more manageable pieces (or threads). Each thread is then responsible for some part of the application. With such a system you would like to be able to specify that some thread is more important than others. That is, some threads have real-time requirements. They have to respond quickly and correctly. If your system employs a professional RTOS, features that prioritize threads are already part of the package. In addition to thread prioritization, a clean and well-tested API is included that eases communicate between different threads.
So if we to use a professional RTOS we will have the tools to:.
• Ensure that time-critical parts of the code execute within their real-time constraints.
Perhaps equally importantly, the real-time behavior of the high-priority threads is not affected by the number or processing of less important, lower-priority threads.
• Make complex applications easier to develop and maintain. It's easier to develop and maintain smaller threads, than to have to deal with the entire application as a whole. In addition, changes to the processing of lower priority threads do not affect the real-time processing of higher-priority threads.