Bird
0
0

You need to send multiple integer values from one task to another in FreeRTOS with minimal delay. Which approach is best for performance and why?

hard📝 Application Q15 of 15
FreeRTOS - Task Notifications
You need to send multiple integer values from one task to another in FreeRTOS with minimal delay. Which approach is best for performance and why?
AUse task notifications only for signaling and queues for data transfer.
BUse a queue to send each integer separately, ensuring order and data integrity.
CUse global variables protected by mutexes to share data.
DUse task notifications with bitwise encoding to send multiple values quickly.
Step-by-Step Solution
Solution:
  1. Step 1: Understand task notifications limitations

    Task notifications are fast but designed for simple signals or small data (like a single 32-bit value).
  2. Step 2: Consider queues for multiple data items

    Queues can hold multiple messages and maintain order, suitable for sending multiple integers reliably.
  3. Step 3: Choose best practice

    Use task notifications for signaling and queues for actual data transfer to balance performance and correctness.
  4. Final Answer:

    Use task notifications only for signaling and queues for data transfer. -> Option A
  5. Quick Check:

    Notifications = signals, queues = data [OK]
Quick Trick: Notifications signal; queues transfer multiple data items [OK]
Common Mistakes:
  • Trying to encode multiple values in notifications
  • Ignoring data integrity with global variables
  • Assuming notifications can replace queues for data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes