What are the advantages of having a multi-tasking program with RTOS support rather than a single sequential program?
Are there any disadvantages?
What are the advantages of having a multi-tasking program with RTOS support rather than a single sequential program?
Are there any disadvantages?
In a sequential or "big-loop" program, other than interrupt handling, events are processed when the program "gets around to it", the cycle time may be non-deterministic and may vary as functions are added, removed and changed. So the performance and responsiveness of your system is dependent upon every change you make to the code, and the behaviour and ability to meet timing deadlines can be affected by changes unrelated to the function that ultimately fails.
By using pre-emptive priority based scheduling an RTOS can respond deterministically to events so changes in processing time of one task need not affect other tasks of higher priority.
Beyond the deterministic response, the ability to separate functionality into threads of execution, makes each of these threads simpler and less co-dependent. Instead of one "big loop" handling everything, you have many independent specialist loops that are easier to test and develop and easier to add, remove and re-use to change the behaviour and functionality of your system.
Real time operating systems main objectives are to provide bounded responses times for kernel level operations and specifics real time scheduling policies. It doesn't relate at all to sequential vs parallel programing.
These OS are used in embedded systems with hard real time requirements and you shouldn't care about them for other purposes.