Question of the Week: When does it make sense to use an RTOS or operating system?
I posted last week’s question about dynamic memory allocation here and in a group discussion at LinkedIn. There were many thoughtful comments at both locations, with the majority of responses made in the LinkedIn discussion. I’m trying to figure out a way to enable you to see the responses from both groups in one place. If you have any ideas, please let me know.
This week’s question expands on one of the underlying premises behind last week’s question – that the size of the system, real time requirements, and reliability affect your answer to the question. For this week, under what conditions do you use or avoid using an RTOS or operating system in your embedded designs?
Depending on where you draw the line on what constitutes a system, I have built embedded systems with none, one, or even multiple operating systems. In general, the smaller systems relied on an infinite loop construct or a manually built scheduler; these systems often had hard real-time and high reliability requirements. In some of the systems, we used an RTOS most significantly to leverage the communication stack support it offered when the system was in a near-real time operating mode. When the system switched to a hard real-time mode, the control software no longer made any RTOS calls.
The only context we used a full blown operating system was for ground and test support equipment that provided a near-real time, data rich user interface for the human operator and for non-real time post-operational analysis. In these cases, the operating system reduced the complexity for driving application-level processing such as receiving inputs from the operator, displaying messages and data to the operator, and communicating with other remotely located components of the systems.
Based on these projects, the team’s decision to use or avoid using an RTOS correlated strongly with the real time and reliability constraints of the system as well as how intimately the software was coupled to controlling and monitoring the hardware components.
Contemporary processors and RTOS offer coupled resources, such as memory protection units and padded cell virtualization support, which may blur the criteria for when it is appropriate to use or avoid using an RTOS. I’m trying to tease out under what conditions, such as resource limits, reliability requirements, project scheduling, and real-time operating constraints that the trade-offs favor adopting or dropping RTOS support. So when answering this question, please try to identify the key criteria for your application space that pushed your decision one way or the other.
To make following the Question of the Week series easier (especially with multiple overlapping series), I am including the index below to previous relevant posts. I will be summarizing your answers for these questions in a paper at the end of the series. I encourage you to check out all of the posts for the question of the week series; maybe they will inspire you to share your observations. I would love to be able to consolidate different perspectives and lessons learned here. I suspect there are some valuable lessons to be gleaned from comparing such stories. If you would like to suggest a question, please contact me.
2010, March 24: Question of the Week: Do you use or allow dynamic memory allocation in your embedded design?
2010, March 17: Question of the Week: You know you’re an embedded developer when …
du00000001 commented:
du00000001 commented:
Doug Abbott (LinkedIn) commented:
Doug Abbott (LinkedIn) commented:
Li Xu (LinkedIn) commented:
Li Xu (LinkedIn) commented:
Paul Burega (LinkedIn) commented:
Paul Burega (LinkedIn) commented:
Paul Newton (LinkedIn) commented:
Paul Newton (LinkedIn) commented:















