edited by
13,876 views

4 Answers

Best answer
32 votes
32 votes

Answer is option (B)

Initially semaphore is $10$, then $6$ down operations are performed means $(10-6=4)$ and $4$ up operations means $(4+4=8)$

So, at last option (B) $8$ is correct.

edited by
0 votes
0 votes
The positive value of semaphore shows the number of successful down() that can be performed on the semaphore. Here 6 successful down() can be performed after that semaphore value will become 4. 1 down() decreases the value of semaphore by 1.

The up() on semaphore increases it's value by 1 & it is always successful. After 4 up() final value of semaphore become 8.
0 votes
0 votes

Answer is option (B)

For 6 down operations and 4 up operations

10-6+4 = 8

 

Answer:

Related questions

32 votes
32 votes
3 answers
1
Kathleen asked Sep 25, 2014
10,008 views
When the result of a computation depends on the speed of the processes involved, there is said to becycle stealingrace conditiona time locka deadlock
18 votes
18 votes
4 answers
2
26 votes
26 votes
5 answers
3
Kathleen asked Sep 12, 2014
23,603 views
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 resu...