Bird
0
0

How can you change the priority of a running FreeRTOS task?

hard📝 Application Q9 of 15
FreeRTOS - Task Creation and Management

How can you change the priority of a running FreeRTOS task?

ADelete and recreate the task with new priority
BModify the uxPriority variable directly
CUse vTaskPrioritySet() with the task handle and new priority
DChange priority in the task function code
Step-by-Step Solution
Solution:
  1. Step 1: Recall FreeRTOS API for changing task priority

    vTaskPrioritySet() is the official function to change a task's priority at runtime.
  2. Step 2: Understand parameters of vTaskPrioritySet()

    It takes the task handle and the new priority value to update the task's priority.
  3. Final Answer:

    Use vTaskPrioritySet() with the task handle and new priority -> Option C
  4. Quick Check:

    Change priority with vTaskPrioritySet() [OK]
Quick Trick: Use vTaskPrioritySet() to change priority at runtime [OK]
Common Mistakes:
  • Trying to change priority by variable modification
  • Deleting and recreating task unnecessarily
  • Changing priority inside task code

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes