Quality RTOS & Embedded Software

  Real time embedded FreeRTOS RSS feed  
NOTE:The Task Pool library and documentation are in the FreeRTOS Labs.  The libraries in the FreeRTOS Labs download directory are fully functional, but undergoing optimizations or refactoring to improve memory usage, modularity, documentation, demo usability, or test coverage.  They are available as part of the main download.

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.