DISTRIBUTED SYSTEM
CHAPTER 10 : CASE STUDY
LAB WORK SOLUTION- DISTRIBUTED SYSTEM
DISTRIBUTED SYSTEM -BCA -ALL SLIDES
MCQ- DISTRIBUTED SYSTEM

PHYSICAL CLOCK 

In a distributed system, a physical clock refers to a real-time clock mechanism that provides the current time based on the system's hardware or an external time source.Physical clocks refer to actual hardware clocks on each node. Despite their inherent differences and drift, they can be synchronized to some extent using protocols such as:

 

  • Network Time Protocol (NTP): NTP is widely used to synchronize the clocks of computers over a network. It uses a hierarchical system of time sources, with stratum levels indicating the distance from the reference clock.

    • Algorithm:
      1. Exchange timestamps between the client and the server.
      2. Calculate the round-trip delay and clock offset.
      3. Adjust the local clock based on the calculated offset.
  • Precision Time Protocol (PTP): PTP provides higher precision than NTP and is used in systems requiring sub-microsecond synchronization. It relies on hardware timestamping and a master-slave hierarchy.

    • Algorithm:
      1. Exchange timestamps between the master and slave devices.
      2. Calculate the delay and offset with high precision.
      3. Adjust the slave clock based on the calculated offset.

 

Clock Synchronization Algorithms: Algorithms such as Cristian's algorithm, Berkeley algorithm, and others are used to synchronize clocks across distributed nodes, compensating for clock drift and network delays.