This contains the implementations of Filter Lock
, Tournament Tree
, Shared Filter Lock
and Lamport's Bakery
mutual exclusion algorithms for n threads.
This code works by generating an executable jar file of the project.
It uses maven for managing the build and packages and hence is a requirement for compiling and running the application smoothly.
cd
into the project's root directory- Execute the
launcher.sh
script to run the project for the algorithm of your choice
bash launcher.sh <project_path> <number of runs each> <algorithm Id> <number of threads>
To run all the experiments execute the run_exp.sh
script as following
bash run_exp.sh <project_path> <number of runs each> <algorithm Id>
Example:
bash launcher.sh "/Users/chaitanyabasava/IdeaProjects/n-thread-mutual-exclusion" 50 4 10
Algorithm number:
- Filter Lock
- Shared memory Filter Lock
- Tournament Tree
- Lamport's Bakery