Bird
0
0

What happens if two FreeRTOS tasks have the same priority and are both ready to run?

medium📝 Conceptual Q5 of 15
FreeRTOS - Task Creation and Management
What happens if two FreeRTOS tasks have the same priority and are both ready to run?
AThe system crashes due to priority conflict
BOnly the first created task runs forever
CThe scheduler time-slices between the tasks, switching regularly
DBoth tasks run simultaneously on a single core
Step-by-Step Solution
Solution:
  1. Step 1: Understand FreeRTOS scheduling for equal priority tasks

    FreeRTOS uses time slicing to share CPU time fairly among tasks of equal priority.
  2. Step 2: Evaluate other options

    Only 'The scheduler time-slices between the tasks, switching regularly' is correct; options suggesting crash, one task running forever, or simultaneous execution misrepresent scheduling.
  3. Final Answer:

    The scheduler time-slices between the tasks, switching regularly -> Option C
  4. Quick Check:

    Equal priority tasks share CPU time [OK]
Quick Trick: Equal priority tasks share CPU by time slicing [OK]
Common Mistakes:
  • Thinking one task runs forever
  • Assuming simultaneous execution on single core
  • Believing system crashes on priority tie

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes