Question: Let a bounded semaphore s be a general semaphore that cannot exceed a given value smax > 0 . The corresponding operations PB and VB
Let a bounded semaphore s be a general semaphore that cannot exceed a given value smax > 0 . The corresponding operations PB and VB are defined as follows:
PB(s): wait until s > 0; then decrement s by 1 VB(s): wait until s < smax; then increment s by 1.
Using semaphores, write two function PB(s) and VB(s) that emulate the operations on bounded semaphores.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
