Bird
0
0

In FreeRTOS, if two tasks have the same priority but one never executes, which debugging step is most appropriate?

medium📝 Debug Q7 of 15
FreeRTOS - Task Scheduling
In FreeRTOS, if two tasks have the same priority but one never executes, which debugging step is most appropriate?
AIncrease the priority of the non-running task
BCheck if the non-running task is blocked or suspended
CDisable time-slicing in FreeRTOSConfig.h
DReduce the stack size of the running task
Step-by-Step Solution
Solution:
  1. Step 1: Understand equal priority scheduling

    Tasks with equal priority should share CPU time fairly.
  2. Step 2: Identify why a task never runs

    If a task never runs, it may be blocked, suspended, or waiting on a resource.
  3. Final Answer:

    Check if the non-running task is blocked or suspended -> Option B
  4. Quick Check:

    Blocked tasks do not get CPU time [OK]
Quick Trick: Blocked or suspended tasks do not run [OK]
Common Mistakes:
  • Assuming priority change fixes scheduling
  • Disabling time-slicing unnecessarily
  • Adjusting stack size unrelated to scheduling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes