Software Engg. (Unit-5)
Software Engg. (Unit-5)
Software Maintenance
Software Maintenance is the process of modifying a software product after it has been delivered
to the customer. The main purpose of software maintenance is to modify and update software
application after delivery to correct faults and to improve performance.
Need for Maintenance –
Software Maintenance must be performed in order to:
Correct faults.
Improve the design.
Implement enhancements.
Interface with other systems.
Accommodate programs so that different hardware, software, system features, and
telecommunications facilities can be used.
Migrate legacy software.
Retire software.
Reverse Engineering –
Reverse Engineering is processes of extracting knowledge or design information from anything
man-made and reproducing it based on extracted information. It is also called back
Engineering.
Software Reverse Engineering –
Software Reverse Engineering is the process of recovering the design and the requirements
specification of a product from an analysis of it’s code. Reverse Engineering is becoming
important, since several existing software products, lack proper documentation, are highly
unstructured, or their structure has degraded through a series of maintenance efforts.
Why Reverse Engineering?
Providing proper system documentatiuon.
Recovery of lost information.
Assisting with maintenance.
Facility of software reuse.
Discovering unexpected flaws or faults.
Uses of Software Reverse Engineering –
Software Reverse Engineering is used in software design, reverse engineering enables the
developer or programmer to add new features to the existing software with or without
knowing the source code.
Reverse engineering is also useful in software testing, it helps the testers to study the virus
and other malware code.
Cost of Maintenance
Reports suggest that the cost of maintenance is high. A study on estimating software
maintenance found that the cost of maintenance is as high as 67% of the cost of entire software
process cycle.
On an average, the cost of software maintenance is more than 50% of all SDLC phases. There
are various factors, which trigger maintenance cost go high, such as:
Real-world factors affecting Maintenance Cost
The standard age of any software is considered up to 10 to 15 years.
Older softwares, which were meant to work on slow machines with less memory and
storage capacity cannot keep themselves challenging against newly coming enhanced
softwares on modern hardware.
As technology advances, it becomes costly to maintain old software.
Most maintenance engineers are newbie and use trial and error method to rectify problem.
Often, changes made can easily hurt the original structure of the software, making it hard
for any subsequent changes.
Changes are often left undocumented which may cause more conflicts in future.
Software Reliability
Software reliability is the probability that the software will operate failure-free for a specific
period of time in a specific environment. It is measured per some unit of time.
Software Reliability starts with many faults in the system when first created.
After testing and debugging enter a useful life cycle.
Useful life includes upgrades made to the system which bring about new faults.
The system needs to then be tested to reduce faults.
Software reliability cannot be predicted from any physical basis, since it depends
completely on the human factors in design.
Note: There are two significant differences between hardware and software curves are:
One difference is that in the last stage, the software does not have an increasing failure rate as
hardware does. In this phase, the software is approaching obsolescence; there are no
motivations for any upgrades or changes to the software. Therefore, the failure rate will not
change.
The second difference is that in the useful-life phase, the software will experience a radical
increase in failure rate each time an upgrade is made. The failure rate levels off gradually,
partly because of the defects create and fixed after the updates.
The upgrades in above figure signify feature upgrades, not upgrades for reliability. For feature
upgrades, the complexity of software is possible to be increased, since the functionality of the
software is enhanced. Even error fixes may be a reason for more software failures if the bug
fix induces other defects into the software. For reliability upgrades, it is likely to incur a drop
in software failure rate, if the objective of the upgrade is enhancing software reliability, such
as a redesign or reimplementation of some modules using better engineering approaches, such
as clean-room method.
Wear and Tear Failure occurs due to physical In software reliability, there is
deterioration in wear and tear. no wear and tear.
Deterioration In this prior deterioration warning In this no prior deterioration
Warning about failure. warning about failure.
Failure Curve The bathtub curve is used for failure There is no Bathtub curve for
rates apply. failure rates.
Is Failure Time- In this failures are time-dependent. In this failures are not time-
dependent? dependent.
Reliability In this reliability can be predicted In this reliability can not be
Prediction from design. predicted from design.
Reliability The complexity of hardware The complexity of software
Complexity reliability is very high. reliability is low.
External Hardware reliability is related to External environment conditions
Environment environmental conditions. do not affect software
Impact reliability.
Reliability Reliability can’t be improved through Reliability can be improved
Improvement redundant of hardware. through redundancy of software.
Bug
A bug refers to defects which means that the software product or the application is not
working as per the adhered requirements set. When we have any type of logical error, it
causes our code to break, which results in a bug. It is now that the Automation/ Manual Test
Engineers describe this situation as a bug.
A bug once detected can be reproduced with the help of standard bug-reporting
templates.
Major bugs are treated as prioritized and urgent especially when there is a risk of
user dissatisfaction.
The most common type of bug is a crash.
Typos are also bugs that seem tiny but are capable of creating disastrous results.
Defect
A defect refers to a situation when the application is not working as per the requirement and
the actual and expected result of the application or software are not in sync with each other.
The defect is an issue in application coding that can affect the whole program.
It represents the efficiency and inability of the application to meet the criteria and
prevent the software from performing the desired work.
The defect can arise when a developer makes major or minor mistakes during the
development phase.
Error
Error is a situation that happens when the Development team or the developer fails to
understand a requirement definition and hence that misunderstanding gets translated into
buggy code. This situation is referred to as an Error and is mainly a term coined by the
developers.
Errors are generated due to wrong logic, syntax, or loop that can impact the end-
user experience.
It is calculated by differentiating between the expected results and the actual
results.
It raises due to several reasons like design issues, coding issues, or system
specification issues and leads to issues in the application.
Fault
Sometimes due to certain factors such as Lack of resources or not following proper steps
Fault occurs in software which means that the logic was not incorporated to handle the errors
in the application. This is an undesirable situation, but it mainly happens due to invalid
documented steps or a lack of data definitions.
It is an unintended behavior by an application program.
It causes a warning in the program.
If a fault is left untreated it may lead to failure in the working of the deployed
code.
A minor fault in some cases may lead to high-end error.
There are several ways to prevent faults like adopting programming techniques,
development methodologies, peer review, and code analysis.
Failure
Failure is the accumulation of several defects that ultimately lead to Software failure and
results in the loss of information in critical modules thereby making the system unresponsive.
Generally, such situations happen very rarely because before releasing a product all possible
scenarios and test cases for the code are simulated. Failure is detected by end-users once
they face a particular issue in the software.
Failure can happen due to human errors or can also be caused intentionally in the
system by an individual.
It is a term that comes after the production stage of the software.
It can be identified in the application when the defective part is executed.
Some of the vital differences between bug, defect, fault, error, and failure are listed in the
below table:
Classification of Failures:
1. Intermittent Failures:
These failures occur sporadically and are often difficult to reproduce or diagnose. They may
not follow a predictable pattern.
Characteristics:
May be influenced by specific, often unknown, conditions.
Hard to trace and debug because they don't always manifest under the same
circumstances.
Often related to timing issues, concurrency, or subtle hardware conditions.
Example: An application that crashes occasionally without any apparent pattern, potentially
due to a rare race condition.
2. Consistent Failures:
These failures occur reliably under specific conditions or inputs. They are repeatable and can
be reproduced consistently.
Characteristics:
Easier to diagnose and fix since they occur under predictable circumstances.
Usually tied to specific bugs in the code or flaws in logic that are triggered by certain
inputs or actions.
Example: A software application that fails every time a specific file type is uploaded, indicating
a consistent issue with handling that file format.
3. Transient Failures
These failures are temporary and may resolve themselves without any intervention. They occur
due to temporary conditions.
Characteristics:
Typically caused by temporary environmental factors, such as network instability or
temporary resource unavailability.
Often recoverable, with the system returning to normal operation without manual
intervention.
Example: A temporary network timeout that prevents data from being transmitted, but the
transmission succeeds upon retrying.
4. Permanent Failures:
These failures are persistent and do not resolve without intervention. They require changes to
the system to fix.
Characteristics:
Result from definitive issues in the software that must be corrected through code
changes, configuration adjustments, or hardware replacements.
Lead to ongoing malfunctions until addressed.
Example: A software feature that consistently causes the application to crash whenever used,
necessitating a code fix to resolve the issue.
Software Reliability Metrics
Reliability metrics are used to quantitatively expressed the reliability of the software product.
The option of which metric is to be used depends upon the type of system to which it applies
& the requirements of the application domain.
Some reliability metrics which can be used to quantify the reliability of the software product
are as follows:
MTTF is described as the time interval between the two successive failures. An MTTF of 200
mean that one failure can be expected each 200-time units. The time units are entirely
dependent on the system & it can even be stated in the number of transactions. MTTF is
consistent for systems with large transactions.
For example, It is suitable for computer-aided design systems where a designer will work on a
design for several hours as well as for Word-processor systems.
To measure MTTF, we can evidence the failure data for n failures. Let the failures appear at
the time instants t1,t2.....tn.
Once failure occurs, some-time is required to fix the error. MTTR measures the average time
it takes to track the errors causing the failure and to fix them.
3. Mean Time Between Failure (MTBR)
We can merge MTTF & MTTR metrics to get the MTBF metric.
Thus, an MTBF of 300 denoted that once the failure appears, the next failure is expected to
appear only after 300 hours. In this method, the time measurements are real-time & not the
execution time as in MTTF.
It is the number of failures appearing in a unit time interval. The number of unexpected events
over a specific time of operation. ROCOF is the frequency of occurrence with which
unexpected role is likely to appear. A ROCOF of 0.02 mean that two failures are likely to
occur in each 100 operational time unit steps. It is also called the failure intensity metric.
POFOD is described as the probability that the system will fail when a service is requested. It
is the number of system deficiency given several systems inputs.
POFOD is the possibility that the system will fail when a service request is made.
A POFOD of 0.1 means that one out of ten service requests may fail.POFOD is an essential
measure for safety-critical systems. POFOD is relevant for protection systems where services
are demanded occasionally.
6. Availability (AVAIL)
Availability is the probability that the system is applicable for use at a given time. It takes into
account the repair time & the restart time for the system. An availability of 0.995 means that
in every 1000 time units, the system is feasible to be available for 995 of these. The percentage
of time that a system is applicable for use, taking into account planned and unplanned
downtime. If a system is down an average of four hours out of 100 hours of operation,
its AVAIL is 96%.
The reliability growth model group measures and forecasts the improvement of reliability
programs through testing. The growth model depicts a system's dependability or failure rate as
a function of time or the number of test cases. The models in this category are listed below.
Coutinho Model
In the log-log paper, Coutinho charted the cumulative number of defects identified and the
number of corrective measures taken vs. the cumulative testing weeks. Let N(t) represent the
total number of failures and t represent the entire testing duration. The model's failure rate,
lambda (t), may be represented as,
where β0 and β1 are model parameters. This model's parameters may be estimated using the
least-squares approach.
where alpha0: and alpha1: are unidentified parameters The number of test cases or total testing
time can be used to calculate the function b(t). Similarly, at time t, the failure rate function is
given by,
Wall and Ferguson evaluated their model using a variety of software failure data and
discovered that the failure data correlated well with the model.
*****