I'm not sure if you're asking me a theoretical question re: if there should be a deadlock. The exercise says there should be one:
My thoughts however would be that a deadlock could arise in case...
Type: Posts; User: nik1996
I'm not sure if you're asking me a theoretical question re: if there should be a deadlock. The exercise says there should be one:
My thoughts however would be that a deadlock could arise in case...
Here's the main method (I've put it in the OP now as well):
public class DiningPhilosophers {
public static void main(String[] args) {
int size = 5; //number of philosophers...
Hello! I really need help with an exercise.
The exercise goes like this: Implement a version where a philosopher waits if a chopstick is already used by another philosopher. (You can use...