Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Department of Computer Engineering

Academic Term : January - May 2024

Class: B.E. (Computer) Semester VIII


Division: A Subject Name: Distributed Systems CSC 801

Experiment No 6
Roll No 9225

Name of Student Sankalp Rane

Aim: To implement Mutual Exclusion/Clock synchronization algorithms.

Code:

Lamport’s Algorithm
Output:
Conclusion:

In conclusion, the implementation of Mutual Exclusion/Clock synchronization algorithms has been a


significant endeavor in ensuring proper coordination and control in concurrent systems. Through this
project, we have explored various algorithms such as Peterson's Algorithm, Lamport's Logical Clocks,
and others, understanding their principles, advantages, and limitations. By implementing these
algorithms in code, we have gained practical insights into their functioning and performance
characteristics. These algorithms play a crucial role in ensuring the integrity and efficiency of shared
resources in multi-process or distributed systems. While each algorithm has its strengths and
weaknesses, the choice of which to implement depends on factors such as system requirements,
scalability, and fault tolerance. Overall, this project has provided valuable hands-on experience in
designing and implementing synchronization mechanisms vital for the robust operation of concurrent
systems.
Post Lab Assignment:

1. Difference between logical & physical clock synchronisation.

2. What is UTC?

UTC stands for Coordinated Universal Time. In distributed computing, UTC serves as a global time standard
used to synchronize clocks across various systems and locations worldwide. It provides a consistent time
reference that is independent of any specific time zone or location, making it ideal for coordinating actions and
events in distributed systems.
UTC is based on International Atomic Time (TAI) with leap seconds added at irregular intervals to synchronize
with the Earth's rotational time. It's commonly used in distributed computing environments for various purposes,
including logging events, scheduling tasks, and ensuring consistency across distributed databases. In
distributed computing, systems often synchronize their local clocks with UTC to ensure that timestamps are
consistent and comparable across different components. This synchronization helps maintain consistency and
accuracy in distributed systems, even when they are geographically dispersed.
3. What are the advantages & disadvantages of centralization (server)?

Advantages:

Control: Centralization allows for better control and management of resources, data, and access permissions.
This centralized control can enhance security by enforcing consistent policies and monitoring activities more
effectively.

Resource Utilization: Centralizing resources such as computing power, storage, and network bandwidth can lead
to more efficient utilization. It enables optimization and better allocation of resources based on demand,
potentially reducing costs and improving performance.

Simplified Management: Managing and maintaining a single centralized server or a small cluster of servers is
often simpler and more straightforward than dealing with a distributed architecture. It streamlines administration
tasks such as updates, backups, and troubleshooting.

Data Integrity: Centralization can help ensure data integrity by consolidating data storage and reducing the risk
of inconsistencies that may arise in distributed environments. It facilitates centralized backups and disaster
recovery strategies.

Disadvantages:

Single Point of Failure: A centralized server represents a single point of failure. If the server experiences
downtime or malfunctions, it can disrupt the entire system or service, leading to widespread outages and loss of
productivity.

Scalability Challenges: Centralized architectures may face scalability challenges as the system grows. Scaling
up a centralized server infrastructure often involves significant investment in hardware upgrades or migration to
more powerful servers, which can be complex and costly.

Network Dependency: Centralized systems rely heavily on network connectivity. Any network issues or latency
can impact the performance and accessibility of services hosted on the central server. Moreover, centralized
architectures may face challenges in distributed or remote locations with limited connectivity.

Potential Bottlenecks: In heavily centralized systems, the central server can become a bottleneck, especially
under high loads or when handling large volumes of data. This can lead to degraded performance and
responsiveness for users and applications.

Security Risks: While centralization can enhance security through better control and monitoring, it also
introduces security risks. A successful breach or unauthorized access to the central server can have
far-reaching consequences, potentially exposing sensitive data or compromising the entire system.

You might also like