Bird
0
0

A task with priority 5 is starved and never runs, even though lower priority tasks run fine. What is a possible error?

medium📝 Debug Q7 of 15
FreeRTOS - Task Priorities
A task with priority 5 is starved and never runs, even though lower priority tasks run fine. What is a possible error?
AA higher priority task is always ready and preempts it
BThe task priority is set too low
CThe task is suspended accidentally
DThe scheduler is not started
Step-by-Step Solution
Solution:
  1. Step 1: Analyze starvation cause

    Starvation happens if higher priority tasks always run, blocking lower priority ones.
  2. Step 2: Apply to given priority

    Task with priority 5 is starved likely because a task with priority >5 is always ready.
  3. Final Answer:

    A higher priority task is always ready and preempts it -> Option A
  4. Quick Check:

    Starvation = Higher priority task always ready [OK]
Quick Trick: Starvation caused by always ready higher priority tasks [OK]
Common Mistakes:
  • Assuming priority 5 is too low without checking others
  • Ignoring task suspension state
  • Forgetting to start the scheduler

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes