Quality RTOS & Embedded Software

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


TaskNotification or Event groups

Posted by rrrum on July 13, 2016


I would like to ask for a opinion, it is a design issue and I am not able to find among many different mechanisms the right one for my task:

  1. Let’s focus on 3 tasks, A, B1, B2

  2. Task A is implemented as follows: waits on its “command queue” and there is also timeout set to allow it to run periodically to do some work if no commands are present.

  3. Task A is controlling also B1 and B2, at some point task A writes to receive queues of B1 and B2 which unblock and B1 or B2 or both run

  4. Each task B1 and B2 should set some flag, showing task is running

  5. It can take undefined amount of time to complete B1 or B2, when completed, each task resets its “running flag”

  6. Now task A, at some point in the “periodic” run section, should check if tasks B1 and B2 completed their job (running flag not set), if both are finished it should perform some action, otherwise is should just continue executing periodic stuff.

So I wonder if task notification mechanism or event groups can be used for this purpose or what is the most suitable/efficient mechanism for this design problem.

Thank you


TaskNotification or Event groups

Posted by hs2sf on July 14, 2016

IMO notifications should be sufficient for this design. I've developed a pretty similar system purely using notifications b/c they are by far the fastest and smallest IPC mechanism available in FreeRTOS (you can disable almost all other OS features). I think event_groups are an overkill. But if you're a lucky boy having no constraints regarding performance and code size you can choose the most convenient IPC :) Good luck !

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

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

Latest News

Version 10.1.0 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