Distributed Systems ETH 2020

Distributed Systems Lecture ETH 2020

Distributed Systems Lecture ETH 2020


Set of flashcards Details

Flashcards 129
Language English
Category Electrical Engineering
Level University
Created / Updated 15.01.2021 / 20.01.2024
Weblink
https://card2brain.ch/box/20210115_distributed_systems_eth_2020
Embed
<iframe src="https://card2brain.ch/box/20210115_distributed_systems_eth_2020/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>

What is a ticket and what properties does it have?

A ticket is a weaker form of a lock with the following properties:

  1. reissuable: server can issue more tickets even if previous ones not yet returned
  2. expiration: server only accepts most recently issued ticket

What does the Paxos Protocol look like?

a message propose(t,c) is chosen if it is stored by a majority of servers

 

if a command c is executed by some servers, all servers eventually execute c

Define consensus and name its properties.

There are n nodes of which at most f might crash (n-f correct). Node i starts with an input value v_i. The nodes must decide for one of those values satisfying the following properties:

  1. agreement: all correct nodes decide for the same value
  2. termination: all correct nodes terminate in finite time
  3. validity: the decision must be an input value of a node

Define configuration and critical configuration.

  • We say that a system is fully defined (at any point during the execution) by its configuration C. The configuration includes the state of every node, and all messages that are in transit (sent but not yet received).
  • C is critical if C is bivalent but all configurations that are direct children of C are univalent

Define univalent and bivalent.

  • A configuration C is univalent if the decision value is determined independently of what happens afterwards (only one decision is possible). (univalent for value v -> v-valent)
    Nodes need not be aware of this!
  • C is bivalent if the nodes might decide for 0 or 1
     

Define configuration tree.

The configuration tree is a directed tree of configurations. Its root is C0 (fully characterised by the input values), The edges are transitions (characterised by event (u,m), node u receiving message m), every configuration has all applicable transitions as outgoing edges.

Is there a deterministic algorithm which always achieves consensus in the asynchronous model with f>0?

No.

If a system is in a bivalent configuration it must reach a critical configuration within finite time or it does not always solve consensus.

If a config tree contains a critical configuration crashing a single node can create a bivalent leaf

--> NO

What does the randomized Consensus Protocol look like?

It achieves binary consensus with expected runtime O(2^n) if up to f < n/2 nodes crash.

(there is no consensus algorithm for the asynchronous model that tolerates f >= n/2 failures)

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