Till KTH:s startsida Till KTH:s startsida

Visa version

Version skapad av Johan Montelius 2017-02-09 12:31

Visa < föregående | nästa >
Jämför < föregående | nästa >

Dining philosophers

Five philosphers contemplating life and eating noodles is a classical problem. If they are not that hungry things will work without problem but if they all eat more than they dream things will be more problematic. 

If you have time and want to see how the philosophers behave, you could use this little gui. Start a gui process for each philosopher and let i send messages to it depending on its state. To work you need toe have the wx module working - it should if you have the Erlang Solutions version of the Erlang system.

When you have done the assignment you should take a look at the following assignment that will explain what is going on in some more detail. Do solve the philosophers assignment first and then read this text, you learn more if you first do it wrong, and then realize that it is wrong, rather then doing it right from the beginning by following a given trail.