Time and global states Flashcards

1
Q

Why is time problematic in distributed systems?

A

♦ Each computer has its own physical clock

♦ Clocks typically deviate; cannot synchronise them perfectly, only approximately

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

Why is time an important practical issue distributed systems?

A

♦ computers worldwide need to timestamp e-commerce transactions consistently
♦ Ordering of events Global state in absence of global time
♦ Need to know what state process A is when process B is in a certain state

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

What is a computer’s physical clock?

A

♦ Clock is an electronic device that counts oscillations occurring in a crystal at a definite frequency
♦ Typically divide this count and store the result in a counter register
♦ Clock can be programmed to generate interrupts at regular intervals

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

What is Skew?

A

The instantaneous difference between the readings of any two clocks is their skew

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

What is clock drift?

A

♦ Crystal-based clocks are subject to clock drift – i.e. they oscillate at slightly different frequencies i.e. count time at different rates and hence diverge
♦ Even the same clock will vary with temperature

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

Why doesn’t it matter how accurately clocks may have been initialised?

A

Difference in oscillation period between two clocks may be extremely small, but when accumulated over many oscillations leads to an observable difference in the counters registered by two clocks

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

What is a clocks drift rate?

A

A clock’s drift rate is the difference in reading between the clock and a nominal perfect reference clock per unit of time measured by the reference clock

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

What is Cristian’s method for synchronising clocks

A

Cristian’s algorithm works between a process P, and a time server S — connected to a source of UTC (Coordinated Universal Time).

  1. P requests the time from S
  2. After receiving the request from P, S prepares a response and appends the time T from its own clock.
  3. P then sets its time to be T + RTT/2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does Cristian’s method for synchronising clocks assume?

A

The method assumes that the RTT is split equally between request and response

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

Suggest how Cristian’s method could be more accurate.

A

Further accuracy can be gained by making multiple requests to S and using the response with the shortest RTT.

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