Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Evaluation of Runtime Monitoring Methods forReal-Time Event Streams
Biao Hu, Dr. Kai Huang, Gang Chen,Prof. Dr. Alois Knoll
Technische Universitat MunchenDepartment of Informatics
Robotics and Embedded Systems
Jan. 21. 2015
Biao Hu 1 / 31
Overview
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 2 / 31
Outline
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 3 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Motivation
Real-time system at runtime
Why real-time system needs to be monitored?
All inputs are assumed as the design specifications
The increasing complexity of system
Unexpected runtime behaviors happen
Monitor is used to guarantee the system runtime behaviors
What monitors do?
System events are monitored
Violation is reported by the monitor
Biao Hu 4 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Subject of this paper
State-of-art
Dynamic counters (Kai et.al, 2011)
l-repetitive function (Neukirchner et.al, 2012)
Contributions
Analyzed the differences of dynamic counters and l-repetitivefunction
Developed a new approach to apply dynamic counters tomonitor periodic-burst events
Prototyped hardware implementations on FPGA andpresented FPGA resource usage
Biao Hu 5 / 31
Outline
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 6 / 31
Arrival Curve (Modular Performance Analysis)
Arrival curve: Event stream model,
αl(t − s) ≤ R[s, t) ≤αu(t − s), ∀t ≥ s ≥ 0, where
R[s, t) denote the number of events
in the time interval s ≤ τ < t.
System view of the M-JPEG
encoder
The corresponding RTC-MPA modelBiao Hu 7 / 31
Arrival Curve (Modular Performance Analysis)Arrival curve: Event stream model,
αl(t − s) ≤ R[s, t) ≤αu(t − s), ∀t ≥ s ≥ 0, where
R[s, t) denote the number of events
in the time interval s ≤ τ < t.
System view of the M-JPEG
encoder
The corresponding RTC-MPA modelBiao Hu 7 / 31
Distance Function (Compositional Performance Analysis)
Minimum/maximum distance function
The minimum distance function dmin(n) specifies the minimum distance
between n + 1 consecutive events in an event stream.
The maximum distance function dmin(n) specifies the maximum distance
between n + 1 consecutive events in an event stream.
An example: periodic events with jitter
Arrival Curve
(a) Upper Arrival Curves : αu(∆) = b∆+Jδ c
(b) Lower Arrival Curves : αl(∆) = max{0, b∆−Jδ c
Distance Function
(a) Minimum Distance Functions : dmin(n) = max{0, n · δ − J}(b) Maximum Distance Functions : dmax(n) = n · δ + J
Biao Hu 8 / 31
Distance Function (Compositional Performance Analysis)
Minimum/maximum distance function
The minimum distance function dmin(n) specifies the minimum distance
between n + 1 consecutive events in an event stream.
The maximum distance function dmin(n) specifies the maximum distance
between n + 1 consecutive events in an event stream.
An example: periodic events with jitter
Arrival Curve
(a) Upper Arrival Curves : αu(∆) = b∆+Jδ c
(b) Lower Arrival Curves : αl(∆) = max{0, b∆−Jδ c
Distance Function
(a) Minimum Distance Functions : dmin(n) = max{0, n · δ − J}(b) Maximum Distance Functions : dmax(n) = n · δ + J
Biao Hu 8 / 31
Distance Function (Compositional Performance Analysis)
Minimum/maximum distance function
The minimum distance function dmin(n) specifies the minimum distance
between n + 1 consecutive events in an event stream.
The maximum distance function dmin(n) specifies the maximum distance
between n + 1 consecutive events in an event stream.
An example: periodic events with jitter
Arrival Curve
(a) Upper Arrival Curves : αu(∆) = b∆+Jδ c
(b) Lower Arrival Curves : αl(∆) = max{0, b∆−Jδ c
Distance Function
(a) Minimum Distance Functions : dmin(n) = max{0, n · δ − J}(b) Maximum Distance Functions : dmax(n) = n · δ + J
Biao Hu 8 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
Dynamic counter
Assumption
Any monotonous and time-invariant arrival curve can be conservativelyapproximated as the minimum on a set of staircase functions with theform αu
i (∆) = Nui + b∆
δic.
∀∆ ∈ R≥0 : αu(∆) ≥ mini=1..n
(αui (∆))
Method: one dynamic counter is responsible for monitoringone staircase function
DC1 ↔ α1
DC2 ↔ α2
DC3 ↔ α3
min(DC1,DC2,DC3) ↔min(α1, α2, α3)
Biao Hu 9 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4
Biao Hu 10 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4
b
b
b
b
b
b
b
b
1ms
2ms
3ms
4ms
5ms
6ms
7ms
8ms
9ms
10ms
11ms
12ms
1 2 3 4 5 6 7 8
d(n)
n
1
Biao Hu 10 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4
b
b
b
b
b
b
b
b
1ms
2ms
3ms
4ms
5ms
6ms
7ms
8ms
9ms
10ms
11ms
12ms
1 2 3 4 5 6 7 8
d(n)
nd1
d1
1
Biao Hu 10 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4
b
b
b
b
b
b
b
b
1ms
2ms
3ms
4ms
5ms
6ms
7ms
8ms
9ms
10ms
11ms
12ms
1 2 3 4 5 6 7 8
d(n)
nd1
d2
d1d2
1
Biao Hu 10 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4
b
b
b
b
b
b
b
b
1ms
2ms
3ms
4ms
5ms
6ms
7ms
8ms
9ms
10ms
11ms
12ms
1 2 3 4 5 6 7 8
d(n)
nd1
d2d3
d1d2
d3
1
Biao Hu 10 / 31
l-repetitive function
DefinitionA l-repetitive function is a special minimum distance function that
satisfies: d(n) =
dn(given), n ≤ l ,
maxω∈[1,l ]
(d(ω) + d(n − ω)), n > l .
Method: by constructing l-repetitive function, only the arrivaltime of most recent l events needs to be kept.
current time - trace buffer[1] < d1
current time - trace buffer[2] < d2
current time - trace buffer[3] < d3
current time - trace buffer[4] < d4b
b
b
b
b
b
b
b
1ms
2ms
3ms
4ms
5ms
6ms
7ms
8ms
9ms
10ms
11ms
12ms
1 2 3 4 5 6 7 8
d(n)
nd1
d2d3
d4
d1d2
d3
d4
1
Biao Hu 10 / 31
Outline
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 11 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Standard arrival events (Richter et al., 2003)
Periodic events, Sporadic events, Periodic events withjitter,Periodic burst events.
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
d− 2d− 3d− 4d−
#event
∆0
αu(∆)
αl(∆)
1
1
2
3
4
δ 2δ 3δ 4δ
#event
∆0
αu(∆)
αl(∆)
1
123456
δ 2δ 3δ 4δ 5δ 6δ 7δ 8δ 9δ10δ
#event
∆0
αu(∆)
αl(∆)
1
Periodic events & Sporadic events
1 Periodic events
Arrival Curve: αu(∆) = d∆δ e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · δ, l = 1.
2 Sporadic events
Arrival Curve: αu(∆) = d ∆d− e, only needs one dynamic counter
Minimum Distance Function: d(n) = n · d−, l = 1.
Biao Hu 12 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}When J is greater than δ, an initial burst N happens.
1
2
3
4
5
δ 2δ 3δ 4δ
#event
∆0 δ − J
α = 1 + ⌊∆+Jδ ⌋
α = 1 + ⌊∆δ ⌋
1
b
b
b
b
b
ut
ut
ut
ut
ut
δ
2δ
2δ
4δ
1 2 3 4 5
d(n)
n
δ − J
0
1
Biao Hu 13 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}When J is greater than δ, an initial burst N happens.
1
2
3
4
5
δ 2δ 3δ 4δ
#event
∆0 δ − J
α = 1 + ⌊∆+Jδ ⌋
α = 1 + ⌊∆δ ⌋
1
b
b
b
b
b
ut
ut
ut
ut
ut
δ
2δ
2δ
4δ
1 2 3 4 5
d(n)
n
δ − J
0
1
Biao Hu 13 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}
When J is greater than δ, an initial burst N happens.
1
2
3
4
5
δ 2δ 3δ 4δ
#event
∆0 δ − J
α = 1 + ⌊∆+Jδ ⌋
α = 1 + ⌊∆δ ⌋
1
b
b
b
b
b
ut
ut
ut
ut
ut
δ
2δ
2δ
4δ
1 2 3 4 5
d(n)
n
δ − J
0
1
Biao Hu 13 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}When J is greater than δ, an initial burst N happens.
1
2
3
4
5
δ 2δ 3δ 4δ
#event
∆0 δ − J
α = 1 + ⌊∆+Jδ ⌋
α = 1 + ⌊∆δ ⌋
1
b
b
b
b
b
ut
ut
ut
ut
ut
δ
2δ
2δ
4δ
1 2 3 4 5
d(n)
n
δ − J
0
1
Biao Hu 13 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}When J is greater than δ, an initial burst N happens.
1
2
3
4
5
δ 2δ 3δ 4δ
#event
∆0 δ − J
α = 1 + ⌊∆+Jδ ⌋
α = 1 + ⌊∆δ ⌋
1
b
b
b
b
b
ut
ut
ut
ut
ut
δ
2δ
2δ
4δ
1 2 3 4 5
d(n)
n
δ − J
0
1
Biao Hu 13 / 31
Periodic events with jitter
Definition
1 Arrival Curve: α(∆) = d∆+Jδ e = N + b∆+J′
δ c, (0 < J ′ < δ)
2 dmin(n) = max{0, n · δ − J}When J is greater than δ, an initial burst N happens.
The jitter always exist when using dynamic counters orl -repetitive function
1 Only one dynamic counter
2 l = 1 for l-repetitive function
Biao Hu 14 / 31
Periodic burst events
0
123b56789
#Events
(b− 1)d 2δδ ∆
1
Definition
αu(∆) = b∆δ cb + min(d∆−d∆
δ ebd e, b)
where d is the minimum timing
separation, b is the maximum events
within an interval δ.
Monitoring method
1 l-repetitive function: l = b
2 dynamic counters: ?
Biao Hu 15 / 31
Periodic burst events
0
123b56789
#Events
(b− 1)d 2δδ ∆
1
Definition
αu(∆) = b∆δ cb + min(d∆−d∆
δ ebd e, b)
where d is the minimum timing
separation, b is the maximum events
within an interval δ.
Monitoring method
1 l-repetitive function: l = b
2 dynamic counters: ?
Biao Hu 15 / 31
Dynamic counters
Periodic burst is equivalent to a staircase function with aperiod d , and the constraint of b staircase functions with aperiod of δ.
Biao Hu 16 / 31
Dynamic counters
0
123b56
#Events
(b− 1)d δ ∆
=
0
123b56
#Events
(b− 1)d ∆ 0
123b56
#Events
δ ∆
∧ b ×
1
Periodic burst is equivalent to a staircase function with aperiod d , and the constraint of b staircase functions with aperiod of δ.
Biao Hu 16 / 31
Dynamic counters
0
123b56
#Events
(b− 1)d δ ∆
=
0
123b56
#Events
(b− 1)d ∆ 0
123b56
#Events
δ ∆
∧ b ×
1
Periodic burst is equivalent to a staircase function with aperiod d , and the constraint of b staircase functions with aperiod of δ.
Biao Hu 16 / 31
A case study of monitoring periodic burst by dynamiccounters
Periodic burst is equivalent to a staircase function with a period d , and
the constraint of b staircase functions with a period of δ.
A case simulation: b = 6, δ = 180, and d = 20
Biao Hu 17 / 31
A case study of monitoring periodic burst by dynamiccounters
Periodic burst is equivalent to a staircase function with a period d , and
the constraint of b staircase functions with a period of δ.
A case simulation: b = 6, δ = 180, and d = 20
0 50 100 150 200 2500
2
4
6
8
10
∆[µs]
#eve
nt
αuPB
R
R*
VD
(e1, e2, e3)
e∗
1
e∗
2
e∗
3
Biao Hu 17 / 31
Complex arrival curve of Type 1
Arrival curve is the minimum of a set of staircase functions, i.e.,
αu = mini=1:n{αu
i }, where αi = Nui + b∆
δic (Nu
i < Nui+1, δi < δi+1)
1 Dynamic counters: n counters
2 l-repetitive function: ?
Biao Hu 18 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
Arrival curve is the minimum of a set of staircase functions, i.e.,
αu = mini=1:n{αu
i }, where αi = Nui + b∆
δic (Nu
i < Nui+1, δi < δi+1)
1 Dynamic counters: n counters
2 l-repetitive function: ?
Biao Hu 18 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
Arrival curve is the minimum of a set of staircase functions, i.e.,
αu = mini=1:n{αu
i }, where αi = Nui + b∆
δic (Nu
i < Nui+1, δi < δi+1)
1 Dynamic counters: n counters
2 l-repetitive function: ?
Biao Hu 18 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
Arrival curve is the minimum of a set of staircase functions, i.e.,
αu = mini=1:n{αu
i }, where αi = Nui + b∆
δic (Nu
i < Nui+1, δi < δi+1)
1 Dynamic counters: n counters
2 l-repetitive function: ?
Biao Hu 18 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
For l-repetitive function
1 Assume the repetitive segment is αgl that is given in the
offline analysis. αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
2 lim∆=+∞
{ mini=1..n
{αi}(∆)− αl(∆)} = Nux + b ∆
δmaxc − ∆
dll ≥ 0. ⇒
dl ≥ l · δmax .
Biao Hu 19 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For l-repetitive function
1 Assume the repetitive segment is αgl that is given in the
offline analysis. αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
2 lim∆=+∞
{ mini=1..n
{αi}(∆)− αl(∆)} = Nux + b ∆
δmaxc − ∆
dll ≥ 0. ⇒
dl ≥ l · δmax .
Biao Hu 19 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For l-repetitive function
1 Assume the repetitive segment is αgl that is given in the
offline analysis. αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
2 lim∆=+∞
{ mini=1..n
{αi}(∆)− αl(∆)} = Nux + b ∆
δmaxc − ∆
dll ≥ 0. ⇒
dl ≥ l · δmax .
Biao Hu 19 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For l-repetitive function
1 Error percent (EP): EP(∆) =∫ ∆
0 (αu(t)−αa(t))dt∫ ∆0 αu(t)dt
.
Biao Hu 20 / 31
Complex arrival curve of Type 1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
error
1
For l-repetitive function
1 Error percent (EP): EP(∆) =∫ ∆
0 (αu(t)−αa(t))dt∫ ∆0 αu(t)dt
.
Biao Hu 20 / 31
Complex arrival curve of Type 2
Arrival curve is segmentally repetitive, and each segment is sub-additive,
i.e., αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
1 Dynamic counters: ?
2 l-repetitive function: l
Biao Hu 21 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
Arrival curve is segmentally repetitive, and each segment is sub-additive,
i.e., αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
1 Dynamic counters: ?
2 l-repetitive function: l
Biao Hu 21 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
Arrival curve is segmentally repetitive, and each segment is sub-additive,
i.e., αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
1 Dynamic counters: ?
2 l-repetitive function: l
Biao Hu 21 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
Arrival curve is segmentally repetitive, and each segment is sub-additive,
i.e., αl(∆) =
{αgl (∆)(given), if ∆ ≤ dl ,
αgl (∆− k · dl), if ∆ > dl .
1 Dynamic counters: ?
2 l-repetitive function: l
Biao Hu 21 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
For dynamic counters
1 Assume a set of staircase functions ( mini=1..n
{αi},αi = Nu
i + b∆δic) is used to approximate αl , where
δmax = maxi=1..n
{δi}.
2 lim∆=+∞
{ mini=1..n
{αl(∆)− αi}(∆)} = ∆dll − Nu
x − b ∆δmaxc ≥ 0 ⇒
dl <= l · δmax .
Biao Hu 22 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For dynamic counters
1 Assume a set of staircase functions ( mini=1..n
{αi},αi = Nu
i + b∆δic) is used to approximate αl , where
δmax = maxi=1..n
{δi}.
2 lim∆=+∞
{ mini=1..n
{αl(∆)− αi}(∆)} = ∆dll − Nu
x − b ∆δmaxc ≥ 0 ⇒
dl <= l · δmax .
Biao Hu 22 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αl
dl
l
αgl (given)
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For dynamic counters
1 Assume a set of staircase functions ( mini=1..n
{αi},αi = Nu
i + b∆δic) is used to approximate αl , where
δmax = maxi=1..n
{δi}.
2 lim∆=+∞
{ mini=1..n
{αl(∆)− αi}(∆)} = ∆dll − Nu
x − b ∆δmaxc ≥ 0 ⇒
dl <= l · δmax .
Biao Hu 22 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
For dynamic counters
1 Error percent (EP): EP(∆) =∫ ∆
0 (αl (t)−αa(t))dt∫ ∆0 αl (t)dt
.
Biao Hu 23 / 31
Complex arrival curve of Type 2
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
1
1
2
3
4
5
6
7
1 2 3 4 5 6 7 8 9 10 11 12
#event
∆
αu = mini=1:n
{αui }
αl
dl
l
αgl (given)
error
1
For dynamic counters
1 Error percent (EP): EP(∆) =∫ ∆
0 (αl (t)−αa(t))dt∫ ∆0 αl (t)dt
.
Biao Hu 23 / 31
A case study
Specifications
Input EventsI1: periodic (P = 60ms)I2: periodic (P = 5ms)I3: periodic (P = [60..110]ms)
Execution times T1: 35ms, T2: 2ms, T3: 4ms, T4: 12msschedulingparameters
priority T1: high, priority T2: lowpriority T3: low, priority T4: high
Arrival curve in Monitor 1 Arrival curve in Monitor 2
Biao Hu 24 / 31
A case study
Specifications
Input EventsI1: periodic (P = 60ms)I2: periodic (P = 5ms)I3: periodic (P = [60..110]ms)
Execution times T1: 35ms, T2: 2ms, T3: 4ms, T4: 12msschedulingparameters
priority T1: high, priority T2: lowpriority T3: low, priority T4: high
Arrival curve in Monitor 1 Arrival curve in Monitor 2
Biao Hu 24 / 31
A case study
1 2 3 4 5 6 70.94
0.95
0.96
0.97
0.98
0.99
1
Number of dynamic counters
l-EP
∆=5000 ms∆=2500 ms∆=1200 ms
Result in monitor 1 by dynamic
counters
1 2 3 4 5 6 7 8 9 100.94
0.95
0.96
0.97
0.98
0.99
1
l-repetitive: l
l-EP
∆=5000 ms∆=2500 ms∆=1200 ms
Result in monitor 1 by l-repetitive
function
The needed number of dynamic counters or l in repetitive segment withrespect to the period of input I3.
period [ms] 60 70 80 90 100 110#DC 13 16 18 21 23 25l 12 15 17 20 22 24
Biao Hu 25 / 31
A case study
1 2 3 4 5 6 70.94
0.95
0.96
0.97
0.98
0.99
1
Number of dynamic counters
l-EP
∆=5000 ms∆=2500 ms∆=1200 ms
Result in monitor 1 by dynamic
counters
1 2 3 4 5 6 7 8 9 100.94
0.95
0.96
0.97
0.98
0.99
1
l-repetitive: l
l-EP
∆=5000 ms∆=2500 ms∆=1200 ms
Result in monitor 1 by l-repetitive
function
The needed number of dynamic counters or l in repetitive segment withrespect to the period of input I3.
period [ms] 60 70 80 90 100 110#DC 13 16 18 21 23 25l 12 15 17 20 22 24
Biao Hu 25 / 31
Outline
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 26 / 31
Setup
Prototype both approaches in ALTERA Cyclone III EP3C120F780
Processor frequency: 50 MHz
Timer bits: 16 bit
Biao Hu 27 / 31
Setup
Prototype both approaches in ALTERA Cyclone III EP3C120F780
Processor frequency: 50 MHz
Timer bits: 16 bit
Biao Hu 27 / 31
FPGA Resource
Resource usage with the number of dynamic counters or l in l-repetitivefunction
1 2 3 4 5 60
100
200
300
Number of dynamic counters
Logic ElementsRegistersLABs
Dynamic counters
5 10 15 20 25 300
200
400
600
800
1000
l-repetitive: l
Logic ElementsRegistersLABs
l-repetitive function
Biao Hu 28 / 31
FPGA Resource
Resource usage with the length of repetitive segment
0 1 2 3 4 50
50
100
150
200
250
300
Length of repeat segment (log(dl) [µs])
Logic ElementsRegistersLABs
Dynamic counters
0 1 2 3 4 50
50
100
150
200
250
300
Length of repeat segment (log(dl) [µs])
Logic ElementsRegistersLABs
l-repetitive function
Biao Hu 29 / 31
Outline
1 Motivation
2 Background
3 ComparisonComparison based on standard arrival curvesComparison based on complex arrival curves
4 FPGA evaluations
5 Summary
Biao Hu 30 / 31
Summary
1 Analyzed the difference of dynamic counters monitoring andl-repetitive function monitoring by using standard arrivalcurves, and two typical complex arrival curves.
2 Developed a new monitoring scheme for dynamic counters tomonitor periodic burst events
3 Prototyped the two monitoring approaches in FPGA, andfound resource overhead is more sensitive to the number ofdynamic counters, and not sensitive to the length of onerepetitive segment.
Biao Hu 31 / 31
Summary
1 Analyzed the difference of dynamic counters monitoring andl-repetitive function monitoring by using standard arrivalcurves, and two typical complex arrival curves.
2 Developed a new monitoring scheme for dynamic counters tomonitor periodic burst events
3 Prototyped the two monitoring approaches in FPGA, andfound resource overhead is more sensitive to the number ofdynamic counters, and not sensitive to the length of onerepetitive segment.
Biao Hu 31 / 31
Summary
1 Analyzed the difference of dynamic counters monitoring andl-repetitive function monitoring by using standard arrivalcurves, and two typical complex arrival curves.
2 Developed a new monitoring scheme for dynamic counters tomonitor periodic burst events
3 Prototyped the two monitoring approaches in FPGA, andfound resource overhead is more sensitive to the number ofdynamic counters, and not sensitive to the length of onerepetitive segment.
Biao Hu 31 / 31
Summary
1 Analyzed the difference of dynamic counters monitoring andl-repetitive function monitoring by using standard arrivalcurves, and two typical complex arrival curves.
2 Developed a new monitoring scheme for dynamic counters tomonitor periodic burst events
3 Prototyped the two monitoring approaches in FPGA, andfound resource overhead is more sensitive to the number ofdynamic counters, and not sensitive to the length of onerepetitive segment.
Biao Hu 31 / 31