• Keine Ergebnisse gefunden

The Timed Message Passing model (TMP)

N/A
N/A
Protected

Academic year: 2021

Aktie "The Timed Message Passing model (TMP)"

Copied!
27
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

The Timed Message Passing model (TMP)

- Each network node has a local hardware clock H -

- There is a bound d on end-to-end message transmission and processing time

- We defined logical clocks and skew

- Uncertainties: hardware clock drift, and

message transmission time

(2)

2

Computer Time

H, L

UTC time, t

Perfect time

(3)

3

Computer Time, H

UTC time, t

Perfect time

Hardware clock envelope

skew

(4)

4

Computer Time, H

UTC time, t

Perfect time

Our Model

(drift faster than real time)

skew

(5)

5

Computer Time, H

External reference time, t (linear bound to UTC) Perfect time

Alternative view skew

Accumulated Skew ≤ �(� -1)

(6)

6

Computer Time, L

External reference time, t

Minimal

linear bound on Logical clock rate Logical clock

Synchronization algorithm Intend to maintain

a bounded Skew

It can slow down logical clocks

(even slower than minimal H)

(7)

MAX algorithm – APOLOGY

L a (t 4 ) – L b (t 4 ) ?

RECALL: the difference between the values of the hardware clocks of v and w may increase by �(� -1)

t 4 t 2 t 3

t 1

a b c

L c L b

L a

d d

�d L b (t 4 ) = L b (t 2 ) + L= L a (t 1 ) + L L a (t 4 ) = L a (t 1 ) + L’+ � d

L a (t 4 ) - L b (t 4 ) ≤ T (� -1) + � d T

L

L a (t 4 ) - L b (t 4 ) ≤ L’- L+ � d L a L b

L’

(8)

MAX algorithm – maximum clock dif

L a (t 4 ) – L b (t 4 ) ? t 4 t 2 t 3

t 1 L a

a b c

L c L b

L a

d d

L b

�d L b (t 4 ) = L b (t 2 ) + L= L a (t 1 ) + L L a (t 4 ) = L a (t 1 ) + L’ + � d

L a (t 4 ) - L b (t 4 ) ≤ T (� -1) + � d L’

L

L a (t 4 ) - L b (t 4 ) ≤ L’ - L+ � d

L a (t 4 ) - L x (t 4 ) ≤ T (� -1) + � dD

T

(9)

MAX algorithm – maximum clock dif

t 4 t 2 t 3

t 1 L a

a b c

L c L b

L a

d d

L b

�d L’

L

L a (t 4 ) - L x (t 4 ) ≤ (T+dD) (� -1) + dD T

L a (t 4 ) - L x (t 4 ) ≤ T (� -1) + � dD

(10)

MAX algorithm – First Synchronization

L a (t 4 ) – L b (t 4 ) ? t 4 t 0

t 3 t 0

L a L b

d

L a (t 0 ) - L b (t 0 ) = H

L a (t 4 ) - L b (t 4 ) ≤ (T+d) (� -1) + H

T L

L a (t 4 ) - L x (t 4 ) ≤ (T+dD) (� -1) + H

increase by �(� -1)

(11)

The Timed Message Passing model (TMP)

- Each network node has a local hardware clock H -

- There is a bound d on end-to-end message transmission and processing time

- We defined logical clocks and skew

- Uncertainties: hardware clock drift, and

message transmission time

(12)

The Timed Message Passing model (TMP)

- Each network node has a local hardware clock H -

- There is a bound d on end-to-end message transmission and processing time

- We defined logical clocks and skew

- Uncertainties: hardware clock drift, and message transmission time

- Is there an algorithm than can obtain a

constant skew or O(d) skew?

(13)

13

w v

t

1

t

3

t

2

If t 3 -t 1 =2d we can synchronize the logical clocks L w =L v (t 2 )+d.

If t 3 -t 1 =d we face a problem

(14)

14

w v

t

1

t

3

t

2

If t 3 -t 1 =d we face the basic uncertainty.

d

t

2

t

2

(15)

15

w v

t

1

t

3

If t 3 -t 1 =dD we face the basic uncertainty.

dD

(16)

The basic uncertainty – given no drift hardware clocks

16

w

v 7

7

8

8

9

9

10

10

11

11

w

v 7

7

8

8

9

9

10

10

11

11

w

v 7

7

8

8

9

9

10

10

11

11

All events take place

at the same clock time

in all 3 scenarios

(17)

A State Machine in TSM

Inputs / messages

messages outputs

state

The sequence of messages and outputs depends solely on 1. the initial state and initial input

2. the sequence of messages and inputs it receives 3. hardware clock readings

H

(18)

18

Computer Time, L

External reference time, t

Lowest rate of progress

c �

(19)

Lower bound proof

Assume existence of a logical clock algorithm that satisfies the amortized minimum progress.

In the presentation we assume that the uncertainty is d

(in the text it is u ≤ d)

(20)

20

w v

t

1

t 1 +x

Timely behavior: drift=0, message transmission=d/2 Scenario 0. H=0, and timely behavior

D

H v =x

(21)

Lower bound proof – 1st step

By playing with drifts and message delays we start from all H=0 and

introduce a sequence of intermediate scenarios that

step by step, after some time x, reach a point where one of the nodes have hardware clock value of

H v =x+D(d - ), �

without any node noticing the difference among any two consecutive steps.

All other clocks equal x.

(22)

View after time x.

22

w v w

v H

v

=x+D(d/2- ) �

w v

Scenario v

Scenario w Scenario 0

H

w

=x H

v

=x

H

w

=x H

v

=x

H

w

=x+D(d/2- ) �

(23)

Lower bound proof – 2nd step

We have no idea how the synchronization algorithm adjusts the logical clocks in these scenarios.

• We claim that in any synchronization algorithm, at some time after time x, the sum of

the increase in logical clock value of w in scenario v, and

the increase in logical clock value of v in scenario w need to satisfy

� L v + L � w ≥ D(d - ) � 3�

• We assume to the contrary and introduce sequence of

steps with a slower rate ’≤ that eventually reach a � �

contradiction

(24)

24

Computer Time, L

External reference time, t

c �

Assuming L � v + L � w < D(d - ) � 3�

We obtain a contradiction to the

minimal assumption �

(25)

View after time x.

25

w

v H

v

=x+D(d/2 - ) �

w v

Scenario v

Scenario w

H

w

=x

H

v

=x

H

w

=x+D(d/2 - ) �

v and w can’t tell the difference – so their logical clocks are the same in both scenarios.

therefore L � v � L w actually represent the skew

in the appropriate scenarios

(26)

Lower bound proof – final step

We observe that L � v � L w actually represent the skew in the appropriate scenarios, therefore at least one of

them satisfy

� L > D(d - )/2 � 3�

Since we can choose arbitrarily small, we end up �

proving

(27)

Updated MAX algorithm

Assume – the logical clock L v is updated in the background at the rate of the hardware clock.

The algorithm is invoked upon these events::

wakeup, receiving a message, or on timeout 1. Wakeup: L v :=H v (performed only on wakeup)

2. If received l’ and l’ + d - u> L v L v :=l’ + d - u – update logical clock

3. If H v =kT then send <L v > to neighbors

(performed at the same clock time as line 2)

Notice: updating the logical clock is done by adding the

difference (l’ + d – u – L v) to L v – or resetting L v

Referenzen

ÄHNLICHE DOKUMENTE

Varmista ennen Message Broadcasting -laajennuksen asentamista, että EasyMP Monitor -sovellus (versio 4.50 tai uudempi) on asennettu ja että seuraavat vaatimukset täyttyvät..

Vous pouvez diffuser un fichier JPEG seul ou sélectionner un dossier contenant une série de fichiers JPEG que vous pourrez diffuser comme un diaporama..

Вы можете выбрать для рассылки один файл JPEG или папку, содержащую серию файлов JPEG, вручную..

K dispozícii máte možnosť vyslať jeden súbor vo formáte JPEG alebo vybrať priečinok obsahujúci sériu súborov vo formáte JPEG, ktoré chcete vyslať ako prezentáciu..

Sporočila lahko pošiljate ročno, lahko pa uporabite funkcijo časovnika v EasyMP Monitor in jih

Du kan sända meddelanden manuellt eller använda timerfunktionen i EasyMP Monitor om du vill sända meddelanden

■ Якщо користувач проектора або особа, що демонструє, натиснули кнопку Esc , щоб зупинити транслювання повідомлення, проектор не отримуватиме

It is included in the category of integrated assessment models (IAMs) that combine techno-economic and environmental variables to generate cost- optimal solutions, which minimise