Chenyang Lu Highlight Commonclassofcompu5ngproblems - - PDF document

chenyang lu
SMART_READER_LITE
LIVE PREVIEW

Chenyang Lu Highlight Commonclassofcompu5ngproblems - - PDF document

Chenyang Lu Highlight Commonclassofcompu5ngproblems CPUU%liza%onControlin MIMO:mul5input(knobs),mul5output(objec5ves) DistributedRealTimeSystems


slide-1
SLIDE 1

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


1

CPU
U%liza%on
Control
in

 Distributed
Real‐Time
Systems


Chenyang
Lu


CSE
520S


Highlight


 Common
class
of
compu5ng
problems


  • MIMO:
mul5‐input
(knobs),
mul5‐output
(objec5ves)

  • Coupling
between
objec5ves.

  • Constraints
on
knobs.


 Model
Predic5ve
Control


  • Op5miza5on
+
Predic5on
+
Feedback


2 


Why
CPU
U%liza%on
Control?


  • Overload
protec5on


 CPU
over‐u5liza5on

system
crash


  • Meet
response
5me
requirement


 CPU
u5liza5on
<
bound

meet
deadlines


3 


Challenge:
Uncertain%es


  • Execu5on
5mes?


Unknown
sensor
data
or
user
input


  • Request
arrival
rate?


Aperiodic
events


Bursty
service
requests


  • Disturbance?


Denial
of
Service
a^acks


Control‐theore5c
approach
  Robust
u5liza5on
control
in
face
of
workload
uncertainty


4 


End‐to‐End
Tasks


Distributed
Real‐Time
Systems


  • Periodic
task
Ti
=
sequence
of
subtasks
{Tij}
on
different


processors


All
the
subtasks
of
a
task
run
at
a
same
rate


  • Task
rate
can
be
adjusted


Within
a
range


Higher
rate

higher
u5lity


5 


Remote Invocation Subtask

T1 T2 T3 T11 T12 T13

P1 P2 P3

Problem
Formula%on


  • Bi:
U5liza5on
set
point
of
processor
Pi
(1
≤
i
≤
n)


  • ui(k):
U5liza5on
of
Pi
in
the
kth
sampling
period


  • rj(k):
Rate
of
task
Tj
(1
≤
j
≤
m)
in
the
kth
sampling
period


subject
to
rate
constraint:
 Rmin,j
≤
rj(k)
≤
Rmax,j
(1
≤
j
≤
m)


6 


min

{rj (k)|1≤ j≤n}

(Bi − ui(k))2

i=1 n

slide-2
SLIDE 2

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


2

Single‐Input‐Single‐Output
(SISO)
Control


Single
Processor


7 


Monitor Processor OS Application Sensor Inputs Set point Us = 69% Task Rates R1: [1, 5] Hz R2: [10, 20] Hz Middleware Actuator Controller u(k) {r(k+1)}

  • C. Lu, X. Wang, and C. Gill, Feedback Control Real-Time Scheduling in

ORB Middleware, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'03), May 2003.

New
in
Distributed
Systems


  • Need
to
control
u5liza5on
of
mul5ple
processors

  • U5liza5on
of
different
processors
are
coupled
with
each

  • ther
due
to
end‐to‐end
tasks


Replica5ng
a
SISO
controller
on
all
processors
does
not
work!


  • Constraints
on
task
rates


8 


T1 T2 T3 T11 T12 T13

P1 P2 P3

EUCON:
Mul%‐Input‐Mul%‐Output
Control


9 


Model Predictive Controller

Distributed System (m tasks, n processors)

Utilization Monitor Rate Modulator RM UM UM RM Feedback Loop Remote Invocation Subtask

Control Input Measured Output

  • C. Lu, X. Wang and X. Koutsoukos, Feedback Utilization Control in

Distributed Real-Time Systems with End-to-End Tasks, IEEE Transactions

  • n Parallel and Distributed Systems, 16(6): 550-561, June 2005.

Control
Theore%c
Methodology


1. Derive
a
dynamic
model
of
the
system
 2. Design
a
controller
 3. Analyze
stability


10 


Dynamic
Model:
One
Processor


  • Si:
set
of
subtasks
on
Pi

  • cjl:
es5mated
execu5on
5me
of
Til

  • gi:
u5liza5on
gain
of
Pi


 ra5o
between
actual
and
es5mated
change
in
u5liza5on
  models
uncertainty
in
execu5on
5mes




11 


ui(k) = ui(k −1) + gi c jlΔrj(k −1)

T jl ∈Si

Dynamic
Model:
Mul%ple
Processors


  • G:
