UTC is used as a reference time clock for the nodes in the system. The clock synchronization can be achieved by 2 ways: External and Internal Clock Synchronization. External clock synchronization is the one in which an external reference clock is present.
It is used as a reference and the nodes in the system can set and adjust their time accordingly. Internal clock synchronization is the one in which each node shares its time with other nodes and all the nodes set and adjust their times accordingly. There are 2 types of clock synchronization algorithms: Centralized and Distributed. Centralized is the one in which a time server is used as a reference.
The single time server propagates its time to the nodes and all the nodes adjust the time accordingly. It is dependent on single time server so if that node fails, the whole system will lose synchronization. Distributed is the one in which there is no centralized time server present. Instead the nodes adjust their time by using their local time and then, taking the average of the differences of time with other nodes.
Distributed algorithms overcome the issue of centralized algorithms like the scalability and single point failure. Next Logical Clock in Distributed System. Establish connection with client. Respond the client with server clock time. Close the connection with the client process. Trigger the Clock Server. Python3 program imitating a client process. Next Berkeley's Algorithm. Recommended Articles.
Article Contributed By :. Harshit Saini. Easy Normal Medium Hard Expert. Writing code in comment? This node is the main node in the network which acts as a master and rest of the nodes act as slaves. Diagram below illustrates how the master sends request to slave nodes. Diagram below illustrates how slave nodes send back time given by their system clock.
Psuedocode for above step:. Skip to content. Change Language. Related Articles. Table of Contents. Improve Article. Save Article.
0コメント