Bird
0
0

How can you combine FreeRTOS trace hooks and logging to debug intermittent task starvation?

hard📝 Application Q9 of 15
FreeRTOS - Debugging and Monitoring
How can you combine FreeRTOS trace hooks and logging to debug intermittent task starvation?
ADisable all interrupts and log task states
BEnable trace hooks to log task switches and analyze logs for starvation patterns
CUse vTaskDelay(0) in all tasks and check logs
DIncrease stack sizes and ignore trace hooks
Step-by-Step Solution
Solution:
  1. Step 1: Understand trace hooks purpose

    Trace hooks allow logging of task switches and events in FreeRTOS.
  2. Step 2: Use logs to find starvation

    Analyzing logs from trace hooks helps identify when tasks are starved of CPU time.
  3. Final Answer:

    Enable trace hooks to log task switches and analyze logs for starvation patterns -> Option B
  4. Quick Check:

    Trace hooks + logging find starvation = A [OK]
Quick Trick: Trace hooks log task switches to spot starvation [OK]
Common Mistakes:
  • Disabling interrupts hides task behavior
  • vTaskDelay(0) does not help starvation debugging
  • Ignoring trace hooks misses key info

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes