Problem on counting SemaphoreQuestion
A counting semaphore = 10 and then 6 P and 4 v are made then what is the value of semaphore ?
10 – 6 = 4 and then 4 v will increment the semaphore value as 4 + 4 which is 8.
Properties of Counting Semaphore
- Increment/Decrement of semaphore value will be atomic.
- There is no mutual exclusion as >1 processes can enter into critical section.
- Bounded waiting will be guaranteed as wake up will happen in same order in which they slept.
- Progress is also there as no one will prevent other process if the former does not want critical section.