Bird
0
0

What happens in FreeRTOS when a higher priority task becomes ready while a lower priority task is running under preemptive scheduling?

easy📝 Conceptual Q11 of 15
FreeRTOS - Task Scheduling
What happens in FreeRTOS when a higher priority task becomes ready while a lower priority task is running under preemptive scheduling?
AThe scheduler ignores the higher priority task until the lower priority task yields.
BThe lower priority task continues running until it finishes.
CBoth tasks run at the same time.
DThe higher priority task immediately preempts the lower priority task and starts running.
Step-by-Step Solution
Solution:
  1. Step 1: Understand preemptive scheduling behavior

    In preemptive scheduling, the system always runs the highest priority task that is ready.
  2. Step 2: Apply to the scenario

    When a higher priority task becomes ready, it interrupts the lower priority task immediately.
  3. Final Answer:

    The higher priority task immediately preempts the lower priority task and starts running. -> Option D
  4. Quick Check:

    Preemptive scheduling = immediate switch to higher priority task [OK]
Quick Trick: Higher priority tasks always interrupt lower ones immediately [OK]
Common Mistakes:
  • Thinking tasks run simultaneously on a single core
  • Believing lower priority tasks finish before switching
  • Confusing preemptive with cooperative scheduling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes