Lect.15 - Software Engineering Laboratory

Download Report

Transcript Lect.15 - Software Engineering Laboratory

ECE 355: Software Engineering
CHAPTER 11
Part I
Course outline
• Unit 1: Software Engineering Basics
• Unit 2: Process Models and Software Life Cycles
• Unit 3: Software Requirements
• Unit 4: Unified Modeling Language (UML)
• Unit 5: Design Basics and Software Architecture
• Unit 6: OO Analysis and Design
• Unit 7: Design Patterns
 Unit 8: Testing and Reliability
• Unit 9: Software Engineering Management and Economics
Overview
Software Reliability
– What Is Software Reliability?
– Basic concepts
– Models
Software Reliability
• What Is Software Reliability?
– Defn.: Probability(failure-free op, specified time, given
environment)  P(t)
– Affected by development process—not ageing/
manufacturing
• Uses
– Criterion for technology evaluation: expensive
– Project management: ready to release? More test?
– Size of change: change decreases reliability
Basic Concepts
• Failure and fault
– Failure: departure of external results of program operation
– Fault: cause of failure that is a defect in the code (localized or not)
• Time
– Execution time (t)
– Calendar time (t): meaningful to managers
• Characterizing failure occurrence in time
–
–
–
–
Time of failure: instant
Time interval between failures
Cumulative failures up to a given time
Failures in a time interval
Basic Concepts
Software System
Random process
Failure behavior:
- # of faults in the SW
- Exec environment (run types)
Failures
• Average Total Number of Failures: μ(τ),
• Failure Intensity – Number of Failures per time unit : λ(τ)
•Mean Time to Failure 1/λ(τ)
Reliability Models
(of Musa)
• Assumptions
• Two models
– Basic
– Logarithmic
• Diff: Change in failure intensity per failure
seen
– Basic: decrement is constant
– Logarithmic: decrement reduces
Assumptions for the Basic
Reliability Model
•
Faults are independent and distributed with constant rate of encounter
•
Well mixed types of instructions execution time between failures is large
compared to instruction execution time
•
Test space covers use space
•
Tests selected from a complete set of use input sets
•
Set of inputs for each run selected randomly
•
All failures are observed implied by our definition of failure
•
Fault causing failure is corrected immediately otherwise reoccurrence of that
failure is not counted
Basic (Linear) Model
• Assumption: decrement in failure intensity
function derivative w.r.t. number of
expected failures) is constant
• Consequence: failure intensity is function of
average number of failures experienced at
any given point in time failure probability
Logarithmic Model
• Decrement per encountered failure decreases
• Θ is a failure intensity decay parameter
• Comparison of models:
– Basic model assumes that there is a failure intensity logarithmic model assumes convergence to 0 failure
intensity
– Basic model assumes a finite number of failures in the
system - logarithmic model assumes infinite number
Reliability Models
Basic model
Logarithmic model
λ: Failure intensity
λ0: Initial failure intensity
at start of execution
μ: Average total number of
failures at a given point
in time
v0: Total number of failures
over infinite time
l: failure intensity
l(m) = l0[1 - m/v0]
l(m) = l0exp(-qm)
q: failure intensity decay
Initial failure intensity, l0
Basic
Log.
v0
m: Mean failures exp.
Reliability Models
Basic model
Logarithmic model
m(t) = v0[1 – exp(-l0t/v0)]
m(t) = (1/q).ln(l0qt + 1)
l(t) = l0exp(-l0t/v0)
l(t) = l0/(l0qt + 1)
l
m
Log.
v0
Log.
Basic
Basic
t
t
Reliability Models
Example: Assume that a program will experience 100 failures in infinite time.
The initial failure intensity was 10 failures/CPU-hr, the
present failure intensity is 3.68 failures/CPU-hour and our
objective intensity is 0.000454 failure/CPU-hr.
Predict the additional testing time to achieve the stated objective.
Ans.:
We know that l(t) = l0exp(-l0t/v0)
At time t1, l(t1) = l0exp(-l0t1/v0) = lp
At time t2, l(t2) = l0exp(-l0t2/v0) =
lf
t2 - t1 = (v0/ l0).ln(lp/ lf)
v0 = 100 faults, l0 = 10 failures/CPU-hr
lp = 3.68 failures/CPU-hr, lf = 0.000454 failure/CPU-hr
Testing time = (t2 - t1 ) = 90 CPU-hr