Bird
0
0

To ensure three FreeRTOS tasks with equal priority share CPU time evenly, which configuration and coding practice is recommended?

hard📝 Application Q8 of 15
FreeRTOS - Task Scheduling
To ensure three FreeRTOS tasks with equal priority share CPU time evenly, which configuration and coding practice is recommended?
AEnable configUSE_TIME_SLICING and ensure tasks yield or block periodically
BSet different priorities for each task to avoid conflicts
CDisable preemption and rely on cooperative scheduling
DIncrease the tick rate to reduce context switch overhead
Step-by-Step Solution
Solution:
  1. Step 1: Enable time-slicing

    configUSE_TIME_SLICING must be set to 1 to allow equal priority tasks to share CPU time.
  2. Step 2: Ensure tasks yield or block

    Tasks should periodically yield or block to allow others to run.
  3. Final Answer:

    Enable time-slicing and ensure tasks yield/block -> Option A
  4. Quick Check:

    Time-slicing plus yielding ensures fair CPU sharing [OK]
Quick Trick: Enable time-slicing and yield for fair CPU sharing [OK]
Common Mistakes:
  • Assigning different priorities defeats equal priority scheduling
  • Disabling preemption prevents time-slicing
  • Increasing tick rate alone does not guarantee fairness

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes