Bird
0
0

What happens if multiple worker tasks in a task pool call xQueueReceive on the same queue simultaneously?

medium📝 Conceptual Q5 of 15
FreeRTOS - Design Patterns for RTOS
What happens if multiple worker tasks in a task pool call xQueueReceive on the same queue simultaneously?
AThe queue duplicates items for each task automatically
BOnly one task receives each work item; others block until next item
CAll tasks receive the same work item simultaneously
DThe system crashes due to race condition
Step-by-Step Solution
Solution:
  1. Step 1: Understand queue behavior with multiple receivers

    Queues deliver each item to only one receiver; others wait for next items.
  2. Step 2: Evaluate options

    Queue does not duplicate items or cause crashes in this scenario.
  3. Final Answer:

    Only one task receives each work item; others block until next item -> Option B
  4. Quick Check:

    Queue items delivered one per receiver [OK]
Quick Trick: Queue items go to one waiting task at a time [OK]
Common Mistakes:
  • Thinking all tasks get same item
  • Assuming queue duplicates items
  • Believing system crashes on multiple receivers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes