资 源 简 介
哲学家就餐问题是由Dijkatra提出并解决的典型同步问题。该问题描述的是有五个哲学家共用一张圆桌,分别坐在周围的五张椅子上,圆桌上有五个碗和五只筷子,他们的生活方式是交替的进行思考和就餐。平时,一个哲学家进行思考,饥饿时便试图取用其左右最靠近他的筷子,只有在他拿到两只筷子时才能进餐。进餐完,放下筷子继续思考。-Dining philosophers problem is presented and solved Dijkatra typical synchronization problems. Description of the problem is that there are five philosophers share a round-table were sitting around the five chair, round table has five bowl and five chopsticks, their way of life is the turn of thinking and eating. Normally, a philosopher to think, hunger when trying to access their nearest him about the chopsticks, only if he can get two chopsticks when eating. End meals, to lay down their chopsticks to continue thinking.