Download QEES Eigenvalues

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Quantitative Evaluation of
Embedded Systems
QUESTION DURING CLASS?
Email : qees3TU@gmail.com
Quantitative Evaluation of
Embedded Systems
1.
2.
3.
4.
Matrix equations - revisited
Monotonicity
Eigenvalues and throughput
Eigenvalues and the MCM
Quantitative Evaluation of
Embedded Systems
1.
2.
3.
4.
Matrix equations - revisited
Monotonicity
Eigenvalues and throughput
Eigenvalues and the MCM
x(n  1)  (0) x(n)
Cycles with a 0 execution time cause livelocks
y(n)  (0) x(n)
y
0 ms
But when logging events, this is mathematically okay...
y(n)  0
y
Theorem:
2ms of tokens on any cycle is constant!
1msThe number
x(n  1)  A x(n) max B u(n)
u
A
C
4ms
B
Therefore, every cycle must y(n)
containatC
least
onemax
token,D u(n)
x(n)
otherwise a deadlock occurs.
D
3ms
3
 0
2  
    0

  1 
 1
0  3 

   1
 1
 
2
1



 
0
 2
An
2 
 
1 

0 
 
3  
n times



 A   A
A0  Ι








Ax  α   Ax   α
AB C  ABC
Ax max y   Ax  max Ay 
AB  BA
x(n  1)  A x(n) max B u(n)
y(n)  C x(n) max D u(n)
C A n 1 x(1)


n 1 i
y(n)  max  max CA
B u(i)
 0 i n

D u(n)


Quantitative Evaluation of
Embedded Systems
1.
2.
3.
4.
Matrix equations - revisited
Monotonicity
Eigenvalues and throughput
Eigenvalues and the MCM
 x1   y1 
Define :  x 2    y 2  iff x1  y 1 and x 2  y 2 and x 3  y 3
   
 x3   y 3 
Theorem:
(max,+) matrix addition is a monotone operator
If x  y then Ax  Ay
x(n  1)  A x(n) max B u(n)
y(n)  C x(n) max D u(n)
C A n 1 x(1)


y(n)  max  max CA n 1i B u(i)
 0 i n

D u(n)


C A n 1 0

y(n) C A n1 0 n 1i
y(n)  max  max CA
B0
 0 i n

D 0


x1
u
A
x3
B
1ms
x2
 
 2  2 




y
x(n  1)   5
4
5  x(n) max  4  u(n)




2ms
 1 
  1  




max   u(n)
y(n)    1    x(n)
C
3ms
Time (s)
Theorem:
(max,+) matrix addition is a monotone
operator
y(n)  CAn 0
and as a consequence,
removing the input gives a best-case approximation of behavior.
Tokens
Cx
Quantitative Evaluation of
Embedded Systems
1.
2.
3.
4.
Matrix equations - revisited
Monotonicity
Eigenvalues and throughput
Eigenvalues and the MCM
In linear algebra...
a pair (x, λ) is an eigenpair for a matrix A if:
Ax  λ  x
with λ  x denoting elementwise multiplication
and assuming that x  0
In (max,+) algebra...
a pair (x, λ) is an eigenpair for a matrix A if:
Ax  λ  x
with λ  x denoting elementwise addition
and assuming that x  
In linear algebra, we find for any eigenpair (x, λ) that
A x  λ x
n
n
If (x, λ) is an eigenpair then so is (αx, λ), for any scalar α
And so, in (max,+) algebra we find for any eigenpair (x, λ)
A x  nλ  x
n
If (x, λ) is an eigenpair then so is (α+x, λ), for any shift α
x1
A
x3
B
2ms
1ms
x2
C
3ms
y
 2  2 


 5
4
5 


  1  


x(n  1)  A x(n) max B u(n)
y(n)  C x(n) max D u(n)
C A n 1 x(1)


y(n)  max  max CA n 1i B u(n  i)
 0 i n

D u(n)


y(n)  C A n 1 0
n 1
y(n)  C A x
 C((n  1)λ  x)
 nλ  (Cx  λ)
Time (s)
y(n)  nλ  Cx  λ
λ
Tokens
Cx  λ
Tokens
Theorem:
The best-case throughput is always smaller than 1/λ,
t  Cx
λ
1 λ eigenvalue of the associated
with λ the biggest
matrix.
y(t) 
λ
Cx  λ
Time (s)
Quantitative Evaluation of
Embedded Systems
1.
2.
3.
4.
Matrix equations - revisited
Monotonicity
Eigenvalues and throughput
Eigenvalues and the MCM
x1
A
x3
B
2ms
1ms
x2
C
3ms
y
 2  2 


x(n  1)   5
4
5  x(n)


  1  


y(n)    1    x(n)
x1
A
1ms
x2
x3
B
y
2
5

 

4
1

5 x  λ  x

 
2
x  
Theorem:
n l
mis
nthe

:
A
 xxof
some
 xi
Every eigenvalue
cycle
mean
cycle...
n
2ms
m i,k,l : A (i,k) 
k
λ(nxl)λ

nλ
x
C
3ms
n i,k
i(i,:k)x i  k
i i
l
 A (k,
k)  x k  lλ  x k
where Al(k,k) is the duration of some cycle with l tokens on it
hence λ = Al(k,k)/l is a cycle mean.
x1
A
x3
B
2ms
1ms
x2
C
3ms
y
Let λ=MCM and xi represent a critical token...
Now given matrix A of a dataflow graph,
let us construct the following two matrices:

A λ  maxA  λ   max A n  nλ
n
n0
n0
A λ  maxA  λ   (A  λ)A λ
n
n 1
In A λ an entry (i,j) represents
the max duration of any path
from i to j minus λ for each
token on that path.

x1
A
1ms
x2
x3
B
2ms
y
Since xi represents a critical token:
So for the ith column we find:
A 
λ
(i,i)
( A λ ) (  ,i )  ( max A λ ) (  ,i )  ( A λ ) (  ,i )
AndTheorem:
consequently:
λ
The maximal
ofAaλ )graph
A(Acycle
)(  ,i) mean
(A  λ)(
(  ,i)  λ
C maximum eigenvalue
is the
ofits
 ((A
λ)((max,+)
A λ )) matrix.
λ
(  ,i)
3ms
 (A λ )(  ,i)  λ
λ
In A an entry (i,j) represents
the max duration of any path
from i to j minus λ for each
token on that path.

 (A λ )(  ,i)  λ

So (A λ )(  ,i) , λ is an eigenpair of A
0
(max,+) matrix addition is a monotone operator
C A x(1)
Every eigenvalueis the cycle mean of some cycle...
 cycle mean is anneigenvalue!
1 i
But not every
y(n)  max  max CA
B u(n  i)
i n mean of a graph
The maximal
 0cycle
is the maximumeigenvalue
of its (max,+) matrix
D
u(n)

and 1/MCM is the maximal throughput.
1
Thus removing the input gives anbest-case
approximation of behavior.


See the book by [Baccelli, Cohen, Olsder and Quadrat] for more!
Like for the question “can the 1/MCM throughput actually be achieved?”
Simulate 6 firings
Give the (max,+)
matrix equations
𝑥 𝑛+1 =
𝑥 𝑛 𝑚𝑎𝑥
𝑢(𝑛)
Calculate the MCM
Determine a periodic schedule for arbitrary µ
Plot the latency for a period µ
Optimize the periodic schedule for µ = 15
Optimize the periodic schedule for arbitrary µ
Plot the delayed latency for a period µ
Plot the minimal delay for a period µ
Optimize the periodic schedule for arbitrary µ
Related documents