I'm trying to implement the Dining Philosophers problem, using a virtual distributed system, in which a host creates a number of virtual sites and communication means between them (message passing).
Hence, every site created should be thought of a "philosopher", and each will try to pick the forks (if available).
I have already implemented the whole Virtual Distributed System, and communications means, I am able to create the sites. But I need a way to allow the created "philosophers" to execute a the same time, trying to pick the forks...i.e, I don't want it to happen in sequential way (loop iteration, one after the other), it needs to be like some kind of a race, the one who gets there first can pick up the fork...Do you know what i mean??
Anybody has any ideas??