- Asked 2/20
- 2069 Chaitra · 2+2 marks
- 2075 Chaitra · 2 marks
Software fault tolerance and recovery
Short answer
Fault tolerance enables correct operation despite faults. Roll-back recovery restores a checkpoint and re-executes, losing recent work. Roll-forward recovery moves to a corrected new state without going back, faster but more complex.
What is fault tolerance in software? What do you mean by roll-back recovery and roll-forward recovery?
Fault tolerance in software
Software fault tolerance is the ability of a program to continue operating correctly (or degrade gracefully) even when software faults (bugs) or hardware faults occur. Since software cannot be tested completely, techniques are used: error detection (checks, assertions, watchdogs), error recovery, design diversity (N-version programming, where independent versions vote), recovery blocks (try alternate routines if the acceptance test fails), exception handling and redundancy.
Roll-back recovery
The system periodically saves a consistent state called a checkpoint. When an error is detected, the system goes back to the last checkpoint (restores the saved state) and re-executes from there, hoping that the error was transient.
- Used in databases (transaction roll-back), operating systems and the recovery-block technique.
- Simple and general, but needs extra time and memory and loses the work done since the checkpoint; not suitable for real-time actions that cannot be undone.
Roll-forward recovery
When an error occurs, the system does not go back but moves forward to a new, error-free state, by correcting the erroneous state or by skipping to a safe state (for example using the value of redundant modules, or reinitialising and continuing).
- Used in real-time and critical systems where time does not allow re-execution.
- Faster, but needs error diagnosis and the knowledge of the correct state, so it is more complex and application-specific.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Fault tolerance and redundancy for reliability · Instrumentation II, chapter 7 · asked 4×
- Disaster recovery in software · Instrumentation II, chapter 9
- Software maintenance and fixing common bugs · Instrumentation II, chapter 9
- Embedded real-time software; model for project · Instrumentation II, chapter 9
- Increasing reliability of embedded real-time software · Instrumentation II, chapter 9
- Forward/backward recovery; checkpointing · Distributed System, chapter 9
- Short note: Forward and backward recovery · Distributed System, chapter 9 · asked 2×
- Availability and fault tolerance in GFS · Big Data Technologies, chapter 2
- Replication, fault tolerance, scalability · Distributed System, chapter 7