146
Monitor for the bounded P/C problem
nMonitor needs to hold the buffer:
ubuffer: array[0..k-1] of items;
nneeds two condition variables:
unotfull: true when buffer is not full
unotemty: true when buffer is not empty
nneeds buffer pointers and counts:
unextin: points to next item to be appended
unextout: points to next item to be taken
ucount: holds the number of items in buffer
u