Computer Science, asked by extremist7629, 5 months ago

Certain applications using counting semaphore operation in the given order 10P, 2P, 3V, 2V, 4P, 3V results in -5. In initial value of semaphore is ---------------------------​

Answers

Answered by sharmajawahar49
0

Answer:

5P

Explanation:

Support my answer.........

Answered by rahul123437
0

The semaphore count initialized to the number of free resources. The initial value of the semaphore is 3.

Explanation:

Let the initial value of the semaphore be: x

The given order be 10P, 2P, 3V, 2V, 4P, 3V where P operation down counts for semaphore and V operation up the count for the semaphore.

x-10-2+3+2-4+3=-5\\x-8=-5\\x=-5+8\\x=3

The initial value of the semaphore is 3.

Similar questions