parallele-programmierung/u05-3
Luca Conte 636efbe8b3 add assignment readmes 2025-05-07 21:06:08 +02:00
..
DiningPhilosophersWithForkAccessSema.java u05-3 2025-04-16 05:00:52 +02:00
README.md add assignment readmes 2025-05-07 21:06:08 +02:00
Semaphore.java why am I doing this at 5am? 2025-04-16 05:22:54 +02:00

README.md

Problem 5.3: Implement a semaphore in Java

Implement a Java class Semaphor with methods p() and v() as decribed in the lecture. Your class should work for any number of threads using the same semaphore concurrently. Test your class using the class DiningPhilosophersWithForkAccessSema (on the server in the source code folder for chapter 4) by replacing all uses of java.util.concurrent.Semaphore by uses of your own Semaphor class the program's behavior should still be correct (though not identical, since the output of the program is not determinate).