parallele-programmierung/u06-3
Luca Conte 636efbe8b3 add assignment readmes 2025-05-07 21:06:08 +02:00
..
Philosopher.java rename directories 2025-04-23 23:10:17 +02:00
PhilosophersTest.java rename directories 2025-04-23 23:10:17 +02:00
README.md add assignment readmes 2025-05-07 21:06:08 +02:00
Table.java rename directories 2025-04-23 23:10:17 +02:00

README.md

Problem 6.3: Dining philosophers with globally uniform acquisition order

As mentioned in the lecture, one possible strategy to avoid a deadlock is to acquire all resources in the same, globally uniform order, so that it cannot happen that e.g. thread A first acquires resource 1 and then resource 2, while thread B acquires the same resouces in a different order (first 2 and then 1).

Implement a deadlock-free solution to the "dining philosophers" problem from the lecture using this strategy by defining a globally uniform acquisition order for the fork semaphores; an additional semaphore as in the lecture will no longer be necessary then.