5 - Sync and Clocks Flashcards
Temporal Ordering
Exact time not needed but order is important
UTC
Universal Coordinated Time
International Atomic TIme (TAI) is based on
electron transition frequency of calcium 133
UTC = TAI - ????
leap seconds
Precision
Keep deviation within specified bound
Accuracy
Keep deviation from actual time within specified bound
Internal Sync
Sync clocks to improve precision but not neccessarily accuracy
Berkeley Algorithm
Time server sends time to all,
difference is returned,
average is calculated,
average - each computers difference is sent back to each computer
Negative Time adjustments are bad. Why?
Timestamps are not monotonically increasing and events on the same computer can have smaller timestamps than earlier events
Lamport Clock
Each process maintains and adjusts local counter.
Weak consistency
Lamport Clock: Event is within Pi
Ci is incremented by 1.
Lamport Clock: Message is sent by Pi
timestamp ts(m)=Ci is attached.
Lamport Clock: Message is sent by Pj
local counter Cj is set to max{Cj,ts(m)}; then Ci +1 before passing m to app
Weak Consistency Guarantee
a -> b => ts(a) < ts(b)
if a happened before b, always smaller timestamp but if a timestamp is smaller, not necessarily before b
Strong Consistency Guarantee
a->b <=> ts(a) < ts(b)
Vector Clock consistency
Strong
GNSS
Global Navigation Satellite Systems
GPS etc
GPS: What makes it work?
32 satellites with atomic clocks constantly send position and time.
Determine distance to several and compute intersection
GPS: Computing distance
Multiply signal speed and transmission time
Transmission time = reception time - sending time
Positioning: How many spheres/circles in 2D/3D?
3 circles in 2D
4 spheres in 3D
Clock Deviation Problem
Internal Delay
Clocks not synced
RBS: Definition
Internal sync in wireless networks where components are directly reachable
RBS
Reference Broadcast Sync
Showing that vector clocks fulfil strong consistency
Assume relation < from lecture. Consider ALL cases:
- Weak consistency follows from process clock increasing with every event and that the timestamp of reception is larger than sending. < is transitive.
- If B -> A then ts(B)<ts(A) and thus ts(A) /< ts(B). INCOMPLETE
Where could vector clocks be useful?
Concurrent Events and dependencies between events.
Eg a faulty computation A, then B needs to be repaired too, but if A /-> B then B doesn’t need repair
Total order multicast
Requires that messages be delivered in the same order as they would be if comms were instant.