Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Term of tasks

Posted by juhc on August 12, 2015

Hi, How can we know the term of a task in FreeRTOS ? I mean by term the time by which the task should have finished. For example : A task may have a duration of 5 and a term of 11. The task can be executed at any time between 0 and 11 but should be finished before 11. Is there a way to know this ?

Term of tasks

Posted by rtel on August 12, 2015

I'm not sure of your distinction between 'duration' and 'term', but I don't think that matters to answer the question.

I think you are referring to a time separated kernel, in which the scheduler allocates specific time slots to different tasks, to ensure the tasks are temporaly separated, and one task overrunning cannot eat into time that should be used by a different task. This sort of scheme is typically used in safety critical systems, and the objectives of the scheduler are very different to the objectives of the FreeRTOS scheduler.

If my understanding is correct, then the short answer is - there is no way of specifying a term. FreeRTOS is designed to be small and simple, and time separated kernels are much more complex - too complex in fact to run on some of the tiny processors on which FreeRTOS runs.

That does not however mean you cannot implement your own safety scheme. Many of the FreeRTOS tests do just that by using a high priority task to monitor the running of the low priority tasks to ensure each task gets the processing time it needs, and that each task is in fact still running. There are other ways of doing the same thing - for example you can add code into the tick interrupt (Google vApplicationTickHook) which can monitor tasks, or you can use the trace macros to implement some very sophisticated monitoring functionality.


Term of tasks

Posted by juhc on August 13, 2015

Sorry I didn't use the correct word. My english is not so good. It is the deadline of a task that I want to know.

Term of tasks

Posted by richard_damon on August 13, 2015

FreeRTOS doesn't deal with deadlines itself. If a task has a deadline (not all do) then it presumes that the programmer has assigned the task priorities (statically or dynamically) to let the task meet it.

A deadline based scheduler is a much different type of system then a priority scheduler, adding requirements on the tasks to provide estimates on how much work they have yet to do to meet their deadlines. (Things can be simplified if you KNOW that all deadlines will be met, but such a system degrades poorly when that assumption is not met)

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner