slides

Mitra Nasri
Gerhard Fohler
Chair of Real-Time Systems
Technische Universität Kaiserslautern
Germany
July 2015

Many real-time systems have periodic behavior
◦ It guarantees certain levels of safety and QoS
Many
functionalities
Many choices for
periods and other
parameters
2 of 31
2 of 28
System
Schedulability
Period
Ranges
Period
Assignment
Designer
Many
Tasks
EDF
System
Utilization
3 of 31
RM
• Optimal
• Widely implemented
• Less overhead
• Overheads
• Utilization Loss
3 of 28
Optimally scheduled by RM
Exact WCRT has polynomial-time
Harmonic
Periods
computational complexity
Jitter is efficiently reduced
Small hyperperiod
Benefits for fault tolerant
mechanisms
4 of 31
Wide applicability in industries:
Avionics, submarines, robotics
44of
of 28
28
59
Assumptions
• Uniprocessor
• n periodic tasks (with implicit deadline)
• Each task has a period range
56
The goal
• Assign periods so that the task set is harmonic
𝑇𝑖𝑚𝑎𝑥
𝑇𝑖
𝑇𝑖𝑚𝑖𝑛
ci
21
15
15
×1
14
×2
13
×1
12
11
10
10
I1
5 of 31
20
40
40
39
30
28
26
53
I4
20
20
I3
13
I2
The next problem: how
to find an assignment
with U ≤ 1
5 of 28
5 of 28

Introduction

Related Work

Backward Approach

Experimental Results

Conclusion
6 of 31
6 of 28
6 of 28

Finding harmonic periods to verify schedulability [Han97]
◦ DCT algorithm
◦ Sr Algortihm

Minimizing hyperperiod by assigning periods from period
ranges [Ripoll13]

Our previous work: A forward approach to construct
customized harmonic relations from period ranges [Nasri14]
7 of 31
7 of 28
Related Work

DCT Algorithm
T4=68
If U ≤ 1, the task
set is schedulable
by RM
T2=25
T3=35
This method cannot
handle user defined
period ranges
T1=10
C3
C1=3
C4
C2
In Sr algorithm [Han97], the problem is the same, however, the ratio of two consecutive period must be of power of 2.
8 of 31
8 of 28
Related Work
The minimum hyperperiod of
a given set of period ranges
can be obtained by finding
the first intersection between
integer multiples of all period
ranges.
42
37
36
×2
30
24
20
9 of 31
12
10
10
30
30
26
×2
This method cannot
solve harmonic period
assignment problem!
33
×3
27
21
15
23
I3
I4
13
I2
I1
9 of 28
Related Work
∊ℕ
E
A
69
52
50
χ I{4,5,6}
→I
1
2
3
Projected
harmonic
zones
1
2
×6
×5
×4
×3
×2
13
10
10 of 31
I1
40
39
30
26
20
χ I →I
…
65
60
Integer
Multiples
Graph
Representation
[40, 69]
{4, 5, 6}
χ I2 →I
1
{3}
2
[30, 39]
[20, 26]
15
I2
…
x in a projected zone, y in I1 such that x
y
69
{2}
[10, 13]
I3
I4
I2
I1
10 of 28
Related Work

It is optimal
◦ If there exists a set of harmonic period assignments for a given set of intervals,
this method always finds one of them.

Computational complexity: Pseudo-Polynomial

In special cases, its computational complexity is Linear-Time
11 of 31
11
11of
of 28
28
Related Work | Perspective
…
m=8
340
Ii×m+2
306
300
272
270
Ii×m+1
Ii×m
Ii×2
Backward Approach
[Nasri14]
(This work)
Ii+1
O(n)
solution
Pseudopolynomial
Pseudopolynomial
O(n2 log(n))
solution
238
Ii×m-1
210
…
Above this border,
all integer multiples
of Ii will intersect
240
Forward Approach
68
60
Ii+1
34
Note: This condition must hold
for all input intervals.
12 of 31
30
Ii
12 of 28
Backward

Introduction

Related Work

Backward Approach

Experimental Results

Conclusion
13 of 31
13 of 28
13 of 28
Backward Approach
39

33
Integer multiples of an interval
y
30
26
Integer
Multiple

Projection origins of an intersection
13
 If they have intersection, we merge them.
x
E
A
14 of 31
I2
20
◦ Projection origins must partition target interval
x in a projection origin, y in the source interval such that
24
x
y
∊ℕ
12
11
10
I1
Projection
Origin
14 of 28
Backward Approach
50
×2
46
42
40
×2
28
26
22
×2
16
13
A
15 of 31
I3
I4
• For each interval from In to I1
• Find the intersections
• Obtain new projection origins
• Merge the new projection origins
if they have intersection
• If we could reach to I1 , there exists
a harmonic assignment
I2
I1
x in a projection origin,
E
8
23
21
11
• Consider In as the initial projection
origin
y in the source interval such that
x
y
∊ℕ
15 of 28
Backward Approach
50
40
28
25
23
20
I2
I4
28
I3
13
10
8
I1
E
A
16 of 31
x in a projection origin,
y in the source interval such that
x
y
∊ℕ
16 of 28
Backward Approach | Computational Complexity
Ii×m+1
Above this border,
all integer multiples
of Ii will intersect
Note: This condition
must hold for all
input intervals.
Ii×m
Ii+1
Pseudopolynomial
Ii×m-1
…
Ii×2
Ii+1
I4
O(n2 log(n))
solution
I3
Ii
I2
We show that in the worst-case, the
number of projection origins will be
increased by 1 in each step.
I1
17 of 31
17 of 28
Backward Approach | Computational Complexity
(c)
(b)
(a)
head
head
…
tail
…
…
tail
…
head
head
tail
…
Ii+1
…
tail
Ii+1
Ii+1
…
…
tail
tail
new
…
tail
head
head
Ii
Ii
Only 2 projection origins
for the next interval
new
We add one more
projection origin
head
Ii
We add one more
projection origin
In this case, in each step,
Only one projection origin will be added
18 of 31
No intersection between integer multiples
18 of 28
18 of 28
Backward Approach | Computational Complexity
k
×(a+1) ×a
×(a+k)
…
Ii+1
…
New Projection Origins
…
Ii
The number of new projection origins
depends on the number of intersecting integer multiples
19 of 31
19 of 28
Backward Approach | Other Contributions


Lower Bound
of Utilization
Deriving the utilization bounds
Dealing with integer value periods
I4
x
Upper Bound
I3 of Utilization
no integer
value here
…
I2
y
Final projection origin
Ii
20 of 31
Ii+1
This must be applied in each step
I1
20 of 28
…
Backward Approach | Perspective
Forward Approach
[Nasri14]
Ii×m+2
Ii×m+1
Ii+1
Ii×m
Note: This condition
O(n)
solution
Open
Problems
Pseudopolynomial
Ii+1
Ii×m-1
…
Above this border, all
integer multiples of Ii
will intersect
Backward Approach
(This work)
Ii×2
O(n2 log(n))
solution
Pseudopolynomial
Ii+1
No guarantee
for reasonable
computational
complexity
must hold for all input
intervals.
Ii
21 of 31
21 of 28

Introduction

Related Work

Backward Approach

Experimental Results

Conclusion
22 of 31
22 of 28
22 of 28
Experiments
σ is the wideness of periods with respect to their starting point
Forward [Nasri14]
DCT [Han97]
Each task set has 10 tasks.
For each data point, 10,000 task sets have been generated
23 of 31
Sr [Han97]
23 of 28
23 of 28
Experiments
B
A
For all tasks
Ii+1
For some tasks
For all tasks
…
Ii
24 of 31
C
Ii+1
Ii+1
24 of 28
24 of 28
Cost-M
Experiments
B
A
For all tasks
C
For some tasks
Ii+1
For all tasks
…
Ii
25 of 31
Ii+1
Ii+1
25 of 28
25 of 28

Introduction

Related Work

Backward Approach

Experimental Results

Conclusion
26 of 31
26 of 28
26 of 28

Introducing the backward approach which is an optimal method
to find harmonic period assignment

Discussing the differences between backward approach and the existing optimal
solution (forward approach [Nasri14]) in terms of computational complexity

Deriving utilization bound of the possible assignments

Handling integer value periods

Comparing the approaches based on their computational and memory costs
27 of 31
27
27of
of 28
28

Period assignment algorithm with user defined utilization

Tackling the open problem according to what we saw in the
experiments

Extending the framework to non-harmonic periods which still
guarantee RM schedulability
28 of 31
A Framework to Construct Customized
Harmonic Periods for RTS
28 of 25
28 of 28
Thank you
29 of 31
29 of 28