LU4 Time and Global State Flashcards

(92 cards)

1
Q

What are the four sections covered on the lecture slides?

A

Foundation

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

What does the “Foundation” section include?

A

Characterization of Distributed System

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

What does the “Middleware” section include?

A

Distributed Object

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

What does the “Support Systems” section include?

A

Operating Systems

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

What does the “Algorithms & Shared Data” section include?

A

Coordination Agreement

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

Why is time an important issue in distributed systems?

A

To measure the happening of a certain event accurately (for example, e-commerce transactions).

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

How do timestamps help in distributed systems?

A

To serialize transactions and maintain data consistency (establishing order of events).

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

How do distributed systems handle the absence of a global clock?

A

By coordinating actions through message passing (programs coordinate their actions by exchanging messages).”

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

What are the two types of clocks in distributed systems?

A

Physical clocks (count seconds elapsed) and Logical clocks (count events).

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

Why is a simple oscillator not sufficient as a clock in a distributed system?

A

Digital electronics are not the accurate enough for time stamp use in distributed systems

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

What is clock drift?

A

The rate at which a clock deviates from an ideal clock (quartz clocks are susceptible to drift).

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

What unit is clock drift typically measured in?

A

Parts per million (ppm).

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

What is an atomic clock?

A

A very accurate type of clock based on atomic resonances (Caesium-133 is often used).

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

Describe the usage of GPS for time synchronization.

A

GPS satellites broadcast current time and location; receivers calculate position based on signal delay.

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

What is UTC?

A

Coordinated Universal Time (compromise between GMT and TAI, accounting for the Earth’s rotation).

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

Why is Greenwich Mean Time (GMT) not sufficient for accurate timekeeping?

A

It’s based on solar time, which varies due to irregularities in the Earth’s rotation.

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

What is TAI?

A

International Atomic Time (based on the resonant frequency of Caesium-133).

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

Why isn’t TAI used directly as a universal time standard?

A

It doesn’t account for the slowing and variation of the Earth’s rotation (Earth’s rotation is not constant).

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

What are leap seconds

A

and why are they necessary?

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

When are leap seconds typically added?

A

June 30th and December 31st at 23:59:59 UTC.

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

What are three ways one can be affected by leap seconds?

A

The clock immediately jumps forward, moves to 00:00:00 after one second, or the clock moves to 23:59:60

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

What are the common methods that are used to represent timestamps in distributed systems?

A

Unix time (seconds since epoch) and ISO 8601 (human-readable format).

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

How is leap second traditionally handled in software systems?

A

They are often ignored due to the complexity they introduce.

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

How does the ‘smear’ approach deal with leap seconds?

A

