[cs33211] HW2 #4

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Oct 25 19:56:48 EDT 2012


>
> For problem #4, it talks about us doing an unbounded
> producer/consumer problem in class and to do a bounded one for
> homework.  Are these supposed to be switched? The ones we did in
> class had a buffer_size = B; (in the code equal to 5). Does this
> mean the one we did in class is bounded and not unbounded? Or am I

In class we did a bounded version of producer/cosumer with semaphores
and unbounded version of this problem with locks and CVs. The
unbounced version blocks consumer when the buffer is empty but
producer can produce an arbitrary number of items. You are to modify
this solution to bound the buffer and stop the producer when the bound
is reached.

Thanks,
-- 
Mikhail


More information about the cs33211 mailing list