Recall & Review
beginner
What is priority-based scheduling in FreeRTOS?
Priority-based scheduling is a method where tasks with higher priority get CPU time before lower priority tasks. FreeRTOS uses this to decide which task runs next.
Click to reveal answer
beginner
How does FreeRTOS handle tasks with the same priority?
FreeRTOS uses time slicing (round-robin) for tasks with the same priority, giving each task a turn to run for a fixed time slice if configUSE_TIME_SLICING is set to 1.
Click to reveal answer
intermediate
What happens if a higher priority task becomes ready while a lower priority task is running?
The scheduler immediately switches to the higher priority task, pausing the lower priority one until the higher priority task blocks or finishes.
Click to reveal answer
intermediate
Explain the role of configMAX_PRIORITIES in FreeRTOS.
configMAX_PRIORITIES sets the maximum number of priority levels available for tasks. It defines how many different priority levels you can assign.
Click to reveal answer
advanced
Why is priority inversion a concern in priority-based scheduling?
Priority inversion happens when a low priority task holds a resource needed by a high priority task, causing the high priority task to wait and reducing system responsiveness.
Click to reveal answer
In FreeRTOS, which task runs first?
✗ Incorrect
FreeRTOS always runs the task with the highest priority that is ready to run.
What does FreeRTOS do when two tasks have the same priority?
✗ Incorrect
FreeRTOS uses time slicing to share CPU time fairly among tasks with the same priority if configUSE_TIME_SLICING is enabled.
What is the effect of a higher priority task becoming ready while a lower priority task runs?
✗ Incorrect
FreeRTOS preempts the lower priority task to run the higher priority one immediately.
What does configMAX_PRIORITIES control in FreeRTOS?
✗ Incorrect
configMAX_PRIORITIES sets how many priority levels tasks can have.
What problem does priority inversion cause?
✗ Incorrect
Priority inversion delays high priority tasks because they wait on resources held by lower priority tasks.
Describe how FreeRTOS decides which task to run next using priority-based scheduling.
Think about how the scheduler picks tasks based on priority and what happens when priorities are equal.
You got /3 concepts.
Explain what priority inversion is and why it can be a problem in FreeRTOS scheduling.
Consider how a low priority task holding a resource can delay a high priority task.
You got /3 concepts.