![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-53/ti_inject-812ce.png)
哲学家就餐问题的一种解决方案如下: program dining philosophers; var semaphore chopstick[5]={1,1,1,1,1}; /*分别表示5支筷子*/ i: integer; procedure philosopher(i: integer); begin repeat think; wait(chopstick [i]); wait(chopstick [(i+1) mod 5]); eat; signal(chopstick [(i+1) mod 5]); signal(chopstick [i]); until false; end; begin parbegin philosopher(0); philosopher(1); philosopher(2); philosopher(3); philosopher(4); parend end. 在该解决方案中,说法正确的是: