Embedded






Embedded Technology

RTOS :

Real Time programming is not the only way to arrive at an Embedded solution.
Real Time programming & RTOS do come into picture only when there is a need for the controller to react in a combinational way to events that occur simultaneously. Where tasks are prioritized based on the urgency associated with the event that triggered the task.
Consider a process which is completely sequential ( a single event triggering a complete sequence of operations occurring at regular intervals ). Then what is the point in using a RTOS with high scheduling  capabilities. In such cases using a RTOS could even dangerously bring down the processing ability of the controller.
So any system developer should completely analyse the requisites for the project and then should decide upon using an appropriate Kernel.
 

Example Process :

Consider a simple process having two tasks that are mutually exclusive.

From the above diagram we can infer that by using a multitasking kernel we can achieve concurrent execution of tasks.
If concurrent execution is required then decision has to be made in favor of RTOS. But in cases where concurrent execution is no needed, then by using a RTOS, you can very well see from the diagram that you gain nothing and loose a lot of time spent by the OS. In such cases it is wise not to use any RTOS.
 

Kernels :

RTOS Non preemptive Mixed Preemptive Preemptive Implem
-entation
Remarks
Round robin Cooperative Round robin Round robin Round robin preemptive Cyclic TCB Every task
gets its chance in a sequential manner
Priority based Cooperative Priority based Priority based Priority based preemptive TCB - Task Control Block Highest priority task, which is ready gets it chance
Implementation   Context Switching Context Switching    
Remarks Every task is written in a way that it complete execution within its time slot & gives control for other tasks Calls to the scheduler are embedded in each task at regular time slots in order to relinquish control Tasks are written as though it is the only program running on the processor. Control is  taken automatically by the OS on time ticks & interrupts     

 
Micro controllerEmbedded TechnologyReal time O SCowBull Game
About meFeedbackLinksHome