11.Time & Clocks Flashcards

1
Q

What is “clock drift”?

A

The DIFFICULTY of maintaining synchronization once achieved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Christian’s Clock Synchronization?

A

“Time server”
-Client set their own time = reply + rtt/2
(assume time-out = time-back)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Berkeley algorithm for calculating time?

A
  • Master processor
  • polls slaves
  • average results +own time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do the slaves receive after Berkeley calculation?

A

it’s own delta (+/-)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens if master in Berkeley algorithm fails?

A

Distributed election algorithm to elect replacement from slaves

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of networks are Cristian’s and Berkeley algorithm used in ?

A

Intranet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the protocol used for calculating time in a larger scale internet?

A

Network Time Protocol (NTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What two types of servers are the in a network with NTP?

A
  • Primary (UTC clock)

- Secondary(Synchronized with primary)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Ways to synchronise server in NTP network?

A
  • Multicast mode
  • Procedure call mode
  • Symmetric mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What method of synchronization is used on high-speed LAN, how does it work?

A

Multicast

  • Server broadcasts time to all secondaries at once
  • Each clock resets (+small delay)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does the procedure call mode for synchronization work?

A
  • Christians Algorithm

- server replies with time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When is procedure call synchronzation used?

A
  • when multicast unsupported

- for higher accuracy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What synchronization mode do we use when the highest accuracy is required?

A

Symmetric mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does symmetric mode for synchronization work?

A
  • Messages exchanged
  • data built up
  • improve sync over time
  • each message contains timing info about the previous message received
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What can we calculate with the timing info in symmetric mode sync messages?

A

OFFSET (between 2 clocks)->
oi -di /2 <=o<=oi+di/2
where di: transmission time of two messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do NTP servers measure the reliability of the other server?

A

Identify lowest d value my filtering successive (o,d) values

17
Q

How can every event in a single processor be uniquely ordered in time?

A

using the local clock

18
Q

Why not use local clock to order events in distributed system?

A

synchronisation is not sufficiently good

19
Q

What are some simple principles for deducing the order of events?

A

-Two events happen in the same process? The occur in the order given by the process
-If message is sent from one process to another?
Sending before receiving

20
Q

What is a logical clock?

A

a monotonically increasing software counter

21
Q

Where is a logical clock L?

A

Within a process

22
Q

What is a logical clock L used for?

A

timestamping events

23
Q

How is the logical clock L used?

A
  • L++ before event
  • each message contains current L (t)
  • Each message received set : = max(L,t)+1
24
Q

What can we deduce about the logical clocks L(e1),L(e2) if e1 happens before e2? (Lamport’s clock)

25
Can we deduce the ordering of events from their timestamps? (Lamport's clock)
nope
26
What is a vector clock in a system with n processes?
an array of n integers
27
Where does a vector clock exist?
Each process has it's own
28
What are the initial values in a vector clock?
all zeroes
29
What happens when an event occurs in process i (Vector clocks)?
V[i]= V[i]+1
30
How do the other processes know an event has occurred in a different process?
- they shall receive message from the process - message contains their vector clock - merge it with processes vector clock
31
What do Vector clocks capture that Lamport's do not?
causality
32
What can we deduce about the vector clocks V(e1),V(e2) if e1 happens before e2? (Vector clock)
V(e1)
33
Can we deduce the ordering of events from their timestamps? (Vector clock)
YA
34
What is an advantage of vector clocks?
We don't end up with arbitrary, unnecessary orders
35
What is the cost of vector clocks?
extra amount of data in a timestamp