6 Task Notifications Flashcards
Give three examples of communication objects?
Queues, Semaphores, and event groups.
How do task notifications compare to semaphores?
Task notifications are smaller and faster than semaphores.
What is the difference between a pending and not pending, notification state?
Pending: A task has received a task notification value.
Not Pending: after task has read the task notification value.
What are the benefits and limitations to task notifications?
Benefits:
1. Faster than queues, semaphores and event groups
by up to 45%.
2. Less memory than queue, semaphore, or event
group.
Limitations:
1. Cannot send data or event to interrupt handler.
2. Cannot notify to multiple tasks.
3. Can only send one data item (32-bit notification
value)
What state is the notification state on creation of a task?
On creation of a task the notification state is not pending.
What API Options are there to notify a task?
xTaskNotifyGive() and xTaskNotify().
Compare xTaskNotifyGive() and xTaskNotify().
xTaskNotifyGive(): used as an alternative to binary or
counting semaphore. Used to increament task
notification value (TNV).
xTaskNofity(): More flexible than xTaskNotifyGive(). Can
increment, give a new value to the task notification
value, or set a number of bits in the value.
Can be used in place of an event group.
What api options is there to take a notifications?
ulTaskNotifyTake().