Книга: Real-Time Concepts for Embedded Systems

6.4 Typical Semaphore Use

Semaphores are useful either for synchronizing execution of multiple tasks or for coordinating access to a shared resource. The following examples and general discussions illustrate using different types of semaphores to address common synchronization design requirements effectively, as listed:

· wait-and-signal synchronization,

· multiple-task wait-and-signal synchronization,

· credit-tracking synchronization,

· single shared-resource-access synchronization,

· recursive shared-resource-access synchronization, and

· multiple shared-resource-access synchronization.

Note that, for the sake of simplicity, not all uses of semaphores are listed here. Also, later chapters of this book contain more advanced discussions on the different ways that mutex semaphores can handle priority inversion.

Оглавление книги


Генерация: 1.027. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз