CS-280 Lecture

SE-3910
Real-time Systems
• Week 9, Classes 1 and 2
– Announcement* (regexp style)
– Significance Testing
– Failure statistics
– Data flow diagrams
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling, Some from Dr.
Hornick, etc.
1
3-Question Review Quiz
• http://www.polleverywhere.com/survey/Beo1
ZC-L5
• (See following slides for source material)
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
2
Normal Distribution
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
3
Normal Distribution (alternate)
SE-3910 - Dr. Josiah Yoder
http://education-portal.com/academy/lesson/normal-distribution-of-dataSlide style: Dr. Hornick
examples-definition-characteristics.html#lesson
Much Material: Dr. Schilling
4
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
5
SE-3910 - Dr. Josiah Yoder
http://www.stat.ufl.edu/~athienit/Tables/Zta
Slide style: Dr. Hornick
ble.pdf
Much Material: Dr. Schilling
6
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
7
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
8
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
9
Determining if two processes are
“significantly” different
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
10
In-Class Example
• Suppose two processes have measured means
of 12s and 13s runtime (measured from 8
samples each), and we know the standard
deviation ACTUALLY IS 1 s.
– Construct a statistic for determining if this is
significant
– Provide a confidence interval on said statistic with
p=0.01
– What is the p-value for this result?
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
11
Zoomed-in t table
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
12
Modified process (1)
• Suppose we don’t know what the standard
deviation is…
– What do we do?
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
13
Modified process (2)
• What do we do? (if we don’t know the true std.)
– Estimate it!
– But there is a side-effect. Our estimate has some
error as well.
– This increases the size of our confidence interval.
– By how much? Enter the t-test!
14
Modified process (3)
– Use the same confidence approach as before,
except:
• Simply replace the “true” with the standard
• And use one of the “df” (degrees of freedom) rows
from the table
• For difference of means, df = 2(N – 1) = 2N – 2
• Where N is the number of samples
– Use exactly the same formula for z:
• z = 𝑁/2 (𝑚2 − 𝑚1 )/𝜎
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
15
Zoomed-in t table
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
16
In-Class Activity
• Suppose two processes have a mean of 12.5
ms and 15ms runtime (with 5 samples for
each), and we know the standard deviation
ACTUALLY IS 2 ms
Is this significant at the p = 0.01 level?
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
17
Example
• An airplane software system has a failure
probability of 10-6 failures per hour. What is
the probability of reliable operation for a 10
hour flight?
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
18
Example
• An airplane software system has a failure
probability of 10-9 per hour. Supposing this
failure will cause the plane to crash. What is
the chance that the plane will crash within the
year if it flies 2400 hours a year?
• Compute assuming both independent and
dependent.
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
19
SE-3910 - Dr. Josiah Yoder
Slide style: Dr. Hornick
Much Material: Dr. Schilling
20
Data flow diagrams
• Entity
– An entity is the source or destination of data.
– The source in a DFD represents these entities that are outside
the context of the system.
– Entities either provide data to the system (referred to as a
source) or receive data from it (referred to as a sink).
• Process
– The process is the manipulation or work that transforms data,
performing computations, making decisions (logic flow), or
directing data flows based on business rules. Data Store
• Data Store
– A data store is where a process stores data between processes
for later usage by the same process or another process.
• Data Flow
– Data flow is the movement of data between the entity, the
process, and the data store. Data flow portrays the interface
between the components of the DFD.
SE3910 Real Time Systems
Data Flow Diagram Symbols
SE3910 Real Time Systems
Case study: Traffic Control
• We are going to walk through the design
of a Traffic Control System
– Starting with the needs of the system.
– We want to talk about how data flows
through the system.
SE3910 Real Time Systems
An Intersection System
SE3910 Real Time Systems
Intersection Control Diagram
SE3910 Real Time Systems
Dataflow diagram
SE3910 Real Time Systems
Data Dictionary
• An essential aspect of a structured design
– Includes entries for data flows, control flows,
data stores, buffers, etc.
SE3910 Real Time Systems
Data Dictionary Example
SE3910 Real Time Systems
Discussion: Which software failure we have talked about should have been caught
using this approach?
SE3910 Real Time Systems
DFD – Practical Example
Launched Dec. 11, 1998, the Climate Orbiter plunged too steeply
into the Martian atmosphere Sept. 23, 1999, and either burned up or
crashed. In an initial failure report released Oct. 15, 2000 the review
board blamed the navigation error on a communications foul-up
between NASA's Jet Propulsion Laboratory and prime contractor
Lockheed Martin.
Who was
responsible
for this task?
Transfer of Flight Control Data
This process
was missing
JPL-1
?
?
LM-1
Collect,
analyze,
generate flight
control data
Transfer data
Convert data
from Metric to
English
Control
spaceflight
Metric data
J1
JPL store
English data
LM1
LM store