Implementation of Ricart-Agrawala distributed mutual exclusion algorithm
This project is completed as a part of Advanced Operating Systems course. Project contains two phases.
In first phase, all processes wait for 5-10 time units, and enter critical section. In second phase, even numbered processes wait for 45-50 tim units before entering critical section.
All process start and terminate by sending message to PZERO.
All configurations for the algorithm can be found in resources/config.properties
.
System requirements:
- Java (JDK/JRE 1.8)
- Apache Ant Runtime
- GSON
Steps to build:
- Place the GSON binary in mutex/lib directory
- Execute the following ant commands:
ant clean
ant
This will create an executable in mutex/build directory
- Add IP address of PZERO to
processzero.host
in resources/config.properties file - Execute run.sh for starting process.
To start PZERO:
./run.sh 0
To start a process:
./run.sh