Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/18/02 07:13
Read: times


 
#25959 - RE: 8051 RTOS Opinions?
Most RTOS on the 8051 are only task schedulers.

The only difference to the main loop aproach was, that you can define, how often a task was executed. E.g. more important tasks can be called more often.

On the main loop approach all tasks called once during a main cycle so they have all the same priority.

Additional some RTOS support an idle testing to skip execution, if nothing to do.

So most RTOS functionality can also be written inside a main loop on using this principle:

main()
{
for(;;){
if( --task1_priority == 0 && task1_idle == 0)
task1();
if( --task2_priority == 0 && task2_idle == 0)
task2();
if( --task3_priority == 0 && task3_idle == 0)
task3();
// and so on
}
}


On using an RTOS the maximum response time also for the task of the highest priority was still as long as the maximum execution time of any other task independend from its priority.
And on the worst case a task can hang forever and then there is no way to resolve this state.

Thus, why I use always the main loop approach and execute most tasks on the same priority level. And only real time critical tasks are written as interrupts.


Peter


List of 13 messages in thread
TopicAuthorDate
8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      
RE: 8051 RTOS Opinions?            01/01/70 00:00      

Back to Subject List