retagged by
23,602 views
26 votes
26 votes

At a particular time of computation, the value of a counting semaphore is $7$. Then $20$ $P$ operations and $15$ $V$ operations were completed on this semaphore. The resulting value of the semaphore is :

  1. $42$
  2. $2$
  3. $7$
  4. $12$
retagged by

5 Answers

0 votes
0 votes

Current Value of Counting Semaphore : 7

20 P operation, value = 7-20 = -13

15 V operation, values = -13+15 = 2

Answer : (b)2

Answer:

Related questions

14 votes
14 votes
11 answers
1
ajit asked Oct 12, 2015
21,410 views
Semaphores are used to solve the problem ofRace ConditionProcess SynchronizationMutual ExclusionNone of the aboveI and IIII and IIIAll of the aboveNone of the above
18 votes
18 votes
2 answers
2
28 votes
28 votes
1 answer
3
43 votes
43 votes
4 answers
4
Kathleen asked Sep 13, 2014
14,770 views
If $G$ is a context free grammar and $w$ is a string of length $l$ in $L(G)$, how long is a derivation of $w$ in $G$, if $G$ is in Chomsky normal form?$2l$$2l +1$$2l -1$$...