🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Semaphores and Classic Problems: all 9 questions

Quiz: Semaphores and Classic Problems · Question 4 of 9

In the bounded buffer, which semaphore makes the producer block when the buffer is full?

In the bounded buffer, which semaphore makes the producer block when the buffer is full?

  1. A.empty
  2. B.full
  3. C.mutex
  4. D.None — the producer never blocks
Answer & explanation

Correct answer: empty

empty counts free slots; when it reaches 0, wait(empty) blocks.

Can you get the rest right without peeking?

Take the timed Quiz: Semaphores and Classic Problems quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →