Monday 12 March 2012

Bounded-Buffer Problem Producer Process


  do
  {
  …
  produce an item in nextp
  …
  wait(empty);
  wait(mutex);
  …
  add nextp to buffer
  …
  signal(mutex);
  signal(full);
  }
  while (1);
  

No comments:

Post a Comment