Operating Systems Concepts - Engineering

Q1:

Producer consumer problem can be solved using

A semaphores

B event counters

C monitors

D all of the above

E None of the above

ANS:D - all of the above

Counter is basically an integer which is incremented by 1 whenever producer produces provided counter size is lesser than the buffer size. Also, the counter is decremented by 1 whenever consumer reads from buffer provided counter is not 0.