Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.28 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.28 KB

mutex

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.

How to build

System requirements:

  • Java (JDK/JRE 1.8)
  • Apache Ant Runtime
  • GSON

Steps to build:

  1. Place the GSON binary in mutex/lib directory
  2. Execute the following ant commands:
       ant clean
       ant

This will create an executable in mutex/build directory

How to execute

  1. Add IP address of PZERO to processzero.host in resources/config.properties file
  2. Execute run.sh for starting process.
       To start PZERO:
       ./run.sh 0
       To start a process:
       ./run.sh