Vector Clocks Flashcards

1
Q

What is a Vector Clock?

A

A vector clock for a system of N processes is an array of N integers

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

How does a Vector clock work?

A

Each process keeps its own vector clock Vi, which it uses to timestamp local events.

Processes then attach vector timestamps on the messages they send to one another

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

State the Rule for updating vector clocks: VC1

A

VC1: Initially, Vi[j] = 0 for i, j = 1, 2, …, N

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

State the Rule for updating vector clocks: VC2

A

VC2: Just before pi

timestamps an event, its sets Vi[i] = Vi[i] + 1

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

State the Rule for updating vector clocks: VC3

A

VC3: pi includes the value t = Vi in every message it sends

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

State the Rule for updating vector clocks: VC4

A

VC4: When pi receives a timestamp in a message,it sets Vi[j] = max(Vi[j], t[j]) for j = 1, 2, …, N

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

What is Vi[i]

A

Vi[i] is the number of events that pi has timestamped

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

What is Vi[j]

A

Vi[j] for j ≠ i is the number of events that have occurred at pj that potentially have affected pi

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

How can vector timestamps be compared?

A

♦ V = V’  V[j] = V’[j] for j = 1, 2, …, N
♦ V ≤ V’  V[j] ≤ V’[j] for j = 1, 2, …, N
♦ V < V’  V ≤ V’ and V ≠ V’

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

Give an advantage of Vector clocks

A

Allows causal ordering for all events in the system

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

Give a disadvantage of Vector clocks

A

storage and message overhead proportional to N, the number of processes

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