Bird
0
0

In a FreeRTOS system, a low priority task holds a mutex and a high priority task attempts to take the same mutex. If priority inheritance is enabled, what is the expected behavior?

medium📝 Predict Output Q4 of 15
FreeRTOS - Task Scheduling
In a FreeRTOS system, a low priority task holds a mutex and a high priority task attempts to take the same mutex. If priority inheritance is enabled, what is the expected behavior?
AThe mutex is automatically released by the system to avoid blocking.
BThe high priority task is blocked indefinitely until the low priority task finishes its work.
CThe medium priority tasks preempt the low priority task causing a deadlock.
DThe low priority task temporarily inherits the high priority to release the mutex faster.
Step-by-Step Solution
Solution:
  1. Step 1: Understand priority inheritance

    When a high priority task waits on a mutex held by a lower priority task, the lower priority task temporarily inherits the higher priority.
  2. Step 2: Effect on scheduling

    This prevents medium priority tasks from preempting the low priority task, allowing it to finish and release the mutex sooner.
  3. Final Answer:

    The low priority task temporarily inherits the high priority to release the mutex faster. -> Option D
  4. Quick Check:

    Priority inheritance boosts low task priority [OK]
Quick Trick: Priority inheritance boosts low task priority [OK]
Common Mistakes:
  • Assuming high priority task preempts immediately
  • Believing mutex auto-releases
  • Ignoring priority inheritance mechanism

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes