A RTOS application can be structured as a set of independent tasks

Each task executes within its own context with no coincidental dependency on other tasks within the system or the RTOS scheduler.

Only one task within the application can be executing at any point in time and the real time RTOS scheduler is responsible for deciding which task this should be.

The RTOS scheduler may repeatedly start and stop each task as the application executes. The scheduler ensures that the processor context (register values, stack contents, etc) when a task is swapped in is exactly that as when the same task was swapped out. To achieve this each task is has its own stack. When the task is swapped out the execution context is saved to its stack.

Idle Task

The idle task is created automatically when the scheduler is started to ensure there is always at least one task that is able to run. It is created at the lowest possible priority to ensure it does not use any CPU time if there are higher priority application tasks in the ready state. 


We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published. Required fields are marked *