ipl-logo

Dining Philosophers Problem: The Dinning Philosopher's Problem

832 Words4 Pages
The Dining Philosopher’s Problem:
The dinning philosopher’s problem is a classic and synchronization problem which used to measure the situation and allocation of multiple processes to multiple resources.
There are 5 chair and one round table in a room and 5 philosopher are sit on the chair and everyone have a bowl of spaghetti and fork is placed near to the each philosopher here we assume that eating is not limited and spaghetti nit left behind infinite supply we assumed. And the rule is each philosopher must on the other hand think and eat. Philosophers eat only when both right and left forks are free or left. And each fork is held by 1 philosopher. And when philosopher is free from eating and put down the forks and now available now for the others. Philosopher grabs the fork on left or right as become available. And can’t start eating until has both of them.

This was design to a working on a same time and philosopher won’t suffer severally its mean that it can continue forever alternate between thinking and eating and its mean that any philosopher did not know when other eat or think this was design to avoiding from deadlock and in system state no further progress is possible.
Solution: (1) Resources Hierarchy
(i) allocate the partial order to resources (ii) resources are in 1 to 5 numbered and philosopher can pick the lower number first and then the higher number.(iii) if list of resources is not recognize in advance it will be not practical always.
(2) Arbitrator
Open Document