Dining Philosophers: Pick up both sticks at once (or pick up none) Shared: Boolean InUse[4]=(False,False,False,False,False); Semaphore Status=1; Philosopheri Loop P(Status); /* Check if our sticks are available */ if Not InUse[(i+4)mod 5] and Not InUse[i] InUse[(i+4)mod 5]:=InUse[i]:=True; V(Status); Pick Up Sticks; Eat; Put Down Sticks; // P(Status); InUse[i]:=InUse[(i+4)mod 5]:=False; // V(Status); } else V(Status); Think(); endloop