The mission of this repository is to implement and understand the Mutex and Ricart–Agrawala algorithms.
This is an exercise of the Distributed systems subject in computer engineering taught in La Salle University:
You need to design and implement a distributed application. This application must have two heavyweight processes:
ProcessA | ProcessB |
---|---|
Must invoke 3 lightweight processes: ProcessLWA1 ProcessLWA2 ProcessLWA3. |
Must invoke 2 processes: ProcessLWB1 ProcessLWB2. |
Each lightweight process must live in a loop infinity that will consist of displaying its identifier on the screen for 10 times while waiting 1 second at a time and time.
Both heavyweight processes will run on the same machine, so all lightweight processes will compete by the same share: the screen. A policy will need to be implemented between the two heavyweight processes token-based mutual exclusion. Among the processes invoked by ProcessA, a Mutex policy will have to be implemented for mutual exclusion. Among the processes invoked by ProcessB, a Ricart and Agrawala policy will have to be implemented for mutual exclusion.
Visual representation of the exercise:
This project was built together with my great collegue and friend @JCarri14