第1章并行计算简介.pptVIP

  • 2
  • 0
  • 约1.33万字
  • 约 72页
  • 2019-10-11 发布于湖北
  • 举报
* * * * * * * * * * * * * * * * 生产者进程结构(2) do { … produce an item in nextp … wait(mutex); … add nextp to buffer … signal(mutex); } while (1); 互斥 消费者进程结构(2) do { wait(mutex); … remove an item from buffer to nextc … signal(mutex); … consume the item in nextc … } while (1); 互斥 生产者进程结构(3) do { … produce an item in nextp … wait(empty); wait(mutex); … add nextp to buffer … signal(mutex); signal(full); } while (1); 有互斥和同步 消费者进程结构(3) do { wait(full); w

文档评论(0)

1亿VIP精品文档

相关文档