CSE Roadmap

Specialist tier · about 2 hours · 5 parts

Part 5 of 5 · 4 min read

Exercises

Easy

Easy 1: Define a partial failure (15 minutes)

State what makes a partial failure different from a crash on a single machine.

Done when: a failure affecting only some parts of a distributed system while the rest continue running normally, impossible on a single machine, is correctly described.

Hint

A partial failure affects only some parts of a distributed system while the rest keep running normally; a single-machine crash typically takes everything down together.

Easy 2: State what a timeout actually proves (15 minutes)

State whether a timeout is proof that a remote node has failed.

Done when: no is correctly stated, with a timeout correctly described as an arbitrary cutoff for giving up on a response, not proof of an actual failure.

Hint

No, a timeout is an arbitrary cutoff for giving up on a response, not proof that the remote node has actually failed.

Easy 3: Define clock drift (15 minutes)

State what clock drift is.

Done when: independent machine clocks gradually falling out of sync with each other over time is correctly described.

Hint

Independent machine clocks gradually falling out of sync with each other over time.

Medium

Medium 1: Diagnose an ambiguous timeout (25 minutes)

A node sends a request and receives no response within its timeout. List the distinct possible causes it cannot distinguish between.

Done when: at least two of the following are correctly listed: the original request was lost, the response was lost on the way back, or the receiving node is simply slow.

Hint

The original request was lost, the response was lost on the way back, or the receiving node is simply slow to respond.

Medium 2: Explain why a single machine avoids partial failure (25 minutes)

Explain why a single machine running one program does not experience partial failures the way a distributed system does.

Done when: the explanation correctly notes that a crash on a single machine typically takes the entire machine, and everything running on it, down together, rather than affecting only some parts while others keep running.

Hint

A crash on a single machine typically takes the whole machine, and everything on it, down together, rather than affecting only some parts while others keep running.

Medium 3: Identify a risk of trusting cross-machine timestamps (30 minutes)

Explain what could go wrong if a system used raw timestamps from two different machines' clocks to decide which of two writes happened first.

Done when: the explanation correctly notes that clock drift could make the machine that actually wrote second appear to have written first, since one clock could be running ahead of the other's true time.

Hint

Clock drift could make the machine that actually wrote second appear, from its timestamp alone, to have written first.

Hard

Hard 1: Connect partial failure to the need for failure detection (30 minutes)

Explain why a distributed system needs an explicit mechanism for detecting whether a node has failed, when a single-machine program generally does not need one.

Done when: the explanation correctly connects the possibility of partial failure, where some nodes can fail while others run normally, to the need for an explicit mechanism to determine which nodes are currently reachable and functioning, a question that simply does not arise within one machine.

Hint

Since any node could fail while others keep running, the system needs an explicit mechanism to determine which nodes are currently reachable and functioning, a question a single machine never has to ask.

Hard 2: Explain why message duplication is a distinct problem from message loss (35 minutes)

Explain why a distributed system must handle message duplication as a separate concern from message loss, rather than treating "arrived" and "didn't arrive" as the only two possibilities.

Done when: the explanation correctly notes that a message, or its retry, can be delivered more than once, for example if a sender retries after a lost confirmation that the original actually did arrive, so a receiving system must also be able to detect and ignore a duplicate, not just detect absence.

Hint

A retried message, sent again after a lost confirmation that the original had actually arrived, can result in the message being delivered more than once, so a receiving system must detect and ignore duplicates, not just detect absence.

Hard 3: Propose a safer alternative to raw clock timestamps for ordering (40 minutes)

Given clock drift's risk to cross-machine event ordering, propose an alternative approach a distributed system could use to determine the true order of two events across machines, and explain why it avoids the clock-drift problem.

Done when: a reasonable alternative is proposed, such as a logical clock or sequence number assigned by a coordinating mechanism rather than read from each machine's physical clock, with the explanation correctly noting that such a mechanism establishes order through coordination or message-passing rather than relying on independently drifting physical clocks to agree.

Hint

A logical clock or a coordinator-assigned sequence number establishes order through coordination or message-passing, rather than relying on independently drifting physical clocks on separate machines to agree with each other.