Bird
0
0

Consider three FreeRTOS tasks with priorities 6, 2, and 4. The task with priority 6 is currently blocked waiting for a queue message. Which task will the scheduler run next?

hard📝 Application Q8 of 15
FreeRTOS - Task Scheduling

Consider three FreeRTOS tasks with priorities 6, 2, and 4. The task with priority 6 is currently blocked waiting for a queue message. Which task will the scheduler run next?

ATask with priority 6
BTask with priority 4
CTask with priority 2
DIdle task
Step-by-Step Solution
Solution:
  1. Step 1: Identify task states

    Task with priority 6 is blocked, so it is not ready to run.
  2. Step 2: Scheduler picks highest priority ready task

    Among the remaining tasks, priorities 4 and 2 are ready.
  3. Final Answer:

    Task with priority 4 is the highest priority ready task and will be scheduled -> Option B
  4. Quick Check:

    Blocked tasks are skipped [OK]
Quick Trick: Scheduler runs highest priority ready task only [OK]
Common Mistakes:
  • Trying to run blocked tasks
  • Ignoring task readiness
  • Assuming idle task runs when ready tasks exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes