The FreeRTOS Tutorial Books
provide additional detailed information on tasks and their behaviour.
A task can exist in one of the following states:
When a task is actually executing it is said to be in the Running state. It is currently utilising the processor.
If the processor on which the RTOS is running only has a single core then there
can only be one task in the Running state at any given time.
Ready tasks are those that are able to execute (they are not in the Blocked or
Suspended state) but are not currently executing because a different task of equal or
higher priority is already in the Running state.
A task is said to be in the Blocked state if it is currently waiting for either a temporal or external event.
For example, if a task calls vTaskDelay() it will block (be placed into the
Blocked state) until the delay period has expired - a temporal event.
Tasks can also block to wait for queue, semaphore, event group, notification or semaphore
event. Tasks in the Blocked state normally have a 'timeout' period, after which the task will
be timeout, and be unblocked, even if the event the task was waiting for has
Tasks in the Blocked state do not use any processing time and cannot be
selected to enter the Running state.
Like tasks that are in the Blocked state, tasks in the Suspended state cannot
be selected to enter the Running state, but tasks in the Suspended state do
not have a time out. Instead, tasks only enter or exit the Suspended state
when explicitly commanded to do so through the vTaskSuspend() and xTaskResume()
API calls respectively.
Valid task state transitions
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.