← Quiz: Process Synchronization: all 10 questions
Quiz: Process Synchronization · Question 7 of 10
In the producer–consumer solution, when does the producer block on wait(empty)?
In the producer–consumer solution, when does the producer block on wait(empty)?
- A.When the buffer is empty
- B.When the buffer is full (no free slots left)
- C.When the consumer is running
- D.Never
Answer & explanation
Correct answer: When the buffer is full (no free slots left)
empty counts free slots; when it reaches 0, there is no room for a new item.
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 →