Computer Science, asked by ammumenon82, 11 months ago

Consider the notation nP and mQ to indicate n down operations and m up operations on a semaphore respectively. For an application using a counting 
   semaphore, the following sequence of operations is obtained: 5P, 2V, 10P, 5V, 4P. The value of the semaphore at the end of these operations is -7.

   
   What is the initial value of the semaphore?

Answers

Answered by krishna714133
0

Answer:

I cannot understand the question

Answered by JugalGajjar
1

Answer:

5

Explanation:

X = Initial semaphore count

Final count = -7

P = Decrement, V = Increment

Therefore,

X - 5 + 2 - 10 + 5 - 4 = -7

X - 19 + 7 = -7

X = 19 - 7 - 7 = 19 - 14

X = 5

Similar questions