Fault Tolerant Clock Synchronization - PowerPoint PPT Presentation

1 / 72
About This Presentation
Title:

Fault Tolerant Clock Synchronization

Description:

Both Byzantine Generals solutions can be modified for clock synchronization. ... All processors have a clock time and a drift rate. All processors must ... – PowerPoint PPT presentation

Number of Views:254
Avg rating:3.0/5.0
Slides: 73
Provided by: Cwa65
Category:

less

Transcript and Presenter's Notes

Title: Fault Tolerant Clock Synchronization


1
Fault Tolerant Clock Synchronization
  • Three Algorithms
  • by Lamport et. al.
  • presented by
  • Charles Ward and Nathan Wiegand

2
The Problem
  • Synchronize clocks despite clock drift,
    arbitrary processor behaviour.

3
Two Faced Clocks
4
Mission Impossible
  • Cannot achieve synchronization with 1/3 or more
    processors faulty without digital signatures.

Alice
Bob
1005
5
NaĂŻve Approach
  • The Interactive Convergence Algorithm (CNV)
  • Each process reads the value of every process
    clock and sets its own clock to the average of
    these values except that if it reads a clock
    value differing from its own by more than d, then
    it replaces that value by its own clocks value
    when forming the average.

6
d 10, n 4, f 1
7
d 10, n 4, f 1
1013.75
1006.25
8
d 10, n 3, f 1
9
d 10, n 3, f 1
10
Byzantium and Her Generals
  • n armies are camped outside the gates of an enemy
    city.
  • Each army is commanded by a general.
  • Some generals are traitors.
  • Conditions
  • All loyal generals will agree to retreat or
    attack.
  • A small number of traitors cannot cause the loyal
    generals to adopt a bad plan.

11
Byzantium Redux
  • Reformulate the problem as a single general and
    lieutenants.
  • New conditions
  • All loyal lieutenants decide upon the same course
    of action.
  • If the commanding general is loyal then every
    loyal lieutenant obeys the order he sends.

12
Oral Messages Model
  • Every sent message is correctly delivered.
  • The receiver of a message knows who sent it.
  • The absence of a message can be detected.

13
A Solution Using Oral Messages
  • The OM(m) algorithm solves the Byzantine General
    problems for 3m1 loyal generals in the presence
    of m traitors.
  • OM(0)
  • General sends his value to every lieutenant.
  • Each lieutenant uses the value from the general
    or retreat if he received no value.

14
Continued
  • OM(m) (mgt0)
  • General sends his value to every lieutenant.
  • For each lieutenant i, Let vi be the value
    lieutenant i received from his general.
  • Lieutenant i executes OM(m-1) with itself as the
    general using the value vi
  • In executing OM(m-1) Lieutenant i receives some
    number of values (v1,vn-1) and chooses the
    majority to use.

