1 year ago
Operating System

A semaphore object is a synchronization object that maintains a count between zero and a specified maximum value. The count is decremented each time a thread completes a wait for the semaphore object and incremented each time a thread releases the semaphore. When the count reaches zero, no more threads can successfully wait for the semaphore object state to become signaled. The state of a semaphore is set to ‘signaled’ when its count is greater than zero and ‘non-signaled’ when its count is zero. The semaphore object is useful in controlling a shared resource that can support a limited number of users. It acts as a gate that limits the number of threads sharing the resource to a specified maximum number.

Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions

Top