Question
The value of a counting semaphore is 7 . Then 15 wait operations and 10 signal operations were completed on this semaphore. The resulting value of semaphore is(A) 5(B) 7(C) 2(D) 0
Step 1
Step 1: The initial value of the counting semaphore is given as 7. Show more…
Show all steps
Your feedback will help us improve your experience
Samriddhi Singh and 70 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
At a particular time of computation, the value of counting semaphore is 7 . Then 20 wait operations and ' $x$ 'signal operations were completed on this semaphore. If the final value of the semaphore is 5 , what is $x$ ? (A) 18 (B) 13 (C) 5 (D) 0
OPERATING SYSTEM
INTERPROCESS COMMUNICATION, CONCURRENCY AND SYNCHRONIZATION
A process using a semaphore has a start value of 1 for its semaphore. Since the start of execution of the program, 12 signal operations were completed. How many wait operations have been completed so far if the current value of semaphore is 6 ? (A) 1 (B) 5 (C) 7 (D) 11
Which of the following sequence of 'wait' and 'signal' operations leads to deadlock? (Here 'mutex' is a semaphore variable initialized to 1.)
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD