Professional Documents
Culture Documents
Ritesh 11
Ritesh 11
Ritesh 11
The counter is decremented at each oscillation Counter interrupts(clock tick) when it reaches zero
Clock skew(offset): the difference between the times on two different clocks Clock drift : the difference between a clock and actual time
GPS
The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense that provides location and time information GPS satellites circle the earth twice a day in a very precise orbit and transmit signal information to earth. GPS receivers take this information and use triangulation to calculate the user's exact location. Essentially, the GPS receiver compares the time a signal was transmitted by a satellite with the time it was received. The time difference tells the GPS receiver how far away the satellite is. Now, with distance measurements from a few more satellites, the receiver can determine the user's position and display it on the unit's electronic map.
The relation between clock time and UTC when clocks tick at different rates.
Cristian's Algorithm
synchronization with a time server
Periodically (T < d/2r s) synchronization request to time server
Time must never run backward gradual changes Non zero message propagation time (estimate value = (T1-T0-I) /2 )
a) b) c)
The time daemon asks all the other machines for their clock value discrepancies The machines answer The time daemon tells everyone how to adjust their clock to the average no Universal Coordinated Time available
Logical Clocks
In this section we will discuss Lamport's algorithm , which synchronizes logical clocks. Also, we discuss an extension to Lamport's approach, called vector timestamps.
Correctness Conditions
Happened Before Relation (a b)
What we need is a way of measuring time then for every event, a we can assign it a time value C(a) 1. If a and b are events in the same process, and a occurs before b, then a b is true , C(a) < C(b) 2 If a is the event of a message being sent by one process, and b is the event of the message being received by another process, then a b is true ,C(a) < C(b)
Vector Clocks
If a is the event of a message being sent by one process, and b is the event of the message being received by another process, then a b is true ,C(a) < C(b) However, with Lamport clocks, nothing can be said about the relationship be-tween two events a and b by merely comparing their time values C(a) and C(b),respectively. In other words, if C(a) < C(b), then this does not necessarily imply that a indeed happened before b. Something more is needed for that.
The problem is that Lamport clocks do not capture causality. Causality can be captured by means of vector clocks.