Title: Time
1Time
- Maya Haridasan
- April 15th
2Whats wrong with the clocks?
3Why is synchronization so complicated?
- Due to variations of transmission delays each
process cannot have an instantaneous global view
of every remote clock value - Presence of drifting rates
- Hardest support faulty elements
4External Clock Synchronization
- Synchronize clocks with respect to an external
time reference usually useful in loosely coupled
networks or real-time systems (Ex, NTP)
5Internal Clock Synchronization
- Synchronize clocks among themselves
- Enables a process to measure the duration of
distributed activities that start on one
processor and terminate on another one. - Establishes an order between distributed events
in a manner that closely approximates their real
time precedence.
6Software Clock Synchronization
- Deterministic ? assumes an upper bound on
transmission delays guarantees some precision - Statistical ? expectation and standard deviation
of the delay distributions are known - Probabilistic ? no assumptions about delay
distributions
Realistic?
Reliable?
Any guarantees?
7Correct clock - Definition
A correct clock Hp satisfies the bounded drift
condition
(1 ?)(t s) Hp(t) Hp(s) (1 ?)(t s)
Perfect hardware clock Hp(t) Hp(s) (t s)
Clock values
Real time
8Failure modes
- Crash Failure
- processor behaves correctly and then stops
executing forever - Performance Failure
- processor reacts too slowly to a trigger event
- Arbitrary Failure (a.k.a Byzantine)
- processor executes uncontrolled computation
9The clock synchronization problem
- Property 1 (Agreement) Lpi(t) Lpj(t) ? d,
- (d is the precision of the clock synchronization
algorithm) - Property 2 (Accuracy)
- (1 ?v)(t s) a Lp(t) Lp(s) (1
?v)(t s) b
10Optimal accuracy
- Drift rate of the synchronized clocks is bounded
by the maximum drift rate of correct harware
clocks
?v ?
(1 ?)(t s) a Lp(t) Lp(s) (1
?)(t s) b
11Paper 1 Optimal Clock Synchronization
- Claims
- Accuracy need not be sacrificed in order to
achieve synchronization - Its the first synchronization algorithm where
logical clocks have the same accuracy as the
underlying physical clocks - Unified solution to all models of failure
12Authenticated Algorithm
kth resynchronization - Waiting for time kP
Ready to synchronize
P logical time between resynchronizations
13Authenticated Algorithm
Ready to synchronize
P logical time between resynchronizations
14Authenticated Algorithm
Ready to synchronize
P logical time between resynchronizations
15Authenticated Algorithm
Kp ?
Synchronize!
P logical time between resynchronizations
16Achieving Optimal Accuracy
Uncertainty of tdelay introduces a difference in
the logical time between resynchronizations ?
Reason for non-optimal accuracy
- Solution
- Slow down the logical clocks by a factor of
P (P - ? - ?)
where ? tdel / 2(1 ?)
17Authenticated Messages
- Correctness
- If at least f 1 correct processes broadcast
messages by time t, then every correct process
accepts the message by time t tdel - Unforgeability
- If no correct process broadcasts a message by
time t, then no correct process accepts the
message by t or earlier - Relay
- If a correct process accepts the message at time
t, then every correct process does so by time t
tdel
18Nonauthenticated Algorithm
- Replace signed communication with a broadcast
primitive - Primitive relays messages automatically
- Cost of O(n2) messages per resynchronization
- New limit on number of faulty processes allowed
- n gt 3f
19Broadcast Primitive
20Initialization and Integration
- Same algorithms can be used to achieve initial
synchronization and integrate new processes into
the network - A process independently starts clock Co
- On accepting a message at real time t, it sets
- C0 a
- Passive scheme for integration of new processes
21Paper 2 Why try another approach?
- Traditional deterministic fault-tolerant clock
synchronization algorithms - Assume bounded communication delays
- Require the transmission of at least N2 messages
each time N clocks are synchronized - Bursty exchange of messages within a narrow
re-synchronization real-time interval
22Probabilistic ICS
Claims
- Proposes family of fault-tolerant internal clock
synchronization (ICS) protocols - Probabilistic reading achieves higher precisions
than deterministic reading - Doesnt assume unbounded communication delays
- Use of convergence function ?optimal accuracy
23Their approach
- Only requires to send a number of unreliable
broadcast messages - Staggers the message traffic in time
- Uses a new transitive remote clock reading method
Number of messages in the best case N 1 (N
time server processes)
24Probabilistic Clock Reading
q
T1
m1
m2
T0
T2
p
25Probabilistic Clock Reading
q
T1
m1
m2
T0
T2
p
Is error ? ? Yes Success No? Try reading
again (Limit D)
26Staggering Messages
slot
cycle
p slots per cycle k cycles per round
27Transitive Remote Clock Reading
- Can reduce the number of messages per round to N
1
tp
tq
real time
T
p
T
q
Cq (T,p)
r
Cr (T,p)
Cr (T,q)
Cannot be used when arbitrary failures can occur!
28Round Message Exchange Protocol
29Outline of Algorithms
- Round clock Cpk of process p for round k
- Cpk(t) Hp(t) Apk
Void synchronizer() ReadClocks(..) A
A cfn(rank(), Clocks, Errors) T T P
30Convergence Functions
- Let I(t) L, R be the interval spanned by at t
by correct clocks. If all processes would set
their virtual clocks at the same time t to the
midpoint of I(t), then all correct clocks would
be exactly synchronized at that point in time.
Unfortunately, this is not a perfect world!
31Convergence Functions
- Each correct process makes an approximation Ip
which is guaranteed to be included in a bounded
extension of the interval of correct clocks I - I?k(t) minCsk (t) - ?, maxCsk (t) ?
- Deviation of clocks is bounded by ?, so length of
I?k(t) is bounded by ? 2? -
32Failure classes
33Conclusions Which one is better?
- First Paper (deterministic algorithm)
- Simple algorithm
- Unified solution for different types of failures
- Achieves optimal accuracy
- Assumes bounded comunication
- O(n2) messages
- Bursty communication
34Conclusions Which one is better?
- Second Paper (probabilistic algorithm)
- Takes advantage of the current working
conditions, by invoking successive round-trip
exchanges, to reach a tight precision) - Precision is not guaranteed
- Achieves optimal accuracy
- O(n) messages
If both algorithms achieve optimal accuracy,
Then why is there still work being done?