Bird
0
0

What will happen if a higher priority task becomes ready while a lower priority task is running in FreeRTOS?

medium📝 Predict Output Q5 of 15
FreeRTOS - Task Scheduling

What will happen if a higher priority task becomes ready while a lower priority task is running in FreeRTOS?

ABoth tasks run simultaneously.
BThe lower priority task continues until it finishes.
CThe scheduler immediately switches to the higher priority task.
DThe scheduler ignores the higher priority task.
Step-by-Step Solution
Solution:
  1. Step 1: Understand preemption in FreeRTOS

    FreeRTOS supports preemptive scheduling, so a higher priority ready task preempts lower priority running task.
  2. Step 2: Analyze scheduler behavior on higher priority task readiness

    The scheduler immediately switches context to the higher priority task.
  3. Final Answer:

    The scheduler immediately switches to the higher priority task. -> Option C
  4. Quick Check:

    Preemptive scheduling switches to higher priority task immediately = A [OK]
Quick Trick: Higher priority tasks preempt lower priority ones immediately [OK]
Common Mistakes:
  • Thinking lower priority task runs to completion
  • Assuming simultaneous execution
  • Ignoring preemption

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes