Bird
0
0

If a high priority task becomes ready while a low priority task is running, what will FreeRTOS scheduler do?

medium📝 Predict Output Q5 of 15
FreeRTOS - Task Scheduling
If a high priority task becomes ready while a low priority task is running, what will FreeRTOS scheduler do?
AContinue running the low priority task until it finishes
BIgnore the high priority task until the low priority task yields
CPreempt the low priority task and run the high priority task
DRun both tasks at the same time
Step-by-Step Solution
Solution:
  1. Step 1: Recall preemptive scheduling behavior

    FreeRTOS preempts lower priority tasks when higher priority tasks become ready.
  2. Step 2: Apply this to the scenario

    The scheduler will stop the low priority task and run the high priority one immediately.
  3. Final Answer:

    Preempt the low priority task and run the high priority task -> Option C
  4. Quick Check:

    Preemption = High priority runs immediately [OK]
Quick Trick: High priority tasks preempt lower ones instantly [OK]
Common Mistakes:
  • Thinking low priority task runs to completion
  • Assuming tasks run simultaneously
  • Believing scheduler ignores high priority tasks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes