write a bounded buffer monitor in which