edited by
761 views

2 Answers

0 votes
0 votes
wait() operation decrements the value of a semaphore.

signal() operation increments the value of a semaphore.

3 wait() implies -3 to value of semaphore.

4 signal() implies +4 to value of semaphore.

So 8-3+4=9 is the value of semaphore after  3 wait() and 4 signal() operations.
0 votes
0 votes

In terms of counting semaphore

  • wait/down/$P()$ operation decrement $(\downarrow)$ the value by $-1$ 
  • signal/up/$V()$ operation increment $(\uparrow)$ the value by $+1$

Now initial value of CS= $8$

final value of CS after $3P$ and $4V$ operation = $(8-3P+4V)=(8-3+4)=9$

So current values of CS is $9.$

Option $(A)$ is correct.

Ref:  Gate 1992

edited by

Related questions

1 votes
1 votes
2 answers
1
4 votes
4 votes
6 answers
3
soujanyareddy13 asked May 12, 2021
1,912 views
The Boolean expression $AB+A \overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable _________.$A$$B$$C$$A, B$ and $C$