Bird
0
0

You have three tasks with priorities 2, 4, and 3. Task with priority 4 is blocked waiting for an event. Which task will FreeRTOS schedule next?

hard📝 Application Q15 of 15
FreeRTOS - Task Scheduling

You have three tasks with priorities 2, 4, and 3. Task with priority 4 is blocked waiting for an event. Which task will FreeRTOS schedule next?

ATask with priority 3
BTask with priority 2
CTask with priority 4
DNo task runs until priority 4 task is ready
Step-by-Step Solution
Solution:
  1. Step 1: Understand task states and scheduling

    FreeRTOS schedules the highest priority task that is ready (not blocked).
  2. Step 2: Identify ready tasks

    Task with priority 4 is blocked, so it cannot run now. Tasks with priority 3 and 2 are ready.
  3. Step 3: Choose highest priority ready task

    Between priority 3 and 2, priority 3 is higher, so it runs next.
  4. Final Answer:

    Task with priority 3 -> Option A
  5. Quick Check:

    Highest ready priority = 3 [OK]
Quick Trick: Blocked tasks don't run; next highest ready priority runs [OK]
Common Mistakes:
  • Trying to run blocked task
  • Ignoring task states
  • Assuming no task runs if highest priority blocked

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes