Bird
0
0

In a FreeRTOS system, three tasks are created with the following priorities:

medium📝 Predict Output Q4 of 15
FreeRTOS - Task Scheduling

In a FreeRTOS system, three tasks are created with the following priorities:

Task X: Priority 1
Task Y: Priority 5
Task Z: Priority 3

Which task will the scheduler select to run immediately after all tasks are ready?

ATask Y
BTask X
CTask Z
DNone, the idle task runs first
Step-by-Step Solution
Solution:
  1. Step 1: Identify task priorities

    Task X has priority 1, Task Y has priority 5, and Task Z has priority 3.
  2. Step 2: Understand FreeRTOS scheduling

    FreeRTOS always schedules the highest priority task that is ready to run.
  3. Final Answer:

    Task Y has the highest priority (5) and will run first -> Option A
  4. Quick Check:

    Highest priority task runs first [OK]
Quick Trick: Highest priority ready task runs first [OK]
Common Mistakes:
  • Assuming lower priority number means higher priority
  • Thinking idle task runs before all user tasks
  • Ignoring task readiness state

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes