Bird
0
0

What problem can occur and how to fix it?

hard📝 Application Q9 of 15
FreeRTOS - Task Priorities
In a system with tasks A (priority 3), B (priority 5), and C (priority 4), task B uses a mutex to protect a resource. Task A needs the same resource but has lower priority. What problem can occur and how to fix it?
AStarvation; fix by deleting task C
BDeadlock; fix by increasing task A priority
CNo problem; FreeRTOS handles all resource conflicts automatically
DPriority inversion; fix by using priority inheritance
Step-by-Step Solution
Solution:
  1. Step 1: Identify problem

    Task A (lower priority) holding mutex can block higher priority task B, causing priority inversion.
  2. Step 2: Apply solution

    Use priority inheritance to temporarily raise task A's priority while holding the mutex.
  3. Final Answer:

    Priority inversion; fix by using priority inheritance -> Option D
  4. Quick Check:

    Mutex + priority inversion = Use priority inheritance [OK]
Quick Trick: Use priority inheritance to solve priority inversion [OK]
Common Mistakes:
  • Ignoring priority inversion problem
  • Assuming FreeRTOS auto-fixes all mutex issues
  • Deleting unrelated tasks to fix resource conflicts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes