Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.
NOTE:The Task Pool library has been redesigned to become an internal utility for FreeRTOS libraries. The pages below are only to be used as reference with older versions of the FreeRTOS-Labs (FreeRTOS V10.2.1_191129, 190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview, and 191125_FreeRTOS_Libs_Task_Pool_MQTT_HTTPS_Preview)

Task Pool Terminology

Task Pool

A task pool (or thread pool) is a set of tasks that can asynchronously execute functions (jobs) on behalf of other tasks. This concept is similar to how the FreeRTOS xTimerPendFunctionCall() API function enables a task to defer the execution of a function to the RTOS daemon task. While FreeRTOS contains only one Daemon task, a task pool may contain multiple tasks that execute in parallel.

System Task Pool

A (system task pool) is a task pool that is managed by the IoT Task Pool library. Task pools are divided into two categories (system and application defined). In the demo download provided, the IoT Task Pool library is optimized for MCU development by implementing only the system task pool. Users can switch to the full task pool implementation, which also implements application defined task pools, if that additional capability is needed.

Worker Tasks

Worker tasks make up the task pool and execute callback functions on behalf of other tasks. These tasks are responsible for executing the jobs that are sent to the task pool.

Jobs

Jobs are data structures that include a callback function that will be executed by a worker task once they have been scheduled. A job must be created before it can be scheduled by the task pool for execution.

Scheduling Jobs

Jobs can be scheduled to be run by a worker task immediately that a worker task is available, or deferred to run at a later time. If a job is scheduled to run immediately when all the worker tasks are already busy then the job is queued until a worker task becomes available.

Job Queue

The job queue contains scheduled jobs. Jobs are removed from the queue through execution by the worker tasks. Jobs can also be removed through cancellation.

Deferred Jobs

Deferred jobs are jobs that are executed at a specified time after they have been sent to the task pool. This is analogous to a FreeRTOS software timer, which is a callback function set to execute after a specified delay.

Job Context

The job context is data that is specific to the job and it is passed as a parameter to the job's callback function.

 

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.