Sail E0 Webinar
Question
At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore.The resulting value of the semaphore is :
Options:
A .  42
B .  2
C .  7
D .  12
Answer: Option B


P represents Wait and V represents Signal. P operation will decrease the value by 1 everytime and V operation will increase the value by 1 everytime.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers