Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
.
1.Start.
2.Initialise the thread variable
s as required.
3.Create the threads representin
g philosophers.
4.Wait until the threads finishe
s execution.
5.Stop.
.
1.Start.
2.Wait for the left fork/spoon.
3.Wait for the right fork/spoon.
4.Start eating.
5 Release the left fork/spoon.
6.Release the right fork/spoon.
7.Stop.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Program
The algorithm for the philosopher is as
problem.