edited by
214 views
1 votes
1 votes

A counting semaphore is initialized to $10$. The $6$ P(wait) operations and $4$ V(signal) operations were completed in this semaphore. The resulting value of semaphore is:

  1. $0$
  2. $8$
  3. $10$
  4. $12$
edited by

1 Answer

Best answer
1 votes
1 votes
In P operation semaphore value is reduced by 1. In V operation semaphore value is increased by 1
 so the  resulting value of semaphore is : Initial value - number of P + number of V = (10 - 6 )+ 4 = 8
selected by
Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Dec 26, 2016
278 views
Consider the following 3 processes with 3 binary semaphores with initial values $S_{0}=0, S_{1}=0, S_{2}=1$$$ \begin{array}{|c|c|c|} \hline \textbf{P} & \textbf{Q} & \tex...
2 votes
2 votes
3 answers
2
Bikram asked Dec 26, 2016
1,106 views
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
0 votes
0 votes
1 answer
4