7 Interrupt Managament Counting Semaphore
7 Interrupt Managament Counting Semaphore
7 Interrupt Managament Counting Semaphore
“FreeRTOS”
Interrupt Management
Counting Semaphores
1
Agenda
• Binary semaphore pitfall
Resource management.
– The count value indicates the number of resources available.
– To obtain control of a resource a task must first obtain a semaphore—
decrementing the semaphore’s count value.
– When the count value reaches zero, there are no free resources.
– When a task finishes with the resource, it 'gives' the semaphore
back—incrementing the semaphore’s count value.
– Counting semaphores that are used to manage resources are created so
that their initial count value equals the number of resources that are
available.
Counting Semaphore