What are semaphores?
Semaphores are the variables.
Semaphores are used for signaling among processes.
Three kinds of operations are performed on semaphores;
- To initialize the semaphore
- To increment the semaphore value
- To decrement the semaphore value
What are binary semaphores?
Binary semaphores take only the values in between 0 to 1.
What are counting semaphores?
Counting semaphores have the non-negative integer value.
How can processes get the critical section?
- A critical section is controlled by semaphores by following operations;
- Any process can’t enter into the critical section.
- Semaphore value is decremented.
- The process can enter into the critical section.
- Semaphore value is incremented.