Quality RTOS & Embedded Software

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


Theoretical doubts

Posted by joseph23 on June 19, 2016

Hello everyone, before I start, im sorry if im posting in the wonrg area of the forum, im new and i didnt understand very well how it works.

I have 2 questions:In freertos there are 3 ways of avoiding resources sharing : interruption suspend, tasks suspend or using mutex semaphores. Where should i use each one of them?

other question is: What is Gatekeeper in the freertos and what is the advantage using it for resource management?

Thanks a lot, and im sorry if i posted in the wrong area

Theoretical doubts

Posted by rtel on June 19, 2016

This sounds like a school question?


These disable interrupts, normally up to a maximum user defined priority level rather than globally. As they disable interrupts they are only good for very short critical sections. They are however also very fast, so have minimum impact on interrupt responsiveness when used correctly (for very short sections). They also protect against both tasks and interrupts accessing a resource.


These leave interrupts enabled, so can be used on longer critical sections, but should still be used sparingly as they will prevent a context switch. Suspending the scheduler is very fast, resuming it again is not deterministic though as one or more tasks that was unblocked while the scheduler was suspended will need to be processed when it is resumed, as do any tick interrupts that occurred while the scheduler was suspended.


These have traditional OS mutex behaviour. The best method to use if mutually exclusive access is required for a relatively long period, such as when using a peripheral.

I'm sure there is a lot more that could be added.

Theoretical doubts

Posted by joseph23 on June 19, 2016

Thanks, it's not a school question, but there is a project in my school that i needed to learn something about this quickly.

[ 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.

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