The FreeRTOS Tutorial Books
provide additional detailed information on tasks and their behaviour.
Each task is assigned a priority from 0 to ( configMAX_PRIORITIES - 1 ), where configMAX_PRIORITIES is defined within FreeRTOSConfig.h.
If the port in use implements a port optimised task selection mechanism that uses
a 'count leading zeros' type instruction (for task selection in a single instruction)
and configUSE_PORT_OPTIMISED_TASK_SELECTION is set to 1 in FreeRTOSConfig.h, then configMAX_PRIORITIES
cannot be higher than 32. In all other cases configMAX_PRIORITIES can take any
value within reason - but for reasons of RAM usage efficiency should be kept to
the minimum value actually necessary.
Low priority numbers denote low priority tasks. The idle task has priority zero (tskIDLE_PRIORITY).
The FreeRTOS scheduler ensures that tasks in the Ready or Running state will
always be given processor (CPU) time in preference to tasks of a lower priority
that are also in the ready state. In other words, the task placed into the Running state
is always the highest priority task that is able to run.
Any number of tasks can share the same priority. If configUSE_TIME_SLICING is
not defined, or if configUSE_TIME_SLICING is set to 1, then Ready state tasks of equal
priority will share the available processing time using a time sliced round robin
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2015 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.