Bird
0
0

You want to design a FreeRTOS system where multiple tasks send data safely to a single processing task without data loss or corruption. Which design pattern best ensures reliable multi-tasking?

hard📝 Application Q15 of 15
FreeRTOS - Design Patterns for RTOS
You want to design a FreeRTOS system where multiple tasks send data safely to a single processing task without data loss or corruption. Which design pattern best ensures reliable multi-tasking?
AUse a shared global variable without synchronization.
BUse multiple mutexes for each task to lock the processor.
CUse task notifications to broadcast data to all tasks.
DUse a queue to send data from tasks to the processing task.
Step-by-Step Solution
Solution:
  1. Step 1: Identify safe data transfer method

    Queues in FreeRTOS safely store data from multiple tasks and deliver it to one consumer task without corruption.
  2. Step 2: Compare other options

    Shared variables without sync risk corruption; multiple mutexes locking processor is inefficient; task notifications are for signaling, not data transfer.
  3. Final Answer:

    Use a queue to send data from tasks to the processing task. -> Option D
  4. Quick Check:

    Queue = Safe multi-task data transfer [OK]
Quick Trick: Queues safely pass data between tasks [OK]
Common Mistakes:
  • Using shared variables without locks
  • Misusing mutexes to lock processor
  • Confusing notifications with data queues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes