cs-137 — The Backup Window
| Field | Value |
|---|---|
| id | cs-137 |
| difficulty | Advanced |
| topics | risk, trade-offs, strategy |
| lecture | lecture-26 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | lecture-26 (expected value) taken in the same session; lecture-01 (assumptions) |
| objective | compare two failure designs using expected cost and name the assumption that carries the conclusion |
| solution | held by the instructor; discussed after the attempt |
Problem
A lab server must back up 500 GB every night inside a one-hour window. Two designs are on the table; all failure probabilities are stated assumptions about this lab's hardware, not measurements:
- Plan A — one run: a single 50-minute job at 10 GB/min. Any night, the run fails with probability 1/10; a failed run wastes its full 50 minutes (one attempt per night — the window cannot fit two).
- Plan B — five chunks: five sequential 10-minute jobs of 100 GB each. Each chunk fails independently with probability 1/50; a failed chunk wastes only its own 10 minutes and restarts alone.
Your deliverables:
- For each plan: the probability of a clean night (no restarts).
- For each plan: the expected wasted minutes per night.
- Your recommendation with the one assumption whose truth the recommendation depends on most.
- One reliability trade-off that the expected-value comparison does not capture.
If the problem is ambiguous anywhere, state the assumption you are making and carry on — a stated assumption is part of a good answer.
Examples
- Input: the two plans with their failure probabilities and costs
- Output: plan A: clean night 0.900, expected waste 5.0 min — plan B: clean night 0.904, expected waste 1.0 min — plus recommendation
Solve for the worked instance first. Then ask what would change if one number, name, or condition were replaced by something stranger.
What to notice
- "Expected failed runs" and "expected wasted time" are different quantities — a 50-minute failure and a 10-minute failure do not weigh the same, so multiply probability by the cost of the outcome.
- Plan B's clean-night probability is close to Plan A's, but its waste per failure is five times smaller — the two metrics disagree, and the decision must say which it is buying.
- Independence is an assumption, not a fact: a dying disk makes chunk failures correlated, and the whole comparison rests on that.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "The lab's disk is aging: chunk failures are no longer independent (one failure makes the next twice as likely). Redo plan B's clean-night probability under a simple correlation story of your choice — stated explicitly — and say whether the recommendation survives."
Constraints and assumptions
- Difficulty: Advanced (expected-value reasoning with design stakes).
- Topics: risk, trade-offs, strategy.
- Restart costs are exactly the stated durations; bandwidth is constant.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for a first attempt; partial answers with clear reasoning are worth more than silent struggling.
- Optional stretch (not required): describe an alternative approach and say when it beats the obvious one.
Hints and extension
- First nudge: for plan A, what is the expected number of runs per night, and what fraction of runs fail?
- If stuck after three minutes, write the input/output line you expect and trace the smallest example by hand.
- After the reveal, attempt the extension below before the next lecture.
- Extension challenge: find the per-chunk failure probability p at which plan B's expected waste equals plan A's — and interpret the number.