1 vote
1 vote
A particular computation of counting semaphore is 7  Then 20p operation and x. V operation were completed on this semaphore If the final value of X will be 5 then what will be the value of x?

Options a) 13

b) 18

C) 22

d) 2
in Operating System
279 views

2 Answers

2 votes
2 votes
B option (18)

initially there is 7 processor  and 20p means 20 down or wait operation and v means up or signal operation,so

equation will be

7-20+x=5

here =5  shows that the final value, after calculation will be 5 as( given in question) so

-13+x=5

x= 18
0 votes
0 votes

Answer: B

20 P operations i.e. wait or down.

x V operations i.e. signal or up

Initial value + no. of up oeration – no. of down operation = Final value

7 + x – 20 = 5

x – 13 = 5

x = 18

Related questions