edited by
16,207 views
4 4 votes

At a particular time the value of counting semaphore is 10. It will become 7 after:

  1. 3 V operations
  2. 3 P operations
  3. 5 V operations and 2 P operations
  4. 2 V operations and 5 P operations

2 Answers

Best answer
15 15 votes
We know that there are two operations are used in semaphores

1) wait : It is denoted by P, It is used when some process enter into the critical section by decreasing semaphore value by 1.

2) signal :It is denoted by V, It is used when some process exit into the critical section by increasing semaphore value by 1.

So, in the question they are asking about value is decreasing from 10 to 7 so, there would be 3 P operations used..

And other possibility may be firstly 2 V happen, because of this value increases from 10 to 12 and then 5 P happen, because of this value decreases from 12 to 7..

so both B and D will be correct...
selected by
Answer:
Position:
Show:

Related questions

8 8 votes
1 answers 1 answer
7.4k
7.4k views
sh!va asked May 7, 2017
7,378 views
Estimation at software development effort for organic software in basic COCOMO is:E = 2.0 (KLOC) 1.05 PME = 3.4 (KLOC) 1.06 PME = 2.4 (KLOC) 1.05 PME = 2.4 (KLOC) 1.07...
9 9 votes
5 answers 5 answers
8.9k
8.9k views
go_editor asked Sep 28, 2014
8,853 views
In the context of modular software design, which one of the following combinations is desirable?High cohesion and high couplingHigh cohesion and low couplingLow cohesion ...
8 8 votes
2 answers 2 answers
7.5k
7.5k views
sh!va asked May 7, 2017
7,478 views
Which of the following statement is true?Hard real time OS has less jitter than soft real time OSHard real time OS has more jitter than soft real time OSHard real time OS...
5 5 votes
2 answers 2 answers
8.8k
8.8k views
sh!va asked May 7, 2017
8,832 views
The Linux command mknod myfifo b 4 16will create a character device if user is rootwill create a named pipe FIFO if user is rootwill create a block device if user is root...