This is an implementation of two token-based DMX algorithms in DistAlgo: Ricart-Agrawala's token-based algorithm and Suzuki-Kasami's token-based algorithm.
-
RAtoken.discontains Ricart-Agrawala's algorithm. For this algorithm, I followed the pseudocode which can be found in the top-level comment inRAtoken.dis. -
SKtoken.discontains Suzuki-Kasami's algorithm. For this algorithm, I followed a description of the algorithm by Mikhail Nesterenko of Kent State.
Both DistAlgo programs accept a single integer command-line argument specifying the number of processes to start. The default value for this for both is 5.
You can ignore lamport.dis, mutex2n.dis and main.dis.