diagonal
matrix
of
u5liza5on
gains

  • F:
subtask
alloca5on
matrix


 models
the
coupling
among
processors


fij
=
cjl
if
task
Tj
has
a
subtask
Tjl
on
processor
Pi



fij
=
0
if
Tj
has
no
subtask
on
Pi



12 


u(k) = u(k-1) + GFΔr(k-1)

T1 T2 T11

P1 P2

T21 T22 T3 T31

slide-3
SLIDE 3

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


3

Model
Predic%ve
Control


  • Suitable
for
coupled
MIMO
control
problems
with


constraints.



  • Compute
input
to
minimize
cost
over
a
future
interval.


Cost
func5on:
tracking
error
and
control
cost.


Predict
cost
based
on
a
system
model
and
feedback.


Compute
input
subject
to
constraints.


  • Op5miza5on
+
Predic5on
+
Feedback


13 


Cost
Func%on


  • Cost

  • Reference
trajectory:
exponen5al
convergence
to
B


14 


V(k) = u(k + i) − ref (k + i)

2 i=1 P

+ Δr(k + i) − Δr(k + i −1)

2 i= 0 M −1

Tracking
Error
 Control
Cost


ref (k + i) = B − e

− Ts Tref i

(B − u(k))

Model
Predic%ve
Controller


At
the
end
of
each
sampling
period


  • Compute
inputs
in
future
sampling
periods



Δr(k),
Δr(k+1),
...
Δr(k+M‐1)
 
to
minimize
the
cost
func5on


  • Cost
is
predicted
using



(1)
feedback
u(k‐1)
 
(2)
approximate
dynamic
model


  • Apply
Δr(k)
to
the
system


At
the
end
of
the
next
sampling
period


  • Shil
5me
window
and
re‐compute
Δr(k+1),
Δr(k+2),
...
Δr(k+M)
based

  • n
feedback


15 


EUCON
Controller


16 


Difference
from
 reference
 trajectory
 Desired
trajectory
for
 u(k)
to
converge
to
B

 Constrained


  • p5miza5on


solver


Stability
Analysis


  • Stability:
u5liza5on
of
all
processors
converge
to
set
points

  • Derive
stability
condi5on

range
of
G


 Tolerable
varia5on
of
execu5on
5mes


 Provides
analy5cal
assurance
despite
uncertainty



17 


Stable
System


18 


execu5on
5me
factor
=
0.5 
 (actual
execu5on
5mes
=
½
of
es5mates) 


slide-4
SLIDE 4

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


4

Unstable
System


19 


execu5on
5me
factor
=
7 
 (actual
execu5on
5mes
=
7
5mes
es5mates) 


Stability


  • Stability
condi5on

tolerable
range
of
execu5on
5mes


Analy5cal
assurance
on
u5liza5ons
despite
uncertainty



20 


Overes%ma%on


  • f
execu%on


%mes
prevents


  • scilla%on


actual execution time / estimation Predicted
 bound
for
 stability


FC‐ORB
Middleware


21 


Feedback
lane


Remote
request
lanes


Priority
 Manager
 Rate
 Modulator
 Model
 Predic%ve
 Controller


Remote
request
lanes


U%liza%on
 Monitor
 Measured
 Output
 Control
 Input
 Priority
 Manager
 Rate
 Modulator
 U%liza%on
 Monitor
 Priority
 Manager
 Rate
 Modulator
 U%liza%on
 Monitor


  • X. Wang, C. Lu and X. Koutsoukos, Enhancing the Robustness of

Distributed Real-Time Middleware via End-to-End Utilization Control, IEEE Real-Time Systems Symposium (RTSS'05), December 2005.

FC‐ORB
Features


  • End‐to‐end
u5liza5on
control


Maintains
desired
u5liza5ons
on
all
processors


  • End‐to‐end
ORB
architecture


Specialized
for
rate
adapta5on


  • Task
migra5on


Reliability
in
terms
of
func5onality
and
real‐5me
performance



22 


End‐to‐End
U%liza%on
Control
Service


23 


 Implements
EUCON
(End‐to‐end
U5liza5on
CONtrol)

  Provides
func5onal
and
performance
portability


Remote request lanes

Priority Manager Rate Modulator Model Predictive Controller

Remote request lanes

Utilization Monitor

Controlled variables: Utilizations Manipulated variables: Rate changes

Priority Manager Rate Modulator Utilization Monitor Priority Manager Rate Modulator Utilization Monitor

End‐to‐End
Object
Request
Broker

  • Release
guard
for
end‐to‐end
tasks

  • Priority
management


Rate
adapta5on

con5nuous
priority
changes


Thread‐per‐priority

high
overhead



Thread‐per‐subtask:
Change
priority
only
when
the
order
of
task
 rate
changes


24 


Remote request lanes

Priority Manager Rate Modulator

Remote request lanes

Utilization Monitor Priority Manager Rate Modulator Utilization Monitor Priority Manager Rate Modulator Utilization Monitor

slide-5
SLIDE 5

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


5

Task
Migra%on

  • Fault
model:
permanent
processor
failure

  • Subtasks
have
backups
on
different
processors

  • U5liza5on
control
+
fault‐tolerance


Automa5c
controller
reconfigura5on


Handle
overload
caused
by
task
migra5on


25 


Remote request lanes

Priority Manager Rate Modulator Model Predictive Controller

Remote request lanes

Utilization Monitor

Utilizations Rate changes

Priority Manager Rate Modulator Utilization Monitor Priority Manager Rate Modulator Utilization Monitor

FC‐ORB
Implementa%on


  • Implemented
based
on
FCS/nORB,
nORB
and
ACE

  • Specialized
for
memory
constrained
Distributed
Real‐

5me
and
Embedded
(DRE)
systems


  • 7017
lines
of
C++
code

  • Controller
is
implemented
as
a
Dynamic
Link
Library
(DLL)


generated
by
MATLAB

26 


Experimental
Setup


  • 12
tasks
(25
subtasks)
and
4
Pen5um
IV
processors


  • KURT
Linux
2.4.22

  • Rate
Monotonic
Scheduling

  • Subtasks
on
Norbert
have
backups
on
other
processors

27 


Goal
1:
Robust
U%liza%on
Control


28 


Execution times change at runtime Disturbance from external resource contention

Desired utilization: 73% (0.73)

Goal
2:
Performance
Portability


  • Same
u5liza5on
–
portable
performance


Even
on
different
systems
with
different
compu5ng
capacity


29 


Real exec times are twice longer than normal (running on slow machines) Real exec times are 1/4 of normal (running on fast machines) Desired utilization: 73% (0.73)

Goal
3:
Fault
Tolerance


30 


1. Norbert fails. 2. move its tasks to other processors. 3. reconfigure controller 4. control utilization by adjusting task rates

T12 T1 T2 T11 P1 P2 Norbert

73% 73%

T13 T3

100% !! 73%

slide-6
SLIDE 6

Chenyang Lu

SIGMETRICS
2008:
Introduc5on
to
Control
 Theory.
Abdelzaher,
Diao,
Hellerstein,
Lu,
and
 Zhu.


6

Summary:
Model
Predic%ve
Control


  • Robust
u5liza5on
control
for
distributed
systems

  • Handle
coupling
among
processors

  • Enforce
constraints
on
task
rates

  • Analyze
tolerable
range
of
execu5on
5mes


31 


References


  • Centralized
Control
(EUCON):
C.
Lu,
X.
Wang
and
X.
Koutsoukos,


Feedback
U5liza5on
Control
in
Distributed
Real‐Time
Systems
with
End‐to‐End
 Tasks,
IEEE
Transac5ons
on
Parallel
and
Distributed
Systems,
16(6):
550‐561,
June
 2005.



  • Middleware
(FC‐ORB):
X.
Wang,
C.
Lu
and
X.
Koutsoukos,


Enhancing
the
Robustness
of
Distributed
Real‐Time
Middleware
via
End‐to‐End
 U5liza5on
Control,
IEEE
Real‐Time
Systems
Symposium
(RTSS'05),
December
 2005.



  • Decentralized
Control:
X.
Wang,
D.
Jia,
C.
Lu
and
X.
Koutsoukos,


DEUCON:
Decentralized
End‐to‐End
U5liza5on
Control
for
Distributed
Real‐Time
 Systems,
IEEE
Transac5ons
on
Parallel
and
Distributed
Systems,
18(7):
996‐1009,
 July
2007.



  • Controllability
&
Feasibility:
X.
Wang,
Y.
Chen,
C.
Lu
and
X.
Koutsoukos,


On
Controllability
and
Feasibility
of
U5liza5on
Control
in
Distributed
Real‐Time
 Systems,
Euromicro
Conference
on
Real‐Time
Systems
(ECRTS'07),
July
2007.


  • Project
page:
hXp://www.cse.wustl.edu/~lu/control.html



  • Model
Predic%ve
Control:
J.M.
Maciejowski,
Predic5ve
Control
with
Constraints,


Pren5ce
Hall,
2002.


32