Chapter6ProcessSynchronization课程.pptVIP

  • 5
  • 0
  • 约1.46万字
  • 约 44页
  • 2016-12-08 发布于江苏
  • 举报
Dining-Philosophers Problem (Cont.) The structure of Philosopher i: Do { wait ( chopstick[i] ); wait ( chopStick[ (i + 1) % 5] ); // eat signal ( chopstick[i] ); signal (chopstick[ (i + 1) % 5] ); // think } while (true) ; Problems with Semaphores Correct use of semaphore operations: signal (mutex) …. wait (mutex) wait (mutex) … wait (mutex) Omitting of wait (mutex) or signal (mutex) (or both) Monitors A high-level abstraction that provides a convenient and effective mechanism for process synchronization Only one process may be active with

文档评论(0)

1亿VIP精品文档

相关文档