← Quiz: Process Synchronization: all 10 questions
Quiz: Process Synchronization · Question 6 of 10
A semaphore S starts at 2. Three processes call wait(S) one after another, and nobody calls signal(S). What happens?
A semaphore S starts at 2. Three processes call wait(S) one after another, and nobody calls signal(S). What happens?
- A.All three continue
- B.The first two continue and the third blocks
- C.Only the first continues
- D.All three block
Answer & explanation
Correct answer: The first two continue and the third blocks
Each successful wait lowers S by 1; when S reaches 0, the next wait blocks.
Can you get the rest right without peeking?
Take the timed Quiz: Process Synchronization quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →