Distributed Systems ETH 2020

Distributed Systems Lecture ETH 2020

Distributed Systems Lecture ETH 2020


L. G.
This flashcard set covers advanced concepts in distributed systems at the university level, focusing on topics like PBFT protocols, Byzantine fault tolerance, and blockchain technologies. It delves into nodes, transactions, quorums, and system operations, exploring strategies for consistency and execution. Ideal for students and professionals in electrical engineering, this flashcard set provides a comprehensive understanding of distributed systems, helping them grasp complex mechanisms and practical applications in modern computing.
Flashcards
129
Students
2
Language
English
Level
University
Created / Updated
15.01.2021 / 20.01.2024

Flashcards

How can we make the randomized consensus constant time?

Use a shared coin instead of choosing v_i completely randomly.

Define byzantine.

A node which can have arbitrary behaviour (also malicious) is called byzantine.

Define 4 different kinds of validity.

  1. any-input validity: decision value must be the input of any node
  2. correct-input validity: decision value must the the input of a correct node
  3. all-same validity: if all correct nodes start with the same input v, the decision value must be v
  4. median validity: if the input values are orderable byzantine outliers can be prevented by agreeing on a value close to the median of the correct input values

What is the max. number of byzantine nodes such that byzantine agreement can be reached?

f < n/3

What does the King Algorithm look like?

There is at least one phase with a correct king and after such a phase the correct nodes will not change their value anymore.

How many rounds does a synchronous algorithm solving consensus in the presenece of f crashing nodes need if nodes decide for the minimum seen value?

f+1

What does the algorithm for asynchronous byzantine agreement look like?

Ben-Or for f < n/10
worst case running time: exponential in number of nodes n
If on line 12 a random oracle call is used instead only a constant number of rounds is expected

Define the blackboard model for shared coins.

The blackboard is a trusted authority which supports two operations: write message, read all written values.

What does the crash-resilient shared coin with blackboard look like?

uses an optimal n^2 coin flips

cannot tolerate a single byzantine

Define best-effort and reliable broadcast.

  • best effort broadcast: ensures that a message that is sent from a correct node to another will eventually be received and accepted
  • reliable broadcast: ensures that the nodes eventually agree on all accepted messages

What does Fifo reliable broadcast look like?

FIFO reliable broadcast defines an order in which the messages are accepted in the system.

Tolerates f<n/3 byz, f<n/2 crashes

Define threshold secret sharing.

Let t,n ∈ N with 1 ≤ t ≤ n. An algorithm that distributes a secret among n participants such that t participants need to collaborate to recover the secret is called a (t, n)-threshold secret sharing scheme.

How does the synchronous byzantine shared coin with hashes look like?

1: Each node has a public key that is known to all nodes.
2: Let r be the current round of Algorithm 17.21
3: Broadcast msg(r)u, i.e., round number r signed by node u
4: Compute hv = hash(msg(r)v) for all received messages msg(r)v 5: Let hmin = minv hv
6: return least significant bit of hmin

Define execution.

An execution E is a set of operations on one or multiple objects executed by a set of nodes.

Define sequential execution.

An execution restricted to a single node is a sequential execution. All operations are executed sequentially.

Define semantic equivalence.

Two executions are semantically equivalent if they contain exactly the same operations and each pair of corresponding operations has the same effect in both executions

Define linearizability. And explain when it applies.

An execution E is called linearizable if there is a sequence of operations S such that

  • S is correct and semantically equivalent to E
  • whenever f<g for two operations then also f<g in S

E is linearizable iff there exist linearization points (some point f_ in f) such that the sequential execution S that results in ordering the operations according to those is semantically equivalent to E.

Define sequential consistency.

E is called sequentially consistent if there is a sequence of operations S such that

  • S is correct and semantically equivalent to E
  • whenever f<g for two operations on the same node in E then also f<g in S

Define quiescent consistency.

E is called quiescently consistent if there is a sequence of operations S such that 

  • S is correct and semantically equivalent to E
  • let t be some quiescent point, for every t and every pair of operations g<t and h>t we also have g<h in S

Explain how quiescent consistency, sequential consistency and linarizability are related.

linearizability --> sequential and quiescent consistency

nothing else

Define linearizable system.

A system is called linearizable if it ensures that every possible execution is linearizable. (same for the consistencies)

Define composable.
Give composable example.

A consistency model is called composable if it holds:
If for every object o the restricted execution E|o (only operations involving o) is consistent then also E is consistent.

Linearizability is composable.
Sequential consistency is not composable.

Define happened-before-consistency.

An execution E is called happened-before consistent if there is a sequence of operations S such that:

  • S is correct and semantically equivalent to E
  • whenever f -> g for two operations also f < g in S

This is equal to sequential consistency.

Define (strong) logical clock.

A logical clock is a family of functions c_u that map every operation on node u to some logical time c_u(f) such that the happened before relation -> is respected:

g -> h --> c_u(g) < c_u(h)

strong logical clock: <-->

What does a Lamport clock look like?

Lamport clocks are logical clocks.

What does a vector clock look like?

With define c_u < c_v iff so for all entries -> vector clocks are strong logical clocks.

Define consistent snapshot.

A cut C (prefix of distributed execution) is a consistent snapshot if for every operation g in C with f -> g C also contains f

What is the measure of concurrency?

The concurrency measure of an execution E = (S_1, ..., S_n) is defined as the ratio:

\(m(e) = { \mu - \mu_s \over \mu_c - \mu_s}\)

With \(\mu\) being the number of consistent snapshots of E.

Define span.

A span s is a named and timed operation representing a contiguous sequence of operations on one node. A span has a start and finish time. (= Tasks)

A span may causally depend on other spans -> ChildOf: parent depends on result of child / FollowsFrom: just invokes child.

A trace is the graph representing the hierarchy of spans.

What does a token-based mutual exclusion algorithm look like?

What does a distributed mutual exclusion algorithm (without tokens) look like?

No SoF, however one node crashes -> requestion node waits forever.

Define clock error and its parts.

Clock error / skew is the difference between two clocks 

\(t = (1 + \delta)t^* + \zeta(t^*)\)

Drift \(\delta\) is the predictable clock error.
Jitter \(\zeta\) is the unpredictablle random noise of the clock error

What is PTP?

The precision time protocol is a clock synchronization protocol similar to NTP but uses medium access control layer timestamps. (Removes unknown delay from passing through software stack.)

What is a system clock?

The system clock in a computer is an oscillator used to synchronize all components on the motherboard.

Must have low jitter.

What is the GPS?

The global positioning system satellites continuously transmit their position and time code.
The satellites use a unique pseudo-random noise (PRN) sequence for their signal transmissions.

What is GPS acquisition?

Acquisition is the process in a GPS receiver that finds the visible satellite signals and detects the delays of the PRN sequences and the Doppler shifts of the signals.

What is an A-GPS?

An assisted GPS receiver fetches the satellite orbit parameters and other navigation data from the internet. -> reduces data transmission time (TTFF).

What is collective detection?

Collective detection (CD) is a maximum likelihood snapshot receiver localization method, which does not de- termine an arrival time for each satellite, but rather combine all the available information and take a decision only at the end of the computation.

Define local and global clock skew.

In a network of nodes the local clock skew is the skew between neighboring nodes while the global clock skew is the maximum skew between any two nodes. It is \(\Omega(D)\) where D is the diameter of the network.

Define (minimal, majority) quorum.

V set of nodes, a quorum is a subset of these nodes. A quorum system is a set of quorums such that every two quorums intersect.

It's called minimal if no quorum is a subset of another.

In a majority quorum system every quorum has \(\lfloor {n \over 2} \rfloor + 1\) nodes, its asymptotic failure probability is 0.

Study