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
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.
Thanks, it's not a school question, but there is a project in my school that i needed to learn something about this quickly.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.