Questions: State Machine Replication

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Two clients simultaneously send 'SET x=1' and 'SET x=2' to a replicated key-value store using state machine replication. What must happen to ensure all replicas end in the same state?

ABoth commands must be rejected — concurrent writes are not allowed in SMR
BEach replica independently processes whichever command arrives first, since they will eventually converge
CConsensus must assign a single ordering to the two commands (e.g., slot 5: SET x=1, slot 6: SET x=2), and all replicas execute them in that order
DThe system picks the command from the client with the lower ID and discards the other
Question 2 Multiple Choice

A replica in an SMR system was offline for several hours due to a hardware failure. It has now recovered. How does it return to a consistent state with the other replicas?

AIt cannot recover — any replica that misses commands is permanently inconsistent and must be replaced
BIt requests the current state from a majority of replicas and takes the most recent snapshot
CIt replays the shared command log from its last executed slot, re-executing each command in order until it catches up
DIt waits for the next client request, which will trigger a full state synchronization
Question 3 True / False

In state machine replication, each replica independently executes client requests and consensus is primarily invoked when replicas disagree about the result.

TTrue
FFalse
Question 4 True / False

A non-deterministic state machine — one that uses the current wall-clock time or a random number generator as part of its operation — cannot be replicated correctly using standard state machine replication.

TTrue
FFalse
Question 5 Short Answer

Why must the state machine be deterministic for state machine replication to guarantee that all replicas remain consistent?

Think about your answer, then reveal below.