Bird
0
0

If runtime monitoring reveals a deadlock between two FreeRTOS tasks, what is the most effective initial action?

medium📝 Troubleshoot Q7 of 15
FreeRTOS - Debugging and Monitoring
If runtime monitoring reveals a deadlock between two FreeRTOS tasks, what is the most effective initial action?
AIncrease task priorities to force preemption
BAnalyze and redesign resource acquisition order to prevent circular waits
CDisable runtime monitoring to reduce overhead
DAdd delays in tasks to stagger execution
Step-by-Step Solution
Solution:
  1. Step 1: Identify deadlock cause

    Deadlocks often arise from circular resource dependencies.
  2. Step 2: Apply best practice

    Redesigning resource acquisition order breaks circular waits, resolving deadlocks.
  3. Step 3: Evaluate other options

    Increasing priorities or adding delays are unreliable; disabling monitoring hides issues.
  4. Final Answer:

    Analyze and redesign resource acquisition order to prevent circular waits -> Option B
  5. Quick Check:

    Break circular wait to fix deadlock [OK]
Quick Trick: Fix deadlocks by ordering resource locks consistently [OK]
Common Mistakes:
  • Trying to fix deadlocks by changing priorities
  • Ignoring the root cause of circular waits
  • Disabling monitoring instead of debugging

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes