12.07.2015 Views

UML Profile for Schedulability, Performance and Time (UML-SPT)

UML Profile for Schedulability, Performance and Time (UML-SPT)

UML Profile for Schedulability, Performance and Time (UML-SPT)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>UML</strong> <strong>Profile</strong> <strong>for</strong> <strong>Schedulability</strong>,Per<strong>for</strong>mance <strong>and</strong> <strong>Time</strong> (<strong>UML</strong>-<strong>SPT</strong>)5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)1


Part III: <strong>UML</strong> <strong>SPT</strong>1st step: Model the system using <strong>UML</strong>.2nd step: Annotate per<strong>for</strong>mance characteristics using the<strong>SPT</strong> <strong>Profile</strong>.3rd step: Translate the <strong>UML</strong>-<strong>SPT</strong> diagrams into Petri nets.4th step: Analyze the Petri nets to obtain per<strong>for</strong>mance results.5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)2


<strong>UML</strong>-<strong>SPT</strong>: IntroductionJanuary 2005, OMG st<strong>and</strong>ard <strong>Profile</strong>.A <strong>Profile</strong> is an extension to the semantics of <strong>UML</strong> that con<strong>for</strong>ms tothe meta-model.‣ A specialization, inheriting from the <strong>UML</strong> st<strong>and</strong>ard.‣ A domain-specific interpretation• e.g. <strong>UML</strong> <strong>Profile</strong> <strong>for</strong> Enterprise Application Integration; <strong>for</strong> DistributedObject Computing; Testing <strong>Profile</strong>; <strong>for</strong> Software Radio, …It should use only st<strong>and</strong>ard extension mechanisms: stereotypes,tag values, constraints‣ Additional semantic constraints cannot contradict the general <strong>UML</strong>semantics.‣ Within the “semantic envelope” defined by the st<strong>and</strong>ard.5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)3


Specializing <strong>UML</strong>: Stereotypes <strong>and</strong> tagged valuesA stereotype is a specialization of a <strong>UML</strong> entity, implying a certaininterpretation.Integer«clock» Stereotype of Classwith added semantics:an active counter whose valuechanges synchronously withthe progress of physical time...a stereotype can extend the class«clock»MyClockClass{resolution = 500 ns}Set<strong>Time</strong>()Tagged value associatedwith the «clock» stereotype:tag = valuevalue has a type such as:integer ‘sec’|‘ms’|‘ns’5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)4


<strong>UML</strong>-<strong>SPT</strong>: General PrinciplesAbility to specify quantitative in<strong>for</strong>mation directly in <strong>UML</strong> models‣ Key to quantitative analysis <strong>and</strong> predictive modeling.Flexibility:‣ Users can model their systems using modeling approaches <strong>and</strong> styles of theirown choosing not hamper design.‣ Open to existing <strong>and</strong> new analysis techniques.Facilitate the use of analysis methods‣ Eliminate the need <strong>for</strong> a deep underst<strong>and</strong>ing of analysis methods.‣ As much as possible, automate the generation of analysis models <strong>and</strong> theanalysis process itself.Using analysis results <strong>for</strong>:‣ predicting system characteristics (detect problems early).‣ analyze existing system (sizing, capacity planning).5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)5


<strong>UML</strong>-<strong>SPT</strong>: StructureGeneral Resource Modeling FrameworkRTresourceModelingRTtimeModellingAnalysis ModelsSAprofilePAprofile5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)6


<strong>UML</strong>-<strong>SPT</strong>: Structure…<strong>Schedulability</strong> analysis: applied to hard real-time systems tofind a schedule that will allow to meet all the system’s deadlines.Per<strong>for</strong>mance analysis: applied to soft-real time systems withstochastic characteristics. Queuing based methods are used <strong>for</strong>mean value analysis <strong>and</strong>/or <strong>for</strong> checking if soft deadlines are metby the system.5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)7


Resource:‣ Hardware or software.<strong>UML</strong>-<strong>SPT</strong>: Resource Modeling‣ An element whose service capacity is limited, directly or indirectly, bythe finite capacities of the underlying physical elements.Resources offer services that have QoS attributesResource R ...... set of services Si ...... QoS of SiQuality of Service (QoS):‣ A specification (usually quantitative) of how well a particular serviceis (to be) per<strong>for</strong>med.‣ e.g. throughput, capacity, response timeThe 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 supportits QoS obligations.5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)8


