Top Banner
Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research EDCC Valencia 2010
28

Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

Apr 02, 2015

Download

Documents

Maximo March
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense,

although not Necessarily in that order

Brendan MurphyMicrosoft Research

Page 2: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Talk ContentMetrics and

Measurements

Models Interpretation

Are People a problem?

Page 3: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Tandem Systems availability1985 – 1990 (Jim Gray)

• Fault Tolerant Systems• Highly trained System Managers and

Service Engineers• Systems sent failures to Tandem• Findings

– “Operations is a significant cause of outages, second only to software”

– “Operators are people, they will not be less faulty in the future”

Page 4: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Monitoring DEC Server Systems

• Reality did not match the theory– System reality is impact by product

quality therefore static

• System Reality is periodic– Daily– Weekly– Monthly– Quarterly

Page 5: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Monitoring DEC Server Systems

Cause Of System Crashes

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

1985 1993

Changes Over Time

Per

cen

tag

e O

f C

rash

es

Others

System Management

Softw are Failure

Hardw are Failure

The underlying trend was operators increasingly causing crashes

System and Network complexity madematters worse

Cause Of System Interruptions

90%

1%2%

7%

Operator Shutdowns

Hardware CrashesSoftware Crashes

Other Crashes

Crashes only represent 10% of allOutages!

Availability driven by controlledshutdowns!

Murphy Gent 1995 Q&RE

Page 6: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Measuring OS on DEC Servers

Reliability of Operating Systems

Post installation Period

AR

E Version A

Version B

Version A has a higher reliability than Version B

Slow ARE improvements identifies this version as being difficult to install

Goodness

System reliability increases dramatically in the days following installation Reliability continues to improve

over the next 5 months

Murphy Gent 1995 Q&RE

Page 7: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Reliability of Microsoft Software

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

1 2 3 4 5 6 7 8 9 10 11

Number of months

Fa

ilu

re R

ate Model

Data Average

Software reliability always improve in the months following installationImprovement not due to software patches

Improvement due to changes in usage profile

Jalote, Murphy, Sharma TOSEM

Page 8: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Do humans only impact failures due to usage.

• The reliability of the released system and software are heavily dependent on the usage profile.

• Is the underlying software quality based purely on development process?– Do human factors have a significant

impact?– If so how do you feed this into a model?

Page 9: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Metrics and Measurements

“The people who cast votes decide nothing. The people who count the votes decide everything” Joseph Stalin

Page 10: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Measurement Objectives

• Tracking the Project– Project Managers can interpret most data

• Identify Exceptions– Cross correlation of data to identify

exceptions or gaming

• Predictions– Completion dates and release quality– Verify on past projects.

Page 11: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Problems with tracking Metrics

• Metrics collected through software tools– Metrics often a By-Product– Tools evolved as do the metrics

• Making historical comparisons difficult

• People / organizations adapt– Peoples behaviour changes based on the

problem being addressed– People/ Organizations learn from past

mistakes

Page 12: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Software Churn Initial “Gold Standard” Metric

• Lehman and Belady identified its importance in 1960’s

• Measure code rather than Binary churn• Key attributes

– Churn frequency– Amount of churn– Frequency of repetitive churn– Late Churn

Page 13: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Churn Correlates to Failures

Use of Relative Code churn measures to predict System Defect Density, ICSE 2005Nagappan, Ball (Microsoft)

Page 14: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Metrics Monitored in Windows

• Test Coverage– Arc / Block coverage reflecting testing– Testing focuses on problem areas so may be

symptomatic rather than a predictor of quality!

• Bugs– Identified through in-house testing and Beta feedback– Difficulty in identifying bug severity!– Beta testers not necessarily reflecting user base

• Code Complexity– OO and non OO metrics– Measures often reflect ease of testing!

Page 15: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Metrics Monitored in Windows

• Dependencies– Direct and indirect dependencies reflect impact of change– Binaries cluster into three categories

• Architectural Layering– Does not distinguish hardware interfaces

• Code Velocity– Time code exists in the system before being checked into

the main branch– Process rather than quality measure

• Legacy Code– Legacy code is either very good or a potential time bomb!

Page 16: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Organizational Structure Metrics

• Propose eight measures that quantify organizational complexity capturing issues such as – Organizational distance of the developers– The number of developers working on a component– Component changes within the context of an

organization

• Organizational structure not taken literally– Structure reflects logical rather than actual structure

Page 17: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

“The ability to foretell what is going to happen tomorrow, next week, next month, next year. And to have the ability afterwards to explain why it didn’t happen” Winston Churchill on politicians

Models

Page 18: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Building the Models

• Various methods have been used to build the models– Bayesian, Step- wise regression

• Technique applied does not make that big a difference

• Train and verify the model on a past product, apply to future products

• Initial focus was developing models for Vista– Pre usage of People data

Page 19: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Initial results of the Risk Model

Training data

Win 2003 Win XP SP1 Win XP SP2

Win 2003 73% 60% 67%

Win XP SP1 64% 76% 64%

Win XP SP2 71% 20% 89%

Win 2003 SP1 RC

78% 96% 70%

Page 20: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Initial Interpretation of Results

• Variation in the objectives of releases– Main Releases are feature focused

• New features create usage issues

– Service Packs are risk adverse

• Variations between client and server software– Management, usage profile and hardware

• Ignoring vital areas– Engineers

Page 21: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Developing Models using Vista

• Developed models for predicting product status– Achieved accuracy late in the development

cycle

• Developed Organizational Metrics– Focus is to enhance Churn Metrics

• Verify the predictability of the Organizational Metrics– Predict the post release failure rate based on

single metrics

Page 22: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Accuracy of Metrics as PredictorsEach attribute characterized by a set of metric

All metrics correlated against failures

Model Precision Recall

Organization Structure

86.2% 84.0%

Churn 78.6% 79.9%

Complexity 79.3% 66.0%

Dependencies 74.4% 69.9%

Coverage 83.8% 54.4%

Pre-Release Bugs 73.8% 62.9%

Page 23: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

“I was gratified to be able to answer promptly and I did. I said I didn’t know” Mark Twain, Life on the Mississippi.

Interpretation

Page 24: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Why Org Structure Matter

Org A

Org DOrg C

Org B

Bug FixNew Feature

BinaryLow Risk

High RiskUnknown

HighRisk

Known

Page 25: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Applied Models to Windows 7

• Tracking Project Status– Knowledge gained from cross correlating metrics

• Providing Real Time Data– No point identifying historical risk!

• Risk Assessment– Adapt to changes in Org structure and project

management

• Verification of models once failure profile is known

Page 26: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Problem in Building Risk Models

• Predicting the Future• Telling good Engineers something

they don’t already know– Known Problematic area

• Areas interfacing with hardware– Win 7 must work with existing hardware and not

all hardware follows specs!

• New complicated areas• Areas with a track record of problems

Page 27: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

Summary

• Humans impact reliability• Building knowledge is more important than

models– Getting papers into conf/ Journals is far easier than

getting engineers to value your results.

• Developing accurate risk models is difficult – Ensuring they provide useful and timely data is the real

problem

• Writing complex software is difficult – So its highly unlikely that a simple model will capture

that complexity!

Page 28: Developing Risk Models Requires Mathematics, Domain Knowledge and Common Sense, although not Necessarily in that order Brendan Murphy Microsoft Research.

EDCC Valencia 2010

QUESTIONS?