Assignment title: C Programming


Question Programming in C Q To create an executable le called dpsim use the following command: g++ -lpthread -o dpsim dpsim.cpp DiningRoom.cpp To run your code with 5 philosophers that try to eat 10 times, type:

./dpsim 5 10 If it is working correctly it should display a table showing the current state of each philosopher each time any philosopher's state changes.

A correct implementation should satisfy the safety and liveness conditions described above (remember the rst and last philosophers are neighbors too.)