A comprehensive collection of laboratory experiments for Distributed Computing, covering clock synchronization, election algorithms, mutual exclusion, deadlock detection, and middleware protocols.
How to Use · Learning Path · Experiment 1 · Experiment 2 · Experiment 3 · Experiment 4 · Experiment 5 · Experiment 6 · Experiment 7 · Experiment 8 · Experiment 9 · Experiment 10
Note
Environment Configuration: This repository focuses on distributed architectures. Experiments utilize Python's socket module for low-level communication and Pyro4 for Remote Method Invocation (RMI), alongside multithreaded Java implementations for coordination protocols.
Tip
Distributed Debugging: When debugging multi-process systems (like the Bully Algorithm or Token Ring), use centralized logging or timestamped console outputs to trace the sequence of events across nodes. Logical clocks are your best tool for ordering events in the absence of a global clock.
Warning
Port Conflicts: Ensure that ports used in the RMI and Socket experiments (default: 1234 or Pyro4 default) are not occupied by other system services. If a "Connection Refused" error occurs, verify that the server script is initialized and listening before running the client.
- Navigate to the specific experiment folder (e.g.,
Experiment-7). - Execute the script using the appropriate runtime:
- For Python:
python Chat_Server.py(Run server first, then client in a new terminal). - For Java:
javac Token_Ring.java && java Token_Ring.
- For Python:
- Analyze the console output to observe distributed protocol messages and state changes.
Required Tools:
- Python 3.x: Standard library for sockets;
pip install Pyro4for middleware tasks. - Java JDK 8+: For multithreaded coordination implementations.
- Terminal Multiplexer: Recommended to run multiple nodes (processes) simultaneously for realistic simulation.
Foundational concepts of process interaction and remote execution.
- Experiment-1: Compare Network vs Distributed Operating Systems.
- Experiment-2: Implement a multi-user Chat application using low-level Sockets.
- Experiment-3: Develop a remote Calculator service using RMI and RPC concepts.
Managing state and consensus in a distributed environment without global memory.
- Experiment-4: Synchronize events using Lamport's Logical Clocks.
- Experiment-5: Implement the Bully Algorithm for dynamic leader election.
- Experiment-6: Ensure Mutual Exclusion using the circular Token Ring protocol.
Handling complex scenarios like deadlocks, load distribution, and name services.
- Experiment-7: Detect distributed deadlocks using the Chandy-Misra-Haas edge-chasing algorithm.
- Experiment-8: Implement Static and Dynamic Load Balancing models.
- Experiment-9: Review Distributed File System architectures (NFS, AFS, GFS).
- Experiment-10: Implement Name Resolution and sophisticated RPC services.
To Compare Network operating system and Distributed operating system.
Date: January 13, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Group Communication as a Chat application using socket programming.
Date: January 20, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Chat_Server.py | Multi-client chat server | View |
| 2 | Chat_Client.py | Interactive chat client | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement any application using RMI/RPC.
Date: January 27, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | RMI_Server.py | Calculator service server | View |
| 2 | RMI_Client.py | Calculator service client | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Lamport Logical clock Algorithm.
Date: February 03, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Lamport_Clock_Synchronization.py | Lamport's Logical Clock | View |
| 2 | Lamport_Mutual_Exclusion.py | Alternative Clock implementation | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement a Bully Algorithm.
Date: February 10, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Bully_Algorithm.java | Election protocol simulation | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Token Ring Mutual Exclusion Algorithm.
Date: February 18, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Token_Ring.java | Circular token passing engine | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Chandi-Misra-Haas distributed deadlock detection algorithm.
Date: February 25, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Chandy_Misra_Haas.java | Unified CMH Simulation (Java) | View |
| 2 | Chandy_Misra_Haas_Deadlock.java | CMH (Deadlock - Java) | View |
| 3 | Chandy_Misra_Haas_No_Deadlock.java | CMH (No Deadlock - Java) | View |
| 4 | Chandy_Misra_Haas.py | Unified CMH Simulation (Python) | View |
| 5 | Chandy_Misra_Haas_Deadlock.py | CMH (Deadlock - Python) | View |
| 6 | Chandy_Misra_Haas_No_Deadlock.py | CMH (No Deadlock - Python) | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Load Balancing algorithm.
Date: March 11, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Load_Balancing.java | Static load distribution (Java) | View |
| 2 | Load_Balancing.py | Dynamic load balancer (Python) | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
To Discuss different types of a file system (NFS, AFS, Google Case Study).
Date: March 18, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| — | Lab Report (PDF) | Detailed experiment report | View |
To Implement Name Resolution.
Date: March 31, 2022
| # | Program | Description | Source Code |
|---|---|---|---|
| 1 | Rpc_Server.py | Name Resolution Server | View |
| 2 | Rpc_Client.py | Name Resolution Client | View |
| 3 | Name_Resolution.ipynb | Jupyter Notebook version | View |
| 4 | test.txt | Dataset/Resource for resolution | View |
| — | Lab Report (PDF) | Detailed experiment report | View |
How to Use · Learning Path · Experiment 1 · Experiment 2 · Experiment 3 · Experiment 4 · Experiment 5 · Experiment 6 · Experiment 7 · Experiment 8 · Experiment 9 · Experiment 10
CSL802 · Semester VIII · Computer Engineering
University of Mumbai · Curated by Amey Thakur