It spreads the extra second over a longer period, avoiding sudden jumps.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is clock skew?
The difference between two clocks at a particular point in time.
26
How do you fix Clock Skew?
By periodically getting the current time from a accurate server (atomic clock or GPS receiver)
27
What are the common protocols used for clock synchronization?
NTP (Network Time Protocol) and PTP (Precision Time Protocol).
28
What is external synchronization?
Synchronizing clocks to a common standard (e.g., UTC).
29
What is internal synchronization?
Synchronizing clocks with each other to a known degree of accuracy (clocks agree within a bound).
30
In a synchronous system
what is the source of timing error?
31
What does the Ttrans represent?
Transmission delay
32
Is accuracy important in internal synchronization?
No
33
What is a limitation of Cristian's method?
Single point of failure
34
What is the recommendation in a case of a failing Cristian's Method?
To Multicast request to more servers
35
What is the function of the Berkeley Algorithm?
Master computer periodically polls slave computers and takes a fault-tolerant average, adjusting the clocks accordingly.
36
Why is fault-tolerant average used?
To eliminate readings from faulty clocks (which would skew a regular average).
37
What problem does the Network Time Protocol (NTP) address?
Distributing time information over the Internet
38
Does NTP provide a service to external Intranets?
No
39
What is stratum in NTP?
Indicates hierarchy (layer) of clock servers (Stratum 0 is atomic clock, higher stratum is syncing with the lower).
40
Why does NTP employs statistics in its procedures?
Filters and discriminates between the quality of timing data from different servers
41
In NTP
how do clients compensate with the rate of drift?
42
What are three possible modes NTP can be in?
Multicast mode
43
Which model does NTP operate most accurately?
Symmetric mode
44
In the Estimating time over a network model
what is the difference between T' and T?
45
What is the solution given if |Θ| >= 1
000s?
46
What is the purpose of Monotonic Clocks?
Measure elapsed time
47
Monotonic Clocks are not subject to X
what is X?
48
Give 3 reasons to why Monotonic Clocks are ideal for measuring time on a single node.
Always moves forwards at near-constant rate, measures elapsed time, can use System.nanoTime()
49
Which are two Time-of-day-clocks?
System.currentTimeMillis() and clock_gettime(CLOCK_REALTIME)
50
Which part of physics does Causality come from?
Relativity
51
True or False: When a || b
we know that a cannot have caused b.
52
True or False: Happens-before relation encodes potential causality.
True
53
What must be true for < to be a casual order?
(a → b) ⇒ (a < b)
54
How are you able to tell whether (a -> b) and or a || b?
Vector Clock
55
What does e stand for when trying to define a Vector Timestamp of an event?
event
56
Why is the vector clock needed?
To identify what events are concurrent (events that are not casually related).
57
What is the purpose of Logical Clocks
which is a common alternative to physical clocks?
58
What must be used to use the Lamport Clock?
software counter
59
After applying the Lamport clock
it still might not imply that the sequence is correct
60
How does Lamport’s logical clock work?
Each process increments a counter for local events and updates it based on received messages (monotonically increasing).
61
What is the vector time stamp of an event?
V(a) =
62
Why does each process keep its own logical clock?
To timestamp its events and track the order of events locally.
63
Why are vector clocks needed when comparing timestamps of events?
Because vector clocks helps find if they're not causally related (to determine concurrency).
64
In Lamport Clocks
what does it mean to have (a -> b)
65
If the pair of (L(e)
N(e)) identify a uniquely event e. Which two do L and N represent?
66
Does Lamport Clocks's guarantee events can guarantee the the e can causally proceeded e'?
no
67
What is the recommendation when dealing with Lamport's clocks when you don't know to solve this problem?
using Vector Clocks
68
Can you guarantee that if a -> b then L(a) < L(b) in Lamport clock?
Yes
69
True or False: The main goal for Logical Clocks is that each process observes them in the same order.
False, the physical order in which each process observers the events.
70
Describe "FIFO broadcast"
If process A sends message m1 before message m2 to process B, then B must receive m1 before m2
71
Describe "Causal Broadcast"
If send(m1) -> send(m2) then deliver(m1) -> deliver(m2)
72
Describe "Total order broadcast"
If process A delivers message m before message n, then all processes must deliver message m before message n
73
What is the hierarchy of the four Broadcast formats?
Best-effort Broadcast, Reliable Broadcast, FIFO Broadcast, Causal Broadcast and then Total order broadcast
74
In FIFO broadcast
If messages are sent by the same node must it be in delivery order?
75
In FIFO broadcast
If messages are sent by different nodes must it be in delivery order?
76
In a total order broadcast
must all nodes follow the same delivery order?
77
What are the two Layers that Broadcast algorithms can be broken down into?
best-effort and reliable
78
With Reliable broadcast algorithm
what is used on First attempt?
79
In Reliable broadcast algorithm
when directly sending
80
What is the term for idea the first time that that node may receive
a message that will re-broadcast
81
In summary
what are two methods used to reach reliability in Broadcasts?
82
What is 'Gossip Protocols' used for?
large number of nodes
83
How many nodes are forwarded with Gossip protocols?
3
84
What does a "cut" represent?
A moment in a distributed system.
85
What does the set of last events from all process called?
Frontier of the cut
86
When is a cut considered to be "Inconsistent" in a process?
The process has received one message, but not sent any messages, there is an effect but not cause
87
When is the "Global state predicate" set as "True"?
when is object stable and it's either deadlocked, terminated or garbage
88
True or False: Channels must be in a process where Snapshot Algorithm will not be utilized.
False
89
True or False: Processes must continue working on a process where Snapshot Algorithm will not be utilized.
False
90
Does Chandy and Lamport's 'snapshot' algorithm give method gathering to a global state?
no
91
What is the advantage of Monotonic Clocks?
Always moves forward, good for measuring times in a single node.
92
What should a client monitor to ensure its clock is in sync?
Clock skew (the difference from an authoritative time source).