Bare Metal vs. RTOS vs. OS

Ya’akov

Joined Jan 27, 2019
10,240
You can’t learn very much by making up a test case from ignorance and asking about why it is the way it is. If you don’t know the answer already, your test case is likely to be an impossible or irrational scenario—as in your version of a system that no engineer would design.

The constraints you have placed are completely artificial and don‘t serve to instruct about how real applications of RTOSs work. You need to go to the site of an RTOS provider and look up case studies which will be real and deal with real scenarios and constraints.

Questions about those can be answered. Your current questions go something like “let’s say 2+2=3, why is that?”.
 

WBahn

Joined Mar 31, 2012
32,876
I agree with you that the tasks can be executed in sequence as you described. But my curiosity is that if RTOS is implemented in this then what will be the design solutions.

How many tasks would you have create as an application developer
I have no idea how to answer a question like "if RTOS is implemented in this then what will be the design solutions".

This is like asking someone, "if Windows is implemented in this then what will be the design solutions?"

If you want to learn more about what an RTOS is, go read about RTOSs. Wikipedia is one place to start. Another are the sites of some companies that make and sell RTOSs, such as Wind River. Or ROS (Robot Operating System).
 

Thread Starter

Kittu20

Joined Oct 12, 2022
511
You need to go to the site of an RTOS provider and look up case studies which will be real and deal with real scenarios and constraints.
I've spent a lot of my time on searching real world application for RTOS. As I found on internet search RTOS is used in large and complex application ( flight control system, nuclear power plant..) They all are large and complex So it is very difficult for me to think about them, almost impossible. I can't calculate the how long tasks will run and how much time is task takes for processing. Because I have no idea how the nuclear plant or Air Traffic control system work

I was looking for some example which is not too big but complex. Where the benefit of applying RTOS can be understood
 
Last edited:

MrChips

Joined Oct 2, 2009
34,827
Maybe you have found your answer.

You use RTOS because the problem is big and complex.
If the problem is simple then there is no need for RTOS.

Your example of electronic door locks is too simple to require the use of RTOS.
 

Ya’akov

Joined Jan 27, 2019
10,240
Maybe you can think of it this way, in cases where the stability and safety of a system requires monitoring and reacting to distributed sensor data in a time critical way, using a standard OS fails due to things like garbage collection and poorly behaved applications making guaranteed allocation of processing time impossibe.

If the system is complex and evolving requiring continuous improvement as technology and techniques improve, and will get new subsystems or have hardware replaced in existing ones then bare metal programming is too slow and too costly.

But also keep in mind that there is nothing preventing the combined use of any two or all three architectures and in practice more often than not, any OS- or RTOS-based system will be talking, among other things, to subsystems that use their own µC or µP that is programmed in the bare metal architecture to manage its local hardware and interface to the world.

Attempts to isolate “pure” forms of these systems is fruitless and uninformative. It is similar to putting culture media in a sterile environment because you want to find out about mold growth that happens when the media is left in the real world. It’s not going to grow no matter what questions you ask it.
 
Top