15
Example (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
Zdrajca
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
16
Example (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
Zdrajca
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
17
Example (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
Zdrajca
R,A,A
Attack! ?
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
A,R,A
18
Example 2 (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
Zdrajca
19
Example 2 (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
Zdrajca
20
Example 2 (OM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
R,R,A
R,R,A
Retreat. ?
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
Zdrajca
R,R,A
21
Signed Message Model
  • A loyal generals signature cannot be forged, and
    any alteration of the contents of his signed
    messages can be detected.
  • Anyone can verify the authenticity of a generals
    signature.

22
Signed Message Algorithm SM(m)
  • The SM(m) algorithm solves the Byzantine General
    problems in the presence of m traitors.
  • SM(m)
  • The general signs and sends his value to all
    lieutenants.
  • Upon receipt of a message with value v, a
    lieutenant i
  • Adds the value v to a list Vi
  • If the message has fewer than m1 signatures
    (including that of the general) sign and send to
    all lieutenants who have not signed.
  • After no more messages will be received, take the
    majority of values in Vi as the decision.

23
Example (SM(1))
Lt. Wladyslaw Anders
Zdrajca
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
A
24
Example (SM(1))
Lt. Wladyslaw Anders
Zdrajca
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
A
25
Example (SM(1))
Lt. Wladyslaw Anders
Zdrajca
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
A
26
Example (SM(1))
Lt. Wladyslaw Anders
Zdrajca
Attack! ?
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
A
27
Example (SM(1))
Lt. Wladyslaw Anders
R
Gen. Edward Smigly-rydz
Zdrajca
Lt. Bohdan Wronsky
A
28
Example (SM(1))
Lt. Wladyslaw Anders
R,A
R
Gen. Edward Smigly-rydz
Zdrajca
Lt. Bohdan Wronsky
A
29
Example (SM(1))
Lt. Wladyslaw Anders
R,A
Gen. Edward Smigly-rydz
Zdrajca
Lt. Bohdan Wronsky
A,R
A
30
Example (SM(1))
Lt. Wladyslaw Anders
R,A
Gen. Edward Smigly-rydz
Zdrajca
Lt. Bohdan Wronsky
A,R
31
Example (SM(1))
Lt. Wladyslaw Anders
R,A
Gen. Edward Smigly-rydz
Zdrajca
Lt. Bohdan Wronsky
A,R
32
OM and SM gt COM and CSM
  • Both Byzantine Generals solutions can be modified
    for clock synchronization.
  • Roughly speaking, COM(m) and CSM(m) are
    accomplished by applying, respectively, OM(m) and
    SM(m) n times.

33
COM(m)
  • Each processor performs OM(m) acting as the
    general, passing clocks as messages.
  • Each time a processor receives a clock
    corresponding to the execution of processor is
    algorithm it saves the clock in a list Vi.
  • After all message passing is complete, processor
    j takes the median value of the list Vi as the
    clock value of processor i.
  • It then sets it clock to the median of all these
    clock values.

34
Example (COM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
35
Example (COM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
36
Example (COM(1))
Lt. Zubmach
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
37
CSM(m)
  • Each processor performs SM(m) acting as the
    general, passing signed clocks as messages.
  • Signed clocks cannot be forged or molested except
    that they can be prevented from ticking (set back
    in time).
  • Each time a processor receives a clock
    corresponding to the execution of processor is
    algorithm it saves the clock in a list Vi.
  • After all message passing is complete, processor
    j takes the maximum value of the list Vi as the
    clock value of processor i.
  • It then sets it clock to the median of all these
    clock values.

38
Example (CSM(1))
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
39
Example (CSM(1))
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
40
Example (CSM(1))
Lt. Wladyslaw Anders
wadliwy
Gen. Edward Smigly-rydz
Lt. Bohdan Wronsky
41
The Simulator
  • Supports fully connected network topology.
  • Allows arbitrary number of processors.
  • All messages and computation events (including
    clock ticks) for all processors are atomic and
    must be scheduled through the simulation event
    queue.
  • No order guarantee over links.
  • Messages carry arbitrary payloads.

42
Processor Class
  • All processors, faulty and correct, inherit from
    a processor class.
  • All processors have a clock time and a drift
    rate.
  • All processors must implement processEvent()
  • This limited subset of common behavior allows for
    flexibility in implementation.

43
Faulty Processors
  • Four types
  • Omission Fault never sends any messages.
  • Bad Clock Fault performs normally but that its
    clock exceeds the admissible bounded rate of
    drift.
  • Random Deviation Fault provides a value which
    deviates from its true clock value by a bounded
    random amount.
  • Random Value Fault provides a random value

44
CNV 7 Procs, No Faults
45
CNV 1 Omission Fault
46
CNV 2 Omission Faults
47
CNV 3 Omission Faults
48
CNV 1 Bad Clock Fault
49
CNV 2 Bad Clock Faults
50
CNV 3 Bad Clock Faults
51
CNV 1 Random Dev. Fault
52
CNV 2 Random Dev. Faults
53
CNV 3 Random Dev. Faults
54
CNV 1 Random Faults
55
CNV 2 Random Faults
56
CNV 3 Random Faults
57
COM 7 Procs, No Faults
58
COM 1 Omission Fault
59
COM 2 Omission Faults
60
COM 3 Omission Faults
61
COM 1 Bad Clock Fault
62
COM 2 Bad Clock Faults
63
COM 3 Bad Clock Faults
64
COM 1 Random Dev. Fault
65
CSM 7 Procs, No Faults
66
CSM 1 Omission Fault
67
CSM 2 Omission Faults
68
CSM 3 Omission Faults
69
CSM 1 Bad Clock Fault
70
CSM 2 Bad Clock Faults
71
CSM 3 Bad Clock Faults
72
CSM 1 Random Dev. Fault
Write a Comment
User Comments (0)
About PowerShow.com