Santander, 25/09/2010
1
Laura Barros, César Cuevas, Patricia López Martínez,
José M. Drake and Michael González Harbour
Grupo de Computadores y Tiempo Real
Universidad de Cantabria, Spain
{barrosl, cuevasce, lopezpa, drakej, mgh @unican.es}
2ndInternational Workshop on Analysis Tools and
Methodologies for Embedded and Real-time Systems Porto, July 5th, 2011
Funded by the EU under contracts FP7/NoE/214373, and by the Spanish Government under grant TIN2008-06766-C03-03
Modelling real-time applications based
Introduction
Resource Reservation (RR)
Executing each system
thread or communication
session in a
server
Server:
it has assigned a
fraction of the processor
capacity or the
communication network.
Advantages:
•
System robustness
•
Design simplicity
•
Reusability of software
components
MAST
Open source set of tools
to design and analysis of
RT applications
MAST
model
extended
=>
MAST 2
MAST 2
tools
under
development:
•
Possibility of usage of
MAST 1
tools
transforming models
Modelling elements for the resource reservation paradigm I
3 Porto, 5/07/2011 Laura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour
triggerA
stepA1
stepA2
stepA3
e2efA
tr1
Reactive
model
stepB1
stepB2
triggerB
e2efB
tr2
eA1
eA2
eB1
Modelling elements for the resource reservation paradigm I
triggerA
stepA1
stepA2
stepA3
e2efA
tr1
Reactive
model
stepB1
stepB2
triggerB
e2efB
tr2
processorX
primaryScheduler
mutexU
thread1
Resource
model
thread4
thread3
thread2
eA1
eA2
eB1
Modelling elements for the resource reservation paradigm II
5 Porto, 5/07/2011 Laura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour
stepB1
stepB2
triggerB
e2efB
tr2
Virtual
platform
triggerA
stepA1
stepA2
stepA3
e2efA
tr1
virtualRsrc
1virtualRsrc
2virtualRsrc
4virtualRsrc
3Reactive
model
eA1
eA2
eB1
New classes in resource reservation MAST models II
7 Porto, 5/07/2011 Laura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour
Attributes of the contract:
VirtualRsrc
Budget
(t
B)
Replenishment period
(t
R)
Access Deadline
(t
D)
Real-time application development
Application
code
Execution platformTiming
requirements
Application
Description
Application
Workload
« Mast2»
Platform
Description
« Mast2»
RR-model & constr.
(a) 4db1+4dd1≤11.8 4db2+4dd2+2da2≤101.8 (b) db1=3.1, dd1=8.8, db2=9.54,dd2=7.2,da2=1.2 (c) ...
« Mast2»
RR-model
« Mast1»
RT_Analysis
Model
« Mast1»
RT_Simulation
Model
Application Virtual PlatformAnalysis
MAST tools MAST Simulation tools RR toolDesign
Asigment VR tool« Mast2»
Exec-model
Execution platformExecution
Resource Reservation serviceNegotiate
virtualPlatform
Vr_Central
(vr1)
Vr_Bus
(vr2)
Vr_Remote
(vr3)
Reactive model of ServoControl example
9 controlTrans: EndToEndFlow T1clockEvent a1 readGoal a2transmitReq a3readSensorPosition a4returnPosition a5 evaluateControl a6transmitControl a7setServoInputs «PeriodicEvent» period=0.01 «Step» SimplOp(wcet=4.0E-4) «Step» message(maxSize=64) «Step» SimplOp(wcet=7.5E-5) «Step» Message(maxSize=256) «Step» SimplOp(wcet=0.8E-3) «Step» Message(maxSize=256) «Step» SimplOp(wcet=5.0E-5) «HardGlobalDeadline» deadline=5.0E-3 refEvent= ”clockEvent” e1 e2 e3 e4 e5 e6 end
Porto, 5/07/2011 Laura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour
B = a1 + a5
T = T1
B = a2 + a4+a6
T = T1
B = a3 + a7
T = T1
Virtual Platform assignment tool
Period Budget Deadline
Vr_Central(vr1) T1 a1+ a5 ? Vr_Bus(vr2) T1 a2+a4+a6 ? Vr_Remote(vr3) T1 a3+a7 ? Virtual Platform
2
vr1
.t
D+3
vr2
.t
D+2
vr3
.t
D≤ 9.182 ms
vr1
.t
D-(
vr1
.t
B-a1)+
vr1
.t
D-(
vr1
.t
B-a5)+
+
vr2
.t
D-(
vr2
.t
B-a2)+
vr2
.t
D-(
vr2
.t
B-a4)+
vr2
.t
D-(
vr2
.t
B-a6)+
+
vr3
.t
D-(
vr3
.t
B-a3)+
vr3
.t
D-(
vr3
.t
B-a7) <
t
GD
wrt (ax) < vr.tD– (vr.tB– ax)
It is possible to calculate the
wrt
(t
X) of
Virtual Platform adjustment
Virtual Resources generation
Iterative search of a set of deadline values that:
makes the application schedulable
verifies the specified restrictions
MAST
Schedulability analysis
Tool
Negotiation tool
11Negotiation tool
Vr/SchedRsrc Period Priority Budget Deadline
vr1/centrThr T1 14 1.2 ms 2.51 ms
Vr2/commChannel T1 146 576 bits 0.83 ms
Vr3/remoteThr T1 22 0.125 ms 0.5 ms
Laura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour Porto, 5/07/2011
Model transformation
Results of analysis using
MAST tools
Complex application: No restrictions. Virtual schedulability analysis
vrx:VirtualSchedulableResource budget=tB replenismentPeriod=tR deadline=tD MAST 2 vrxProc:RegularProcessor (Default attributes) vrxSch:PrimaryScheduler Host=vrxProc Policy=FixedPriorityPolicy vrx:Thread vrxThLoad:Thread vrxProc:EndToEndFlow trg:PeriodicEvent Period=tD act:Step Thread=vrxLoad Operation= vrxOp vrxOp:SimpleOperation Wcet= tD-tB Scheduler=vrxSchParam=Fixed PriorityParam(priority=1) Scheduler=vrxSch Param=FixedPriorityParam( priority=2) MAST 2
ATL
RR-Model Analyzable-Model13
ATL
RR-Model MAST 2 MAST 2MAST
Schedulability analysis
Tool
Design
Analysis
Model Transformation for the MAST 1 compatibility
MAST 1
MAST 2
Schedulability
VirtualTool
Result-Model MAST-Results MAST 2 Analyzable-Model MAST 1 Analyzable-ModelLaura Barros, César Cuevas, Patricia López, J.M. Drake, M.G.Harbour Porto, 5/07/2011
Conclusions
Modelling elements based on RR paradigm with MAST:
•
Scenario:
–
The application can be analysed independently of the current workload
–
The programmers do not require any knowledge about the underlying
platform
•
Solution:
–
MAST tools cover the different phases in the development and execution of
applications based on resource reservation
–
Relying in the availability of a resource reservation middleware installed in
the platform
•
Currently working on:
–
Updating the MAST tools in order to support the new advanced paradigms
for real time systems covered by MAST2
–
Other :
Implementation of the virtual platform assignment tool