Bird
0
0

Why is xTaskNotifyGive() considered a lightweight semaphore compared to traditional FreeRTOS semaphores?

hard📝 Conceptual Q10 of 15
FreeRTOS - Task Notifications
Why is xTaskNotifyGive() considered a lightweight semaphore compared to traditional FreeRTOS semaphores?
ABecause it creates a new semaphore object internally.
BBecause it requires manual memory allocation.
CBecause it disables interrupts during notification.
DBecause it uses task notifications which are faster and use less RAM.
Step-by-Step Solution
Solution:
  1. Step 1: Understand task notifications

    Task notifications use a built-in 32-bit value per task, avoiding separate semaphore objects.
  2. Step 2: Compare with traditional semaphores

    Traditional semaphores require kernel objects and more RAM; task notifications are faster and lighter.
  3. Final Answer:

    Because it uses task notifications which are faster and use less RAM. -> Option D
  4. Quick Check:

    Lightweight means faster and less RAM = B [OK]
Quick Trick: Task notifications save RAM and run faster than semaphores [OK]
Common Mistakes:
  • Thinking it creates new semaphore objects
  • Believing it disables interrupts
  • Assuming manual memory management is needed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes