The Wayback Machine - https://web.archive.org/web/20240930174432/https://www.geeksforgeeks.org/basic-fault-tolerant-software-techniques/
Open In App

Basic Fault Tolerant Software Techniques

Last Updated : 19 Jun, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Fault tolerance is a critical property of software systems, ensuring they can continue operating even when faced with failures or errors. This resilience is achieved through various techniques to prevent disruptions and maintain high availability, particularly for mission-critical applications. Basic fault-tolerant software techniques, such as redundancy, checkpointing, and error detection, play a vital role in enhancing system reliability and minimizing downtime. These techniques involve duplicating critical components, periodically saving system states, and detecting/correcting errors to ensure uninterrupted operation.

What is Fault Tolerant?

Fault tolerance is a property of software systems that allows them to continue functioning even in the event of failures or errors. Fault tolerance means the ability of a system such as a computer, network, etc. will continue to work too when one or more components fail but the system will work without interruption. The main objective of establishing the fault-tolerant system is to prevent disruptions. These disruptions may arise due to a single point of failure that ensures the high availability of Applications. as mission-critical applications for their business continuity. The Fault-tolerant systems also have the use of backup components. and these backup components will automatically take place when there are failed components which may ensure there is no loss of service. These include Power sources, hardware systems, and Software systems

Basic Fault Tolerant Software Techniques

The following are some basic techniques used to improve the fault tolerance of software systems:

  1. Redundancy: This involves duplicating critical components of the software system so that if one component fails, the others can take over and keep the system running. This can include using redundant hardware, such as redundant servers or storage systems, or creating redundant software components.
  2. Checkpointing: This involves periodically saving the state of the software system so that if a failure occurs, the system can be restored to a previous state. This can be useful in systems that require a lot of processing time, as it allows the system to restart from a saved state if it crashes or fails.
  3. Error Detection and Correction: This involves detecting errors and correcting them before they cause problems. For example, error detection and correction algorithms can be used to detect and correct errors in data transmission.
  4. Failure Prediction: This involves using algorithms or heuristics to predict when a failure is likely to occur so that the system can take appropriate action to prevent or mitigate the failure.
  5. Load Balancing: This involves distributing workloads across multiple components so that no single component is overburdened. This can help to prevent failures and improve the overall performance of the system.
  6. Autonomous Systems: Autonomous systems are made to identify, diagnose, and fix errors on their own without the need for human assistance. To ensure ongoing operation, these systems use automatic fault isolation, recovery, and identification procedures.
  7. Isolation and Restrictions: The goal of isolation and containment approaches is to build systems so that errors in one component do not spread to the rest of the system. This can involve dividing up components and minimizing the effect of errors through the use of virtualization, microservices, or containers.
  8. Replication: The practice of making multiple copies of essential system components or services and distributing them to several places is known as replication. These are designed to be fault-tolerant and to function continuously even in the event of a failure.
  9. Dynamic reconfiguration: This technique allows a system to dynamically respond to faults, reallocate resources, and adapt to changing conditions. By modifying the configuration of the system in real time according to the operational conditions, this technique improves system resilience.

These are just a few of the basic techniques used to improve the fault tolerance of software systems. In practice, many systems use a combination of these techniques to provide the highest level of fault tolerance possible.

The study of software fault-tolerance is relatively new compared with the study of fault-tolerant hardware. In general, fault-tolerant approaches can be classified into fault-removal and fault-masking approaches. Fault-removal techniques can be either forward error recovery or backward error recovery. Forward error recovery aims to identify the error and, based on this knowledge, correct the system state containing the error. Exception handling in high-level languages, such as Ada and PL/1, provides a system structure that supports forward recovery. Backward error recovery corrects the system state by restoring the system to a state that occurred before the manifestation of the fault. The recovery block scheme provides such a system structure. Another fault-tolerant software technique commonly used is error masking. The NVP scheme uses several independently developed versions of an algorithm. A final voting system is applied to the results of these N-versions and a correct result is generated. A fundamental way of improving the reliability of software systems depends on the principle of design diversity where different versions of the functions are implemented. To prevent software failure caused by unpredicted conditions, different programs (alternative programs) are developed separately, preferably based on different programming logic, algorithms, computer languages, etc. This diversity is normally applied in the form of recovery blocks or N-version programming. Fault-tolerant software assures system reliability by using protective redundancy at the software level.

Types of Fault-Tolerance Software

There are two basic techniques for obtaining fault-tolerant software: RB scheme and NVP. Both schemes are based on software redundancy assuming that the events of coincidental software failures are rare.

  1. Recovery Block Scheme
  2. N-version Programming
  3. Check Pointing and Rollback Recovery

Recovery Block Scheme

The recovery block scheme consists of three elements: primary module, acceptance tests, and alternate modules for a given task. The simplest scheme of the recovery block is as follows:

Ensure T
By P
Else by Q1
Else by Q2
.
.
.
Else by Qn-1
Else Error

Where T is an acceptance test condition that is expected to be met by the successful execution of either the primary module P or the alternate modules Q1, Q2, . . ., Qn-1. The process begins when the output of the primary module is tested for acceptability. If the acceptance test determines that the output of the primary module is not acceptable, it recovers or rolls back the state of the system before the primary module is executed. It allows the second module Q1, to execute. The acceptance test is repeated to check the successful execution of module Q1. If it fails, then module Q2 is executed, etc. The alternate modules are identified by the keywords “else by” When all alternate modules are exhausted, the recovery block itself is considered to have failed and the final keyword “else error” declares the fact. In other words, when all modules execute and none produce acceptable outputs, then the system falls. A reliability optimization model has been studied by Pham (1989b) to determine the optimal number of modules in a recovery block scheme that minimizes the total system cost given the reliability of the individual modules. In a recovery block, a programming function is realized by n alternative programs, P1, P2, . . . ., Pn. The computational result generated by each alternative program is checked by an acceptance test, T.

Recovery Block Scheme

Recovery Block Scheme

If the result is rejected, another alternative program is then executed. The program will be repeated until an acceptable result is generated by one of the n alternatives or until all the alternative programs fail. The probability of failure of the RB scheme, $P_{rb}$, is as follows: 

    $$ P_{rb}= \prod_{i=1}^n (e_i+t_{2i})+\sum_{i=1}^n t_{1i}e_i\left ( \prod_{j=1}^{i-1} (e_j+t_{2j}) \right) $$

where $e_i$              = probability of failure for version Pi $t_{1i}$              = probability that acceptance test I judges an incorrect result as correct t$t_{2i}$              = probability that acceptance test I judge a correct result as incorrect. The above equation corresponds to the case when all versions fail the acceptance test. The second term corresponds to the probability that acceptance test I judges an incorrect result as correct at the ith trial of the n versions.

N-version Programming

NVP is used for providing fault tolerance in software. In concept, the NVP scheme is similar to the N-modular redundancy scheme used to provide tolerance against hardware faults. The NVP is defined as the independent generation of $N\geq 2$ functionally equivalent programs, called versions, from the same initial specification. Independent generation of programs means that the programming efforts are carried out by N individuals or groups that do not interact concerning the programming process. Whenever possible, different algorithms, techniques, programming languages, environments, and tools are used in each effort. In this technique, N program versions are executed in parallel on identical input and the results are obtained by voting on the outputs from the individual programs. The advantage of NVP is that when a version failure occurs, no additional time is required for reconfiguring the system and redoing the computation. Consider an NVP scheme consisting of n programs and a voting mechanism, V.

N-Version Programming

N-Version Programming

As opposed to the RB approach, all alternative programs are usually executed simultaneously and their results are sent to a decision mechanism that selects the final result. The decision mechanism is normally a voter when there are more than two versions (or, more than k versions, in general), and it is a comparator when there are only two versions (k versions). The syntactic structure of NVP is as follows:

seq
par
P1(version 1)
P2(version 2)
.
.
.
Pn(version n)
decision V

Assume that a correct result is expected where there are at least two correct results. The probability of failure of the NVP scheme, Pn, can be expressed as 

    $$p_{nv}=\prod_{i=1}^n e_i+ \prod_{i=1}^n (1-e_i)e_i^{-1}\prod_{j=1}^n e_j + d$$

The first term of this equation is the probability that all versions fail. The second term is the probability that only one version is correct. The third term, d, is the probability that there are at least two correct results but the decision algorithm fails to deliver the correct result. It is worthwhile to note that the goal of the NVP approach is to ensure that multiple versions will be unlikely to fail on the same inputs. With each version independently developed by a different programming team, design approach, etc., the goal is that the versions will be different enough so that they will not fail too often on the same inputs. However, multiversion programming is still a controversial topic.

Check-Pointing and Rollback Recovery

Check Pointing and Rollback Recovery is a different technique from the above present technique. The system is tested when some computation is performed. It is used generally when there is a failure in the process or data corruption.

Check Pointing and Rollback Recovery

Check Pointing and Rollback Recovery

The main difference between the recovery block scheme and the N-version programming is that the modules are executed sequentially in the former. The recovery block generally does not apply to critical systems where real-time response is of great concern.

For more, refer to the Difference Between Recovery Block Scheme and N-Version Programming.

Advantages of Using Fault-Tolerant Techniques in Software Systems

  • Improved Reliability: Fault-tolerant techniques help to ensure that software systems continue to function even in the event of failures or errors, improving the overall reliability of the system.
  • Increased Availability: By preventing failures and downtime, fault tolerance techniques help to increase the overall availability of the system, leading to increased user satisfaction and adoption.
  • Reduced Downtime: By preventing failures and mitigating the impact of errors, fault tolerance techniques help to reduce the amount of downtime experienced by the software system, leading to increased productivity and efficiency.
  • Improved Performance: By distributing workloads across multiple components and preventing overburdening of any single component, fault tolerance techniques can help to improve the overall performance of the software system.

Disadvantages of Using Fault-Tolerant Techniques in Software Systems

  • Increased complexity: Implementing fault tolerance techniques can add complexity to the software system, making it more difficult to develop, maintain, and test.
  • Increased cost: Implementing fault tolerance techniques can be expensive, requiring specialized hardware, software, and expertise.
  • Reduced performance: In some cases, implementing fault tolerance techniques can lead to reduced performance, as the system must devote resources to error detection, correction, and recovery.
  • Overhead: The process of detecting and recovering from failures can introduce overhead into the software system, reducing its overall performance.
  • False alarms: In some cases, fault-tolerant techniques may detect errors or failures that are not present, leading to false alarms and unnecessary downtime.

Questions For Practice

1. The extent to which the software can control to operate correctly despite the introduction of Invalid input is called as

(A) Reliability

(B) Robustness

(C) Fault Tolerance

(D) Portability

Answer: The correct answer is (B).

Conclusion

Basic fault-tolerant software techniques are fundamental for ensuring the reliability and resilience of software systems. By employing redundancy, checkpointing, and error detection, these techniques enable systems to withstand failures and errors, thereby reducing downtime and improving overall performance. While they may introduce some complexity and cost, their benefits in terms of increased reliability, availability, and performance make them indispensable components of modern software development and deployment strategies.

Frequently Asked Questions on Basic Fault Tolerance Software Technique – FAQs

1. What are the four phases of fault tolerance?

The four phases of Fault-Tolerance

  • Software Detection
  • Damage Assessment
  • Error Recovery
  • Fault Treatment

2. What is fault tolerance testing?

Fault Tolerance Testing means to assess or verify our system’s operations at various checkpoints to determine coming failures in the future.



Previous Article
Next Article

Similar Reads

