RTEMS Logo

RTEMS 4.9.3 On-Line Library


Semaphore Manager Theory

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

9.2.1: Theory

Semaphores are used for synchronization and mutual exclusion by indicating the availability and number of resources. The task (the task which is returning resources) notifying other tasks of an event increases the number of resources held by the semaphore by one. The task (the task which will obtain resources) waiting for the event decreases the number of resources held by the semaphore by one. If the number of resources held by a semaphore is insufficient (namely 0), the task requiring resources will wait until the next time resources are returned to the semaphore. If there is more than one task waiting for a semaphore, the tasks will be placed in the queue.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2008 OAR Corporation