@@ -13,4 +13,10 @@ The ways to achieve deadlock is:
2.1 The situation that lead me to dead lock is adding napping calls after each of the mutex locks! I also increased the napping time while eating. This created a deadlock where each philopsopher picked up a chopstick but did not begin to eat. Then if a philopsopher was actually allowed to start eating, the others had to wait so long for him to finish that there became a deadlock.
3.1
These solutions do not eliminate all potential causes of deadlock. When i run this code numerous times, I still see bouts of deadlock. I beleive this is due to the fact that the napping calls are frequent and the one when the eating happens is long. Therefore the philopshers are waiting so long to eat and therefore once the philopshers pick up a chopstick each, it runs in to deadlock.3.1
These solutions do not eliminate all potential causes of deadlock. When i run this code numerous times, I still see bouts of deadlock. I beleive this is due to the fact that the napping calls are frequent and the one when the eating happens is long. Therefore the philopshers are waiting so long to eat and therefore once the philopshers pick up a chopstick each, it runs in to deadlock.3.1
These solutions do not eliminate all potential causes of deadlock. When i run this code numerous times, I still see bouts of deadlock. I beleive this is due to the fact that the napping calls are frequent and the one when the eating happens is long. Therefore the philopshers are waiting so long to eat and therefore once the philopshers pick up a chopstick each, it runs in to deadlock.