- 2074 Chaitra · 4+4 marks
Independent vs coordinated checkpointing; snapshot
Short answer
Independent checkpointing lets each process checkpoint alone, risking domino effect; coordinated checkpointing synchronizes processes so latest checkpoints are consistent, with no domino effect. The Chandy-Lamport snapshot algorithm uses markers on FIFO channels to record a consistent global state for backward recovery.
What are independent checkpointing and co-ordinated checkpointing? Explain snapshot algorithm used for backward recovery in distributed system.
Checkpointing saves the state of a process (or of the whole distributed system) on stable storage so that it can be restored after a failure (backward recovery). In a distributed system the saved local states must form a consistent global state (a distributed snapshot): if the receipt of a message is recorded, its sending must be recorded too (no orphan messages). The most recent consistent set of checkpoints is the recovery line.
Independent checkpointing
Each process takes its checkpoints independently, without coordination. On recovery, the processes must find a consistent recovery line by tracing dependencies backwards.
- It is simple and has no coordination overhead.
- There is a risk of the domino effect: rolling back one process forces others to roll back, and so on, possibly to the initial state; many checkpoints must be kept, and finding a recovery line takes long.
Coordinated checkpointing
All processes synchronize so that their checkpoints together form a consistent global state, e.g. by a two-phase blocking protocol:
- The coordinator sends CHECKPOINT_REQUEST to all processes.
- Each process takes a local (tentative) checkpoint, stops sending application messages and acknowledges.
- When the coordinator has all the acknowledgements, it sends CHECKPOINT_DONE; the processes make their checkpoints permanent and resume.
- Only the latest checkpoint is needed, there is no domino effect, and recovery is simple.
- Cost: coordination delay, and the processes are blocked for a while.
Snapshot algorithm (Chandy-Lamport) gives a consistent global state without stopping the system. Channels are assumed to be FIFO.
- The initiator records its own state, sends a marker on every outgoing channel, and starts recording the messages arriving on all its incoming channels.
- A process receiving a marker for the first time (on any channel) records its own state, records that channel's state as empty, and sends markers on all its outgoing channels. It then starts recording the messages arriving on its other incoming channels.
- When it later receives a marker on another incoming channel, it stops recording that channel; the messages recorded form that channel's state (the messages in transit).
- When a marker has arrived on every incoming channel, the local snapshot is complete and is sent to the initiator, which assembles the global snapshot.
The result is a consistent global state that is used for backward recovery after a failure.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Forward/backward recovery; checkpointing · Distributed System, chapter 9
- Short note: Forward and backward recovery · Distributed System, chapter 9 · asked 2×
- Avoiding faults; checkpointing compared · Distributed System, chapter 9
- Distributed deadlock and recovery · Distributed System, chapter 8 · asked 3×
- Autonomous vs distributed system · Distributed System, chapter 1
- K-fault tolerant system; recovery · Distributed System, chapter 9
- Forward vs backward chaining · Artificial Intelligence, chapter 4 · asked 3×
- Recovery from log: deferred vs immediate · Database Management System, chapter 8