---
title: "Avoiding faults; checkpointing compared"
subject: "Distributed System"
chapter: 9
key: "semester_7/distributed_system:avoid-faults-checkpointing"
source: https://www.bctengineer.com/q/semester_7/distributed_system/avoid-faults-checkpointing
site: BCT Engineering
---

# Avoiding faults; checkpointing compared

Distributed System · Chapter 9: Fault Tolerance

- Asked in: 2071 Shrawan, 4+4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/avoid-faults-checkpointing
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-9

## Question

How do you avoid faults in DS? Compare independent checkpointing with coordinated checkpointing approach.

## Short answer

Faults are avoided by good design, testing, redundancy, detection, reliable communication, and recovery. Independent checkpointing needs no coordination but can cause domino effect and requires computing a recovery line; coordinated checkpointing synchronizes checkpoints, avoids domino effect, and needs only the latest checkpoint, at the cost of coordination delay.

## Answer

#### Avoiding faults
Faults cannot be removed completely, but they can be avoided or their effect reduced:
- **Fault avoidance**: good design, formal methods, code review and testing, use of quality components and conservative operating limits.
- **Redundancy**: replicated components and processes (physical redundancy, TMR, process groups); information redundancy (parity, ECC); time redundancy (retries).
- **Fault detection**: heartbeats, timeouts and checksums.
- **Fault prevention in communication**: reliable protocols, acknowledgements and retransmission.
- **Recovery**: checkpoints and logs to restore the state.
- **Maintenance**: repair and replacement of failing components.

#### Independent versus coordinated checkpointing
Checkpointing saves process state to stable storage so that a failed system can be rolled back to a consistent state.

| Point | Independent | Coordinated |
|---|---|---|
| Coordination | None | Needed (marker/2-phase) |
| Domino effect | Possible | None |
| Recovery line | Must be computed | Latest checkpoint is consistent |
| Storage | Many checkpoints | Only latest one or two |
| Normal-run overhead | Low (but must log dependencies) | Higher (blocking, messages) |
| Recovery cost | High | Low |

- **Independent**: each process checkpoints at its own convenience; on a failure, a consistent recovery line must be found by following dependencies, and the domino effect can push the rollback back to the start.
- **Coordinated**: processes checkpoint together using a coordinator (or markers), so the latest checkpoints are always consistent; there is no domino effect, but there is a synchronization delay.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which is an example of time redundancy for avoiding the effect of faults?
   A. Replicating a server three times
   B. Adding parity bits to data
   C. Using heartbeats to detect failure
   D. Retrying a failed operation
   Answer: D. Time redundancy repeats an action (retries); parity is information redundancy and replication is physical redundancy. (Key point: Fault avoidance vs masking)

2. Which approach can suffer the domino effect, and why?
   A. Coordinated, because processes block
   B. Independent, because checkpoints are not guaranteed consistent
   C. Both equally, because both use stable storage
   D. Neither, as rollback is always to the last checkpoint
   Answer: B. Independent checkpoints must be combined into a recovery line by tracing dependencies, which can cascade back to the start. (Key point: Domino effect comparison)

3. In coordinated checkpointing, what is true about recovery?
   A. The recovery line must be computed from dependencies
   B. The latest checkpoint is consistent, so recovery is simple
   C. Many old checkpoints must be stored
   D. No checkpoint is needed
   Answer: B. Coordination ensures the latest checkpoints form a consistent state, so only the latest one or two are kept. (Key point: Recovery line)

4. What is the main cost of coordinated checkpointing during normal operation?
   A. Domino effect
   B. Synchronization delay and blocking with extra messages
   C. Large storage for many checkpoints
   D. High recovery cost
   Answer: B. Coordinated checkpointing pays higher normal-run overhead (blocking, messages) in exchange for low recovery cost. (Key point: Overhead trade-off)

## Related in Distributed System

- [Independent vs coordinated checkpointing; snapshot](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aindependent-coordinated-snapshot) — Distributed System, chapter 9
- [Forward/backward recovery; checkpointing](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aforward-backward-coordinated-ckpt) — Distributed System, chapter 9
- [Faults, failures, errors; resilience](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Afaults-failures-resilience) — Distributed System, chapter 9

## Related in other subjects

- [Avoiding load shedding and approach to 2020](https://www.bctengineer.com/question.md?key=semester_7%2Fhydropower_engineering%3Aload-shedding-approach-2020) — Hydropower Engineering, chapter 1
