Bird
0
0

Given two tasks, TaskA with priority 3 and TaskB with priority 2, both ready to run, which task will FreeRTOS run first?

medium📝 Predict Output Q13 of 15
FreeRTOS - Task Priorities

Given two tasks, TaskA with priority 3 and TaskB with priority 2, both ready to run, which task will FreeRTOS run first?

ATaskB
BDepends on task creation order
CBoth run simultaneously
DTaskA
Step-by-Step Solution
Solution:
  1. Step 1: Compare task priorities

    TaskA has priority 3, TaskB has priority 2. Higher number means higher priority.
  2. Step 2: Determine which task runs first

    FreeRTOS runs the highest priority ready task first, so TaskA runs before TaskB.
  3. Final Answer:

    TaskA -> Option D
  4. Quick Check:

    Higher priority runs first = B [OK]
Quick Trick: Higher priority number runs first in FreeRTOS [OK]
Common Mistakes:
  • Thinking lower number means higher priority
  • Assuming tasks run simultaneously
  • Believing creation order affects scheduling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes