Difference between physical clock and logical clock and vector clock
Answers
Physical clock
It is a physical process and also a method of measuring that process to record the passage of time. For example, the rotation of the Earth measured in solar days. Most of the physical clocks are based on cyclic processes such as a celestial rotation.
Logical clock
It is a mechanism for capturing causal and chronological relationships in a distributed system. A physically synchronous global clock may not be present in a distributed system. In such systems a logical clock allows global ordering on events from different processes.
Vector clock
It is an algorithm for generating a partial ordering of events in a distributed system. It detects causality violations. Like the Lamport timestamps interprocess messages contain the state of the sending process's logical clock.
A physical clock is a physical procedure combined with a strategy for measuring that procedure to record the progression of time. For example, the revolution of the Earth measured in sunlight based days is a physical clock.
A logical clock is a component for catching sequential and causal connections in a dispersed framework. Some imperative logical clock calculations are Lamport timestamps, which are monotonically expanding programming counters.