3 3 votes A counting semaphore $S$ is initialized to $10 $. The following operations are performed in order: $8 P(S)$ operations, followed by $3 V(S)$ operations, followed by $1 P(S)$ operation. What is the final value of the semaphore $S$ ? Operating System goclasses operating-system goclasses-cs-dpp goclasses-cs-dpp-day-202 goclasses-os-practice-questions numerical-answers + – GO Classes 209 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Initial Value$: 10$ After $8 P(S)$ (Wait/Decrement): $10-8=2$ After $3 V(S)$ (Signal/Increment): $2+3=5$ After $1 P(S)$ (Wait/Decrement): $5-1=4$ GO Classes answered Feb 21 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.