Solve The Producer Consumer Problem By Using Semaphores Suppose There Is Only On

Solve the producer-consumer problem by using semaphores. Suppose there is only one producer and one consumer, buffer size is 15. As n increases from 0 to 2000, producer assigns the values of n to the buffer until the buffer is full, then consumer prints them out until the buffer is empty. Use only one or at most two semaphores.

Posted in Uncategorized