Bird
0
0

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

medium📝 Predict Output Q5 of 15
FreeRTOS - RTOS Fundamentals
What will happen if two FreeRTOS tasks have the same priority and are both ready to run?
AThe lower priority task will run first
BOnly the first created task will run forever
CThe system will crash due to priority conflict
DThe scheduler will time-slice between the two tasks
Step-by-Step Solution
Solution:
  1. Step 1: Understand equal priority task scheduling

    FreeRTOS uses time slicing (round-robin) when tasks have equal priority.
  2. Step 2: Predict scheduler behavior

    It switches between tasks to share CPU time fairly.
  3. Final Answer:

    The scheduler will time-slice between the two tasks -> Option D
  4. Quick Check:

    Equal priority tasks share CPU time [OK]
Quick Trick: Equal priority tasks share CPU via time slicing [OK]
Common Mistakes:
  • Assuming one task runs forever
  • Thinking system crashes on equal priority

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes