5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML Profile for Schedulability,
Performance and Time (UML-SPT)
Part III: UML SPT
1st step: Model the system using UML.
2nd step: Annotate performance characteristics using the
SPT Profile.
3rd step: Translate the UML-SPT diagrams into Petri nets.
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: Introduction
January 2005, OMG standard Profile.
A Profile is an extension to the
semantics
of UML that conforms to
the meta-model.
¾
A specialization, inheriting from the UML standard.
¾
A domain-specific interpretation
e.g. UML Profile for Enterprise Application Integration; for Distributed
Object Computing; Testing Profile; for Software Radio, …
It should use only standard extension mechanisms:
stereotypes,
tag values, constraints
¾
Additional semantic constraints cannot contradict the general UML
semantics.
Specializing UML: Stereotypes and tagged values
A stereotype is a specialization of a UML entity, implying a certain
interpretation.
Integer
MyClockClass
SetTime()
«clock»
{resolution = 500 ns}
«clock» Stereotype of Class
with added semantics:
an active counter whose value
changes synchronously with
the progress of physical time
...a stereotype can extend the class
Tagged value associated
with the «clock» stereotype:
tag = value
value has a type such as:
integer ‘sec’|‘ms’|‘ns’
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: General Principles
Ability to specify quantitative information directly in UML models
¾
Key to quantitative analysis and predictive modeling.
Flexibility:
¾
Users can model their systems using modeling approaches and styles of their
own choosing
Æ
not hamper design
.
¾
Open
to existing and new analysis techniques.
Facilitate the use of analysis methods
¾
Eliminate the need for a
deep understanding
of analysis methods.
¾
As much as possible,
automate
the generation of analysis models and the
analysis process itself.
Using analysis results for:
¾
predicting
system characteristics (detect problems early).
¾
analyze
existing system
(sizing, capacity planning).
UML-SPT: Structure
<<profile>>
SAprofile
<<profile>>
PAprofile
<<profile>>
RTresourceModeling
<<profile>>
RTtimeModelling
Analysis Models
General Resource Modeling Framework
<<import>>
<<import>>
<<import>>
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: Structure…
Schedulability analysis
: applied to
hard real-time
systems to
find a schedule that will allow to meet all the system’s deadlines.
Performance analysis
: applied to
soft-real time
systems with
stochastic characteristics. Queuing based methods are used for
mean value analysis and/or for checking if soft deadlines are met
by the system.
UML-SPT: Resource Modeling
Resource:
¾
Hardware or software.
¾
An element whose
service capacity is limited
, directly or indirectly, by
the finite capacities of the underlying physical elements.
Resources offer services that have QoS attributes
Resource R ... set of services Si ... QoS of Si
Quality of Service (QoS):
¾
A specification (usually quantitative) of
how well
a particular service
is (to be) performed.
¾
e.g. throughput, capacity, response time
The specification of a model element can include:
¾
Offered QoS
: the QoS that it provides to its clients.
¾
Required QoS
: the QoS it requires from other components to support
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: Resource Modeling …
Resources have services that have QoS characteristics
Resources and services have instances, and QoS has value
Descriptor
Instance
1..n
0..n
+type
1..n
0..n
0..n
0..n
/
0..n
+offeredQoS
0..n
/
0..n
0..n
ResourceInstance
Resource
1..n
0..n
+type
1..n
+instance
0..n
ResourceService
ResourceServiceInstance
0..n
+type
1
+instance
0..n
1..n
+offeredService 1..n
l
1..n
1..n
QoScharacteristic
0..n
0..n
0..n
0..n
1
QoSvalue
0..n
0..n
+offeredQoS
0..n
0..n
1
0..n
+type
1
+instance
0..n
UML-SPT: Time Modeling
ResourceInstance (from CoreResourceModel) Timeout (from TimedEvents) Timer isPeriodic : Boolean 1 0..n 1 +generatedTimeouts 0..n ClockInterrupt (from TimedEvents) TimeInterval (from TimeModel) Clock 1 0..n +offset 1 0..n 1 0..n +accuracy 1 0..n 0..n 1 +generatedInt errupts 0..n 1 TimeValue (from TimeModel) TimingMec hanism stability drift skew set(time : TimeValue) get() : TimeValue reset() start() pause() 1 0..n +resolution 1 0..n 0..n 1 0..n +referenceClock 1 1 0..n +currentValue 1 0..n 1 0..n +max imalValue 1 0..n TimeValue (from TimeModel) 1 0..n +duration 1 0..n TimedEvent (from TimedEvents) 1..n +times tamp 1..n 1 +origin 15007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: Performance Modeling
<<deploys>>
ClosedWorkload
population
externalDelay
OpenWorkload
oc currencePat tern
PResource
utilization
schedulingPolicy
throughput
PProcessingResource
processingRate
contextSwitchTime
priorityRange
isPreemptible
PerformanceContext
1..n
0.. n
1..n
0.. n
W orkload
responseTime
priority
1..n
1
1..n
1
PStep
probabilty
repetition
delay
operations
interval
executionTime
0..n
0..n
+successor
0..n
+predecessor 0..n
PScenario
hostExecutionDemand
responseTime
0..n
0..n
+resource
0..n
0..n
0..1
0..n
+host 0..1
0..n
1..n
1
1..n
1
1
1..n
1
1..n
1..n
1..n
1
1
+root
1
1
PPassiveResource
waitingTime
responseTime
capacity
accessTime
{ordered}
UML-SPT: Performance Modeling …
Provides the
concepts
to annotate the UML models with
performance
characteristics
.
Performance context
¾
Specify one or more scenarios that are used to explore various dynamic
situations involving a set of resources.
Scenario
¾
Has the attribute
responseTime
.
¾
In our approach a SD is a scenario.
¾
QoS requirements are placed on scenarios.
¾
a Scenario is a sequence of Steps (predecessor/successor)
Scenario has a first Step, which is stereotyped with a workload definition
¾
PAopenLoad (stream of requests) with tags for an arrival process (such as
Poisson).
¾
PAclosedLoad
(users or jobs cycling the scenario) with tags for a population
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: Performance Modeling …
Step
¾
a Step inherits from Scenario, so it can be refined as a sub-scenario
¾
Has demand,
PAdemand
tag gives the CPU demand.
¾
PAextOp
tag defines operations such as file operations, that are not
modeled in the UML model but are needed for the performance
model (
completions
)
¾
PAdelay
specifies a delay that may be part of the operation (a “sleep”
time)
¾
a Step has predecessors (giving AND fork and join)
UML-SPT: Tags for specifying performance values
A complex structured string with the following format
<performance-value>::=<kind-of-value> , <modifier> , <time-value>
where:
<kind-of-value> ::= ‘req’ | ‘assm’ | ‘pred’ | ‘msr’
required, assumed, predicted, measured
<modifier> ::= ‘mean’ | ‘sigma’ | ‘kth-mom’, <Integer> |‘max’
| ‘percentile’ <Real> | ‘dist’
Examples:
¾
measured CPU demand of a scenario step:
{PAdemand = (‘msr’, ‘mean’, (20, ‘ms’))}
¾
scenario response time: required and predicted (variable $RT is a placeholder
for a performance model result)
{PArespTime = (‘req’, ‘mean’, (10, ‘sec’))
PArespTime = (‘pred’, ‘mean’, $RT)}
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: time value
Tag type RTtimeValue can represent a wide variety of types
related to time, such as:
¾
12:04
(time of day)
¾
5.3, ‘ms’
(time interval)
¾
2000/10/27
(date)
¾
Wed
(day of week)
¾
$x, ‘ms’
(parameterized value with name $x)
¾
‘poisson’, 5.4, ‘sec’
(time value with a Poisson distribution)
¾
‘histogram’ 0, 0.28 1, 0.44 2, 0.28, 3, ‘ms’
P=0.28
P=0.44
P=0.28
UML-SPT: The POP3 example
{PAprob=0.8}
<<PAStep>>
{PAprob=0.2}
<<PAStep>>
UserMainState
fsClient
psClient
DO: Thinking
/ CH.check_mail
/ CH.exit_exec
Performance context
Scenario probability
Step probability
{PAprob=0.2}
{PAprob=0.8}
<<PAcontext>>
<<PAscenario>>
<<PAscenario>>
Send
Check
User
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: The POP3 example
Scenario
UML-SPT: The POP3 example
Update
unlock_maildrop
Listening on
TCP port 110
read_message
Sending
DO: Authorization
Authorization
quit
dele
/ send_ok
list / send_ok
Transaction
psPOP3Server
/ send_greeting
open_tcp_connection
_message
/ send_attach−
retr
_message
/ send_text−
/ send_ok
{PAprob=$P}
<<PAStep>>
{PAprob=$Q}
<<PAStep>>
<<PAClosedLoad>>
{PApopulation=1}
System load
Step probability
Resource demand
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: The POP3 example
Step probability
Resource demand
<<PAStep>>
{PAprob=0.2,
PAdemand=(’ass’,’dist’,
((’exponential’,3),’s.))}’
{PAprob=0.1}
<<PAStep>>
<<PAStep>>
{PAprob=0.8,
PAdemand=(’ass’,’dist’,
((’exponential’,1),’s.’))}
<<PAStep>>
{PAprob=0.8,
PAdemand=(’ass’,’dist’,
((’exponential’,2),’s.’))}
{PAprob=0.9}
<<PAStep>>
<<PAStep>>
{PAprob=0.2,
PAdemand=(’ass’,’dist’,
((’exponential’,5),’s.’))}
ClientHost
Username
Wait4User
ERR
OK
[user found]
Wait4Password
Password
ERR
[user not found]
[matches]
[doesn’t match]
LockMaildrop
OK
ERR
[already locked]
[not locked]
Look4User
UML-SPT: The POP3 example
{PAprob=$P}
<<PAStep>>
<<PAClosedLoad>>
{PApopulation=$N}
{PAprob=$Q}
<<PAStep>>
{PAprob=$S}
<<PAStep>>
{PAprob=$R}
<<PAStep>>
Waiting4Entry
check_mail
send_open_tcp_connection
Authentication
send_username
CheckPassword
send_password
greeting
ok
err
RetrieveMessage
send_retr
Quitting
send_quit
err
DeleteMessage
send_dele
text_message
attach_message
exit_exec
Greeting
ok[messages_left]
ok[not messages_left]
ok
CheckMessages
send_list
ok[new]
ok[not new]
ok
psMClient
fsMClient
Step probability
Resource demand
System load
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer
UML-SPT: The POP3 example
m:mailClient
:clientHost
s:ServerHost
:Internet
<<PAresource>>
:serverHost
<<PAspeed>>
{(’ass’,(100,Kbps))}
Network speed
5007437 Web Services: Architecture, Concepts and Standards Dr. José Merseguer