Distributed Systems mini project 1 - Mutual exclusion in distributed systems Implementation of Ricart–Agrawala algorithm
Full Description of the task is here
./
├── .gitignore ----------------------------------- list of files im git commits
├── README.md ------------------------------------ this documentation
├── LICENSE -------------------------------------- To be Added
├── constants.py --------------------------------- Default values and string literals
├── critical_section.py -------------------------- Implementation of Critical Section
├── process.py ----------------------------------- Thread based simulation of Process
├── process_service.py --------------------------- Decoupled-server service to spawn process thread tied to ConnectionService
├── connection_service.py ------------------------ Decoupled-client service to communicate with handler task and ProcessService
├── ra_program_server.py ------------------------- Entry point ListenerService to Spawn Threads and observe RA algorithm
├── ra_program_client.py ------------------------- Client input point to send method calls to ListenerService
└── requirements.txt ----------------------------- pip requirements file
- rpyc (Really! That's it ;)
- Install the requirement (just the one) from requirements.txt
- Open two command line interfaces.
- Run the server. Optionally, pass
--verbose
flag to see algorithm's message hand-off logs.
python ra_program_server.py
- Run the client. Here,
N
denotes number of processes to be initialized.
python ra_program_client.py N
- List: List processes and their current state.
$ list
- time-p: Update upper bound for timeout of processes.
t
represents timeout in seconds.
$ time-p t
- time-cs: Update upper bound for timeout of Critical Section.
t
represents timeout in seconds.
$ time-cs
- exit: Terminate all threads, connections and release all acquired ports and exit program.
$ exit
- More Testing.
- Observe effect of asynchronous callbacks over synchronous.
- Documentation.