Bird
0
0

Which of the following is the correct way to set two tasks to have equal priority in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - Task Scheduling
Which of the following is the correct way to set two tasks to have equal priority in FreeRTOS?
AxTaskCreate(task1, "Task1", 1000, NULL, 2, NULL); xTaskCreate(task2, "Task2", 1000, NULL, 2, NULL);
BxTaskCreate(task1, "Task1", 1000, NULL, 1, NULL); xTaskCreate(task2, "Task2", 1000, NULL, 3, NULL);
CxTaskCreate(task1, "Task1", 1000, NULL, 0, NULL); xTaskCreate(task2, "Task2", 1000, NULL, 1, NULL);
DxTaskCreate(task1, "Task1", 1000, NULL, 5, NULL); xTaskCreate(task2, "Task2", 1000, NULL, 4, NULL);
Step-by-Step Solution
Solution:
  1. Step 1: Check task priority parameters

    In FreeRTOS, the fifth parameter in xTaskCreate is the task priority.
  2. Step 2: Identify equal priorities

    Both tasks have priority 2 in xTaskCreate(task1, "Task1", 1000, NULL, 2, NULL); xTaskCreate(task2, "Task2", 1000, NULL, 2, NULL);, making them equal priority tasks.
  3. Final Answer:

    Both tasks have priority 2, so they have equal priority. -> Option A
  4. Quick Check:

    Same priority number = equal priority [OK]
Quick Trick: Same priority number means equal priority [OK]
Common Mistakes:
  • Assigning different priority numbers to tasks
  • Confusing task stack size with priority
  • Using priority 0 and 1 as equal

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes