Bird
0
0

Given a FreeRTOS system with two tasks of different priorities, which task will the scheduler run first?

medium📝 Predict Output Q4 of 15
FreeRTOS - RTOS Fundamentals
Given a FreeRTOS system with two tasks of different priorities, which task will the scheduler run first?
AThe task that was created first
BThe task with the higher priority
CThe task with the lower priority
DThe task with the longest runtime
Step-by-Step Solution
Solution:
  1. Step 1: Understand FreeRTOS priority scheduling

    FreeRTOS scheduler always runs the highest priority task that is ready.
  2. Step 2: Apply priority rule to tasks

    Between two tasks, the one with higher priority runs first regardless of creation time or runtime.
  3. Final Answer:

    The task with the higher priority -> Option B
  4. Quick Check:

    Scheduler runs highest priority task first [OK]
Quick Trick: Higher priority tasks run before lower ones [OK]
Common Mistakes:
  • Thinking creation order matters
  • Assuming longest runtime runs first

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes