recategorized by
2,041 views
2 votes
2 votes

At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and "x" V operations were performed on this semaphore. If the final value of semaphore is 7, x will be

  1. 8
  2. 9
  3. 10
  4. 11
recategorized by

2 Answers

0 votes
0 votes
Current value of CS=10

CS-12+X=7

X=7+12-10=9

Option (2) is correct.
0 votes
0 votes

Answer is B

 

10-12+x=7

-2+x=7

x=9

Note: P represents Wait/down which means negative number and V represents signal/up which means positive number. 

Related questions

0 votes
0 votes
4 answers
1
2 votes
2 votes
2 answers
2
0 votes
0 votes
2 answers
4
Pooja Khatri asked Jul 13, 2018
1,458 views
Which UNIX/Linux command is used to make all files and sub-directions in the directory "progs" executable by all users?chmod - R a + x progschmod - R 222 progschmod - X a...