0
You visited us 0 times! Enjoying our articles? Unlock Full Access!
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 ___________.

A
42
B
2
C
12
D
7
Solution
Verified by Toppr

Correct option is B. 2

Was this answer helpful?
1
Similar Questions
Q1
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 :
View Solution
Q2
A counting semaphore was initialized to 10, then 6p (wait) operations and 4V (signal) operations were completed on this semaphore. The resulting value of the semaphore is
View Solution
Q3
A binary semaphore with initial value given as 0, the following P & V operations are preformed on it in sequence 10 P, 15 V, 2 V, 4 P, 16 P, 2 V, 8 V. After all these operations, the value of Binary semaphore & the no. of P operations that will remain block is ____
View Solution
Q4
Three concurrent processes X,Y and Z execute three different code segments that access and update certain shared variables. Process X execute the P operation (i.e.wait) on semaphores a, b and c; process Y executes the P operation on semaphores b,c and d; process Z executes the P operation on semaphores c, d and a before entering the respective code segments. After completing the execution of its code segments, each process invoke the V operation (i.e. signal) on its three semaphores. All semaphores are binary semaphores initialized to one. Which one of the following represents a deadlock-free order on invoking the P operations by the processes?
View Solution
Q5
___________ is a high level abstraction over Semaphore.
View Solution