Fault Reduction Techniques in Software Engineering
Fault reduction techniques are methods used in software engineering to reduce the number of errors or faults in a software system. Some common techniques include: Code Reviews: Code review is a process where code is evaluated by peers to identify potential problems and suggest improvements.Unit Testing: Unit testing involves writing automated tests
4 min read
Fault-tolerance Techniques in Computer System
Fault-tolerance is the process of working of a system in a proper way in spite of the occurrence of the failures in the system. Even after performing the so many testing processes there is possibility of failure in system. Practically a system can't be made entirely error free. hence, systems are designed in such a way that in case of error availab
3 min read
Fault Avoidance in Software Engineering
Pre-requisites: Software Engineering Fault Avoidance in Software engineering is used either minimize the possibility of mistakes and/or that trap mistakes before they result in the introduction of system fault Examples of such techniques include avoiding error-prone programming language constructs such as pointers. Fundamental to the achievement of
5 min read
Fault Injection testing - Software Engineering
Fault injection is a technique used in software engineering to test the resilience of a software system. The idea is to intentionally introduce errors or faults into the system to see how it reacts and to identify potential weaknesses. This can be achieved in several ways, such as: Hardware faults: This involves physically altering hardware compone
6 min read
What is Software Fault Isolation?
Softwarе Fault Isolation (SFI) is a technique for protеcting softwarе systеms from sеcurity brеachеs and othеr typеs of failurеs by isolating diffеrеnt componеnts of softwarе and еnforcing strict boundariеs bеtwееn thеm. In this article, we discuss what Softwarе Fault Isolation is, how it works, and its benefits and limitations. What is Softwarе Fa
4 min read
7 Code Refactoring Techniques in Software Engineering
Being a developer how do you start working on a new project…?? Firstly you gather some basic requirements and then based on the requirement you start implementing the feature one by one. As you progress with your project and learn more about it, you keep adding and changing the code in your codebase. Later you also change the code to fix the bug an
9 min read
Techniques for reducing need of Software Maintenance
Software Maintenance is modification of a software product after delivery to correct faults, to improve performance or other attributes, or to adapt the product to a modified environment. Following are the three techniques the need of software maintenance as depicted in the following figure :There are several techniques that can be used to reduce t
5 min read
Project Size Estimation Techniques - Software Engineering
In the dynamic field of Software Engineering, the accurate estimation of project size is a fundamental aspect that influences the success of software projects. Project Size Estimation Techniques are essential tools that help in predicting the required resources, time, and cost, thus ensuring the project's feasibility and efficiency from the onset.
12 min read
Requirements Validation Techniques - Software Engineering
Requirements validation techniques are essential processes used to ensure that software requirements are complete, consistent, and accurately reflect what the customer wants. These techniques help identify and fix issues early in the development process, reducing the risk of costly errors later on. By thoroughly validating requirements, teams can e
8 min read
Software Testing Techniques
Software testing techniques are methods used to design and execute tests to evaluate software applications. The following are common testing techniques: Manual testing - Involves manual inspection and testing of the software by a human tester. Automated testing - Involves using software tools to automate the testing process. Functional testing - Te
12 min read
Basic Principles of Good Software Engineering approach
Software Engineering is the systems engineering approach for software product/application development. It is an engineering branch associated with analyzing user requirements, design, development, testing, and maintenance of software products. Some basic principles of good software engineering are – One of the basic software Engineering principles
5 min read
Techniques to be an awesome Agile Developer (Part -1)
No matter how far down the wrong road you’ve gone, turn back. In software development, the requirements and challenges that come up during your project development are never ceasing and ever-changing. Your software project depends on the skills, training, and competence of all the developers on the team. A successful developer is the one with (tech
4 min read
Difference between N-version programming and Recovery blocks Techniques
Software fault-tolerance techniques use two common techniques to achieve fault-tolerance. 1. N-version programming : In N-version programming technique, there are N groups or individual of developers that do not share the programming process and these independents develop N versions of software module. The idea behind this technique is that differe
2 min read
Search Techniques in Cyber Forensics
Computer forensic examinations uses computer generated data as their vital source. The goal of any given computer forensic examination is to find facts, and through these facts they try to recreate truth of an event. These Automated Search Techniques are used to find out whether given type of object such as hacking tools or pictures of specific typ
4 min read
Refactoring - Introduction and Its Techniques
Refactoring or Code Refactoring is defined as systematic process of improving existing computer code, without adding new functionality or changing external behaviour of the code. It is intended to change the implementation, definition, structure of code without changing functionality of software. It improves extensibility, maintainability, and read
4 min read
Techniques to Identify Defects
Defects are one of the major causes of a decrease in improvement and quality of products. Therefore, identification of defects is very important to control and minimize its impact on system. Identification or detection of defects is not an easy process. Testers need to be very focused. Removing all of the defects is not possible but at least one ca
4 min read
Defect Prevention Methods and Techniques
Defect Prevention is basically defined as a measure to ensure that defects being detected so far, should not appear or occur again. For facilitating communication simply among members of team, planning and devising defect prevention guidelines, etc., Coordinator is mainly responsible. Coordinator is mainly responsible to lead defect prevention effo
4 min read
Tools and Techniques Used in Project Management
Management in business simply means process to control or handle things or people like planning, decision making, organizing, financial, human resources, etc. to attain or achieve the organization's goals and objectives. Project management means application of knowledge, tools, techniques to project activities so as to achieve goals and meet succes
4 min read
Various RCA Techniques
Root Cause Analysis (RCA) is essential for identifying and addressing the underlying causes of problems rather than just their symptoms. Several RCA techniques, such as Barrier Analysis, Change Analysis, Events and Causal Factor Analysis, Failure Mode and Effects Analysis (FMEA), Fishbone Diagram, and Pareto Diagram, are used to effectively diagnos
4 min read
What is the relationship between software process, software project, and software product?
Nowadays, the production of software has become vital in business processes, technological progress, and our day-to-day activities. As the process of software development becomes intricate, there are organized frameworks that are commonly known as the software process. This article explores the components of the software process, software projects,
15+ min read
Basic Principle of Root Cause Analysis
Root Cause Analysis (RCA) is one of main problem-solving techniques. It basically helps organizations in improving software quality that leads to organizational improvement by reducing number of defects in system. It is a systematic process of identifying major cause (root cause) of problems or defects and a helpful way for resolving them. Eliminat
3 min read
Basic Elements of Barrier Analysis
Prerequisite - Barrier Analysis Whenever a problem arises, then fixing problem is only part of solution. One needs to eliminate or resolve main root cause of particular problem in order for particular problem not to reoccur again. For resolving problem permanently, identification of root cause is important. This analysis of root cause is known as r
3 min read
Basic approaches for Data generalization (DWDM)
Data Generalization is the process of summarizing data by replacing relatively low level values with higher level concepts. It is a form of descriptive data mining. There are two basic approaches of data generalization : 1. Data cube approach : It is also known as OLAP approach. It is an efficient approach as it is helpful to make the past selling
2 min read
Basic Principles of RCM
Introduction : RCM (Reliability Centered Maintenance) is a method used to develop maintenance strategies for equipment and systems. It is based on several basic principles that guide the analysis and development of maintenance strategies. Why need Principles of RCM ? The principles of RCM (Reliability Centered Maintenance) are needed to guide the a
8 min read
Introduction of Independent Basic Service Set (IBSS)
Independent Basic Service Set (IBSS), as the name suggests, is a service set that allows wireless devices or stations to communicate with each other without any medium or central device. It does not contain or include any AP (Access Point). That’s why it is also known as an ad hoc mode or peer to peer network. Peer to peer network, simply means two
3 min read
Differences Between the Basic, Intermediate, and Detailed COCOMO Model
In the realm of software engineering, the Construction Cost Model (COCOMO) is a significant technique for estimating software costs that has been used for many years. To estimate the time, effort, and resources needed for software development to be successful, COCOMO offers an organized method. For better decision-making, enhanced project planning,
4 min read
Introduction of Basic Service Set (BSS)
Basic Service Set (BSS), as the name suggests, is basically a network topology that allows all wireless devices to communicate with each other through a common medium i.e., AP (Access point). It also manages these wireless devices or clients. It basically provides a building block to all wireless LAN (Local Area Network). BSS basically contains onl
4 min read
Software Engineering | Schick-Wolverton software reliability model
Prerequisite - Jelinski Moranda software reliability model The Schick-Wolverton (S-W) model is a modification to the J-M model. It is similar to the J-M model except that it further assumes that the failure rate at the ith time interval increases with time ti since the last debugging. In the model, the program failure rate function between the (i-1
4 min read
Software Engineering | Responsibilities of Software Project Manager
Software Project Management (SPM) is a sub-field of Project Management in which software projects are planned, implemented, monitored and controlled. It consists of three terms: Software, Project and Management. So, let us understand each term separately. Software includes a set of programs, documentation and user manual for a particular software p
3 min read
How Software Inspection improves Software Quality ?
The term software inspection was developed by IBM in the early 1970s, when it was noticed that the testing was not enough sufficient to attain high quality software for large applications. Software inspection is a process in which other developers or team members review the code written by a developer to identify potential errors or areas for impro
6 min read
Article Tags :