<strong>UML</strong>-<strong>SPT</strong>: Resource Modeling …Resources have services that have QoS characteristicsResources <strong>and</strong> services have instances, <strong>and</strong> QoS has valueInstance0..n+type1..nDescriptor0..nResourceInstance+instance0..n+type1..nResource0..nl/1..nResourceServiceInstance +instance0..n0..n0..nQoSvalue+offeredQoS+instance0..n5007437 Web Services: Architecture, Concepts 0..n<strong>and</strong> +offeredQoSSt<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web services+offeredService1..n+type ResourceService10..n/0..nQoScharacteristic+type1Dr. José Merseguer0..nDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)9


<strong>UML</strong>-<strong>SPT</strong>: <strong>Time</strong> ModelingResourceInstance(from CoreResourceModel)<strong>Time</strong>Value(from <strong>Time</strong>Model)1+maximalValue1+currentValue1+resol ution<strong>Time</strong>Interval(from <strong>Time</strong>Model)1+offset1+accuracy0..n0..n11Clock0..nTimingMechanismstability0..n driftskew0..n0..n+referenceClockset(time : <strong>Time</strong>Value)get() : <strong>Time</strong>Valuereset()start()pause()<strong>Time</strong>risPeriodic : Boolean10..n+origin1+duration1<strong>Time</strong>dEvent(from <strong>Time</strong>dEvents)+timestamp1..n<strong>Time</strong>Value(from <strong>Time</strong>Model)+generatedInterrupts0..nClockInterrupt(from <strong>Time</strong>dEvents)+generated<strong>Time</strong>outs 0..n<strong>Time</strong>out(from <strong>Time</strong>dEvents)5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)10


<strong>UML</strong>-<strong>SPT</strong>: Per<strong>for</strong>mance Modeling1Per<strong>for</strong>manceContext10..n1..nWorkloadresponse<strong>Time</strong>priority1..n1PScenariohostExecutionDem<strong>and</strong>response<strong>Time</strong>11..n+resource0..n 0..n0..n1..nPResourceutilizationschedulingPolicythroughputClosedWorkloadpopulationexternalDelayOpenWorkloadoccurrencePattern+successor0..n+root 1PStepprobabiltyrepetitiondelayoperationsintervalexecution<strong>Time</strong>{ordered}1..n+host 0..1PProcessingResourceprocessingRatecontextSwitch<strong>Time</strong>priorityRangeisPreemptiblePPassiveResourcewaiting<strong>Time</strong>response<strong>Time</strong>capacityaccess<strong>Time</strong>+predecessor0..n5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)11


<strong>UML</strong>-<strong>SPT</strong>: Per<strong>for</strong>mance Modeling …Provides the concepts to annotate the <strong>UML</strong> models with per<strong>for</strong>mancecharacteristics.Per<strong>for</strong>mance context‣ Specify one or more scenarios that are used to explore various dynamicsituations involving a set of resources.Scenario‣ Has the attribute response<strong>Time</strong>.‣ 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 <strong>for</strong> an arrival process (such asPoisson).‣ PAclosedLoad (users or jobs cycling the scenario) with tags <strong>for</strong> a population<strong>and</strong> a think time.5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)12


<strong>UML</strong>-<strong>SPT</strong>: Per<strong>for</strong>mance Modeling …Step‣ a Step inherits from Scenario, so it can be refined as a sub-scenario‣ Has dem<strong>and</strong>, PAdem<strong>and</strong> tag gives the CPU dem<strong>and</strong>.‣ PAextOp tag defines operations such as file operations, that are notmodeled in the <strong>UML</strong> model but are needed <strong>for</strong> the per<strong>for</strong>mancemodel (completions)‣ PAdelay specifies a delay that may be part of the operation (a “sleep”time)‣ a Step has predecessors (giving AND <strong>for</strong>k <strong>and</strong> join)‣ <strong>and</strong> also a probability (giving OR f/j, with suitable interpretation)5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)13


<strong>UML</strong>-<strong>SPT</strong>: Tags <strong>for</strong> specifying per<strong>for</strong>mance valuesA complex structured string with the following <strong>for</strong>mat::= , , where: ::= ‘req’ | ‘assm’ | ‘pred’ | ‘msr’required, assumed, predicted, measured ::= ‘mean’ | ‘sigma’ | ‘kth-mom’, |‘max’| ‘percentile’ | ‘dist’Examples:‣ measured CPU dem<strong>and</strong> of a scenario step:{PAdem<strong>and</strong> = (‘msr’, ‘mean’, (20, ‘ms’))}‣ scenario response time: required <strong>and</strong> predicted (variable $RT is a placeholder<strong>for</strong> a per<strong>for</strong>mance model result){PAresp<strong>Time</strong> = (‘req’, ‘mean’, (10, ‘sec’))PAresp<strong>Time</strong> = (‘pred’, ‘mean’, $RT)}5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)14


<strong>UML</strong>-<strong>SPT</strong>: time valueTag type RTtimeValue can represent a wide variety of typesrelated 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.28P=0.44P=0.280 ms 1 ms 2 ms 3 ms5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)15


<strong>UML</strong>-<strong>SPT</strong>: The POP3 example{PAprob=0.8}{PAprob=0.2}UserCheckMailSendMailPer<strong>for</strong>mance contextScenario probabilitypsClient/ CH.check_mailStep probabilityUserMainStateDO: Thinking{PAprob=0.8}/ CH.exit_exec{PAprob=0.2}fsClient5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)16


<strong>UML</strong>-<strong>SPT</strong>: The POP3 exampleScenarioMessage size5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)17


<strong>UML</strong>-<strong>SPT</strong>: The POP3 examplepsPOP3Serveropen_tcp_connection/ send_greetingListening onTCP port 110AuthorizationDO: Authorizationdele/ send_okTransactionlist / send_ok{PApopulation=1}/ send_okUpdateunlock_maildropquitretrSystem load/ send_text−_message/ send_attach−_messageStep probability{PAprob=$P}Sendingread_message{PAprob=$Q}Resource dem<strong>and</strong>5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)18


Wait4User<strong>UML</strong>-<strong>SPT</strong>: The POP3 exampleUsernameLook4UserClientHost{PAprob=0.2,PAdem<strong>and</strong>=(’ass’,’dist’,((’exponential’,5),’s.’))}Step probabilityResource dem<strong>and</strong>ERR[user not found]OK[user found]{PAprob=0.8,PAdem<strong>and</strong>=(’ass’,’dist’,((’exponential’,2),’s.’))}{PAprob=0.2,PAdem<strong>and</strong>=(’ass’,’dist’,((’exponential’,3),’s.))}’Wait4PasswordPasswordCheckPassword{PAprob=0.8,PAdem<strong>and</strong>=(’ass’,’dist’,((’exponential’,1),’s.’))}[doesn’t match][matches]ERRLockMaildrop{PAprob=0.1}[already locked]ERR[not locked]OK{PAprob=0.9}5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)19


{PApopulation=$N}{PAprob=$P}{PAprob=$Q}fsMClientpsMClientWaiting4Entryexit_exec<strong>UML</strong>-<strong>SPT</strong>: The POP3 exampleDeleteMessagesend_delecheck_mailtext_messageattach_messageokRetrieveMessagesend_retrGreetingsend_open_tcp_connectionQuittingsend_quitok[not messages_left]ok[messages_left]ok[not new]ok[new]greetingerrCheckMessagessend_listSystem loadStep probabilityResource dem<strong>and</strong>Authenticationsend_usernameokerrCheckPasswordsend_passwordok{PAprob=$S}{PAprob=$R}5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)20


<strong>UML</strong>-<strong>SPT</strong>: The POP3 exampleNetwork speed:clientHostm:mailClient{(’ass’,(100,Kbps))}:Internet:serverHosts:ServerHost5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)21


<strong>UML</strong>-<strong>SPT</strong>: Annotations in our proposal (overview)5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web servicesDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)22


<strong>UML</strong>-<strong>SPT</strong>: General Model Processing FrameworkSoftware Domain5007437 Web Services: Architecture, Concepts <strong>and</strong> St<strong>and</strong>ardsModel-based per<strong>for</strong>mance evaluation of web services<strong>Schedulability</strong>/Per<strong>for</strong>mance DomainDr. José MerseguerDpt. In<strong>for</strong>mática e Ing. Sistemas (Univ. Zaragoza)23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!