64
RT -UML RT -UML José M. Garrido José M. Garrido Department of Computer Science Department of Computer Science Kennesaw State University Kennesaw State University

RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Embed Size (px)

Citation preview

Page 1: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

RT -UMLRT -UML

José M. GarridoJosé M. GarridoDepartment of Computer ScienceDepartment of Computer Science

Kennesaw State UniversityKennesaw State University

Page 2: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

UML DiagramsUML Diagrams

Structural DiagramsStructural Diagrams• Class diagrams may also containClass diagrams may also contain

ObjectsObjects PackagesPackages ActorsActors

• Deployment DiagramsDeployment Diagrams• Component DiagramsComponent Diagrams

Behavioral DiagramsBehavioral Diagrams Statecharts / Activity DiagramsStatecharts / Activity Diagrams Sequence DiagramsSequence Diagrams Collaboration DiagramsCollaboration Diagrams

Functional DiagramsFunctional Diagrams• Use Case DiagramUse Case Diagram

Page 3: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Structural DiagramsStructural Diagrams Diagrams serve many purposesDiagrams serve many purposes

• System model-capture & specificationSystem model-capture & specification• View aspects of system designView aspects of system design• Provide basis for communication and reviewProvide basis for communication and review

Diagrams bring two perspectives to the design Diagrams bring two perspectives to the design processprocess• Represent different aspects of design, egRepresent different aspects of design, eg

FunctionalFunctional StructuralStructural BehavioralBehavioral Quality of ServiceQuality of Service

• Show aspects at different levels of abstractionShow aspects at different levels of abstraction• • SystemSystem• • SubsystemSubsystem• • ComponentComponent• “• “Primitive” classPrimitive” class

Page 4: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

UML RelationsUML Relations

Primary Relations in Primary Relations in UMLUML• AssociationsAssociations

Normal associationNormal association AggregationAggregation CompositionComposition

• GeneralizationGeneralization• DependencyDependency

<<bind>> for templates<<bind>> for templates <<friend>> for classes<<friend>> for classes <<includes>> and <<extends>> for use <<includes>> and <<extends>> for use

casescases Etc, etc etcEtc, etc etc

Page 5: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

CollaborationCollaboration A collaboration defines a set of co-operating roles A collaboration defines a set of co-operating roles

used collectively to illustrate a specific used collectively to illustrate a specific functionality. functionality.

A collaboration should only show the roles and A collaboration should only show the roles and attributes required to accomplish its defined task attributes required to accomplish its defined task or function. or function.

Isolating the primary roles is an exercise in Isolating the primary roles is an exercise in simplifying the structure and clarifying the simplifying the structure and clarifying the behavior, and also provides for re-use. A behavior, and also provides for re-use. A collaboration often implements a pattern.collaboration often implements a pattern.

A collaboration element is shown as an ellipse. A collaboration element is shown as an ellipse.

Page 6: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

CollaborationCollaboration

Page 7: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

InterfacesInterfaces

A specification of a named contract A specification of a named contract offered by a classoffered by a class

Notation:Notation:• << interface>> a stererotype<< interface>> a stererotype• ““lollipop” notationlollipop” notation

Page 8: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

InterfaceInterface

Page 9: RT -UML José M. Garrido Department of Computer Science Kennesaw State University
Page 10: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AssociationsAssociations

An association implies two model elements have a An association implies two model elements have a relationship - usually implemented as an instance relationship - usually implemented as an instance variable in one class. variable in one class.

This connector may include named roles at each This connector may include named roles at each end, cardinality, direction and constraints. end, cardinality, direction and constraints. Association is the general relationship type between Association is the general relationship type between elements. elements.

For more than two elements, a diamond For more than two elements, a diamond representation toolbox element can be used as well. representation toolbox element can be used as well.

When code is generated for class diagrams, named When code is generated for class diagrams, named association ends become instance variables in the association ends become instance variables in the target class. So, for the example below, "playsFor" target class. So, for the example below, "playsFor" will become an instance variable in the "Player" will become an instance variable in the "Player" class. class.

Page 11: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AssociationsAssociations

Page 12: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AggregationsAggregations Aggregations are used to depict elements which are made up Aggregations are used to depict elements which are made up

of smaller components. of smaller components. Aggregation relationships are shown by a white diamond-Aggregation relationships are shown by a white diamond-

shaped arrowhead pointing towards the target or parent class.shaped arrowhead pointing towards the target or parent class. A stronger form of aggregation - a composite aggregation - is A stronger form of aggregation - a composite aggregation - is

shown by a black diamond-shaped arrowhead and is used shown by a black diamond-shaped arrowhead and is used where components can be included in a maximum of one where components can be included in a maximum of one composition at a time. composition at a time.

If the parent of a composite aggregation is deleted, usually all If the parent of a composite aggregation is deleted, usually all of its parts are deleted with it; however a part can be of its parts are deleted with it; however a part can be individually removed from a composition without having to individually removed from a composition without having to delete the entire composition. delete the entire composition.

Compositions are transitive, asymmetric relationships and can Compositions are transitive, asymmetric relationships and can be recursive. be recursive.

Page 13: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AggregationsAggregations

The following diagram illustrates the The following diagram illustrates the difference between weak and strong difference between weak and strong aggregations. aggregations.

An address book is made up of a multiplicity An address book is made up of a multiplicity of contacts and contact groups. A contact of contacts and contact groups. A contact group is a virtual grouping of contacts; a group is a virtual grouping of contacts; a contact may be included in more than one contact may be included in more than one contact group. contact group.

If you delete an address book, all the If you delete an address book, all the contacts and contact groups will be deleted contacts and contact groups will be deleted too; if you delete a contact group, no too; if you delete a contact group, no contacts will be deleted. contacts will be deleted.

Page 14: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

StereotypeStereotype

Adornment in a classAdornment in a class Used in two different ways:Used in two different ways:

• As a “metatype”, e.g., <<subsystem>>As a “metatype”, e.g., <<subsystem>>• To tailor UML to meet a specific need or To tailor UML to meet a specific need or

purposepurpose

Page 15: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

DependencyDependency In UML modeling, a dependency relationship In UML modeling, a dependency relationship

is a relationship in which changes to one is a relationship in which changes to one model element (the supplier) impact model element (the supplier) impact another model element (the client). another model element (the client).

You can use dependency relationships in You can use dependency relationships in class diagrams, component diagrams, class diagrams, component diagrams, deployment diagrams, and use case deployment diagrams, and use case diagrams.diagrams.

You can also use a dependency relationship You can also use a dependency relationship to represent precedence, where one model to represent precedence, where one model element must precede another.element must precede another.

Dependency relationships usually do not Dependency relationships usually do not have names.have names.

Page 16: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

DependencyDependencyAs the following figure illustrates, a dependency is displayed in the diagram as a dashed line with an open arrow that points from the client model element to the supplier model element.

Page 17: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Types of dependency Types of dependency relationshipsrelationships

Because a dependency relationship Because a dependency relationship can represent several different can represent several different types of relationships, keywords types of relationships, keywords or or stereotypesstereotypes are used to show are used to show the precise nature of the the precise nature of the dependency.dependency.

Page 18: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AbstractionAbstraction

«abstraction», «derive», «refine», or «abstraction», «derive», «refine», or «trace»«trace»

Relates two model elements, or sets Relates two model elements, or sets of model elements, that represent of model elements, that represent the same concept at different levels the same concept at different levels of abstraction, or from different of abstraction, or from different viewpoints.viewpoints.

Page 19: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

BindingBinding

«bind»«bind» Connects template arguments to Connects template arguments to

template parameters to create model template parameters to create model elements from templates.elements from templates.

Page 20: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

RealizationRealization

«realize»«realize» Indicates that the client model Indicates that the client model

element is an implementation of the element is an implementation of the supplier model element, and the supplier model element, and the supplier model element is the supplier model element is the specification.specification.

Page 21: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

SubstitutionSubstitution

«substitute»«substitute» Indicates that the client model Indicates that the client model

element takes the place of the element takes the place of the supplier. supplier.

The client model element must The client model element must conform to the contract or interface conform to the contract or interface that the supplier model element that the supplier model element establishes.establishes.

Page 22: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

UsageUsage

«use», «call», «create», «use», «call», «create», «instantiate», or «send»«instantiate», or «send»

Indicates that one model element Indicates that one model element requires another model element for requires another model element for its full implementation or operation.its full implementation or operation.

Page 23: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Using Dependency Relationships Using Dependency Relationships

You can add dependency relationships to your model to You can add dependency relationships to your model to accomplish the following goals:accomplish the following goals:

Connect two packages to indicate that at least one model Connect two packages to indicate that at least one model element in the consumer package is dependent on one element in the consumer package is dependent on one model element in the supplier package. model element in the supplier package.

The dependency relationship does not indicate that all The dependency relationship does not indicate that all model elements in the consumer package are dependent. model elements in the consumer package are dependent.

Page 24: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

DependencyDependency Connect two classes to indicate that the Connect two classes to indicate that the

connection between them is at a higher connection between them is at a higher level of abstraction than an association level of abstraction than an association relationship. The dependency relationship relationship. The dependency relationship indicates that the consumer class indicates that the consumer class performs one of the following functions: performs one of the following functions: • Temporarily uses a supplier class that has Temporarily uses a supplier class that has

global scope global scope • Temporarily uses a supplier class as a Temporarily uses a supplier class as a

parameter for one of its operations parameter for one of its operations • Temporarily uses a supplier class as a local Temporarily uses a supplier class as a local

variable for one of its operations variable for one of its operations • Sends a message to a supplier class Sends a message to a supplier class

Page 25: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Using Dependency RelationshipsUsing Dependency Relationships

Indicate how to connect components Indicate how to connect components to interfaces or other componentsto interfaces or other components

This shows that the components use This shows that the components use one or more of the operations that the one or more of the operations that the interface specifies or that they depend interface specifies or that they depend on the other component during on the other component during compilation. compilation.

Page 26: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

ExampleExample In an e-commerce application, a Cart class In an e-commerce application, a Cart class

depends on a Product class because the depends on a Product class because the Cart class uses the Product class as a Cart class uses the Product class as a parameter for an add operation. parameter for an add operation.

In a class diagram, a dependency In a class diagram, a dependency relationship points from the Cart class to relationship points from the Cart class to the Product class. The Cart class is, the Product class. The Cart class is, therefore, the client model element, and therefore, the client model element, and the Product class is the supplier model the Product class is the supplier model element. element.

This relationship indicates that a change to This relationship indicates that a change to the Product class might require a change to the Product class might require a change to the Cart class.the Cart class.

Page 27: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

ExampleExample

Page 28: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

PackagesPackages

Packages are UML constructs that enable Packages are UML constructs that enable you to organize model elements into you to organize model elements into groups, making your UML diagrams groups, making your UML diagrams simpler and easier to understand. simpler and easier to understand.

Packages are depicted as file folders and Packages are depicted as file folders and can be used on any of the UML diagrams, can be used on any of the UML diagrams, although they are most common on use-although they are most common on use-case diagrams and class diagrams case diagrams and class diagrams because these models have a tendency to because these models have a tendency to grow.   grow.  

Page 29: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

PackagePackage

Page 30: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Component DiagramComponent Diagram The component diagram's main purpose is to The component diagram's main purpose is to

show the structural relationships between show the structural relationships between the components of a system. the components of a system.

UML 2 officially changes the essential UML 2 officially changes the essential meaning of the component concept; in UML meaning of the component concept; in UML 2, components are considered autonomous, 2, components are considered autonomous, encapsulated units within a system or encapsulated units within a system or subsystem that provide one or more subsystem that provide one or more interfaces. interfaces.

Although the UML 2 specification does not Although the UML 2 specification does not strictly state it, components are larger design strictly state it, components are larger design units that represent things that will typically units that represent things that will typically be implemented using replaceable" modulesbe implemented using replaceable" modules. .

Page 31: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Component DiagramComponent Diagram

Component diagrams illustrate the pieces Component diagrams illustrate the pieces of software, embedded controllers, etc., of software, embedded controllers, etc., that will make up a system. that will make up a system.

A component diagram has a higher level of A component diagram has a higher level of abstraction than a Class Diagram - usually abstraction than a Class Diagram - usually a component is implemented by one or a component is implemented by one or more classes (or objects) at runtime. more classes (or objects) at runtime.

They are building blocks so a component They are building blocks so a component can eventually encompass a large portion can eventually encompass a large portion of a system. of a system.

Page 32: RT -UML José M. Garrido Department of Computer Science Kennesaw State University
Page 33: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Component DiagramsComponent Diagrams The previous diagram demonstrates some The previous diagram demonstrates some

components and their inter-relationships. Assembly components and their inter-relationships. Assembly connectors "link" the provided interfaces supplied by connectors "link" the provided interfaces supplied by "Product" and "Customer" to the required interfaces "Product" and "Customer" to the required interfaces specified by "Order". specified by "Order".

A dependency relationship maps a customer's A dependency relationship maps a customer's associated account details to the required interface; associated account details to the required interface; "Payment", indicated by "Order"."Payment", indicated by "Order".

Components are similar in practice to package Components are similar in practice to package diagrams, as they define boundaries and are used to diagrams, as they define boundaries and are used to group elements into logical structures. group elements into logical structures.

The difference between package diagrams and The difference between package diagrams and component diagrams is that Component Diagrams component diagrams is that Component Diagrams offer a more semantically rich grouping mechanism. offer a more semantically rich grouping mechanism.

With component diagrams all of the model elements With component diagrams all of the model elements are private, whereas package diagrams only display are private, whereas package diagrams only display public items. public items.

Page 34: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Representing ComponentsRepresenting Components

Components are represented as a Components are represented as a rectangular classifier with the rectangular classifier with the keyword «component»keyword «component»

Optionally the component may be Optionally the component may be displayed as a rectangle with a displayed as a rectangle with a component icon in the right-hand component icon in the right-hand upper corner.upper corner.

Page 35: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Representing ComponentsRepresenting Components

Page 36: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Assembly ConnectorAssembly Connector

The assembly connector bridges a The assembly connector bridges a component’s required interface component’s required interface (Component1) with the provided (Component1) with the provided interface of another component interface of another component (Component2)(Component2)

This allows one component to This allows one component to provide the services that another provide the services that another component requires. component requires.

Page 37: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Assembly ConnectorAssembly Connector

Page 38: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Components with PortsComponents with Ports Using Ports with component diagrams Using Ports with component diagrams

allows for a service or behavior to be allows for a service or behavior to be specified to its environment as well as a specified to its environment as well as a service or behavior that a component service or behavior that a component requires. requires.

Ports may specify inputs and outputs as Ports may specify inputs and outputs as they can operate bi-directionally. they can operate bi-directionally.

The following diagram details a The following diagram details a component with a port for online services component with a port for online services along with two provided interfaces order along with two provided interfaces order entry and tracking as well as a required entry and tracking as well as a required interface payment. interface payment.

Page 39: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Components with PortsComponents with Ports

Page 40: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Deployment DiagramsDeployment Diagrams

A deployment diagram models the run-time A deployment diagram models the run-time architecture of a system. architecture of a system.

It shows the configuration of the hardware It shows the configuration of the hardware elements (nodes) and shows how software elements (nodes) and shows how software elements and artifacts are mapped onto elements and artifacts are mapped onto those nodes.those nodes.

A Node is either a hardware or software A Node is either a hardware or software element. It is shown as a three-dimensional element. It is shown as a three-dimensional box shape, as shown below. box shape, as shown below.

Page 41: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Deployment DiagramsDeployment Diagrams

Page 42: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node InstanceNode Instance

A node instance can be shown on a A node instance can be shown on a diagram. An instance can be diagram. An instance can be distinguished from a node by the fact distinguished from a node by the fact that its name is underlined and has a that its name is underlined and has a colon before its base node type. colon before its base node type.

An instance may or may not have a An instance may or may not have a name before the colon. The following name before the colon. The following diagram shows a named instance of diagram shows a named instance of a computer. a computer.

Page 43: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node InstanceNode Instance

Page 44: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node StereotypesNode Stereotypes

A number of standard stereotypes A number of standard stereotypes are provided for nodes, namely: are provided for nodes, namely:

«cdrom», «cd-rom», «computer», «cdrom», «cd-rom», «computer», «disk array», «pc», «pc client», «pc «disk array», «pc», «pc client», «pc server», «secure», «server», server», «secure», «server», «storage», «unix server», «user pc» «storage», «unix server», «user pc»

These will display an appropriate These will display an appropriate icon in the top right corner of the icon in the top right corner of the node symbol node symbol

Page 45: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node StereotypesNode Stereotypes

Page 46: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

ArtifactArtifact

An artifact is a product of the An artifact is a product of the software development process. process.

That may include process models (e.g. use That may include process models (e.g. use case models, design models etc), source case models, design models etc), source files, executables, design documents, test files, executables, design documents, test reports, prototypes, user manuals, etc. reports, prototypes, user manuals, etc.

An artifact is denoted by a rectangle An artifact is denoted by a rectangle showing the artifact name, the «artifact» showing the artifact name, the «artifact» keyword and a document icon, as shown keyword and a document icon, as shown below.below.

Page 47: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

ArtifactArtifact

Page 48: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AssociationAssociation

In the context of a deployment In the context of a deployment diagram, an association represents a diagram, an association represents a communication path between nodescommunication path between nodes

The following diagram shows a The following diagram shows a deployment diagram for a network, deployment diagram for a network, depicting network protocols as depicting network protocols as stereotypes, and multiplicities at the stereotypes, and multiplicities at the association ends. association ends.

Page 49: RT -UML José M. Garrido Department of Computer Science Kennesaw State University
Page 50: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node as ContainerNode as Container

A node can contain other elements, A node can contain other elements, such as components or artifacts. such as components or artifacts.

The following diagram shows a The following diagram shows a deployment diagram for part of an deployment diagram for part of an embedded system, depicting an embedded system, depicting an executable artifact as being executable artifact as being contained by the motherboard node contained by the motherboard node

Page 51: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Node as ContainerNode as Container

Page 52: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Physical Architectural ViewsPhysical Architectural Views

Subsystem and component viewSubsystem and component view Distribution ViewDistribution View Resource and Concurrency ViewResource and Concurrency View Safety and Reliability ViewSafety and Reliability View Deployment ViewDeployment View

Page 53: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Physical Architectural ViewsPhysical Architectural Views Construct architectural design modelsConstruct architectural design models

Subsystem ModelSubsystem Model Concurrency ModelConcurrency Model Distribution ModelDistribution Model Safety and Reliability ModelSafety and Reliability Model Deployment ModelDeployment Model

Capture withCapture with Class DiagramsClass Diagrams Package DiagramsPackage Diagrams Subsystem DiagramsSubsystem Diagrams Task DiagramsTask Diagrams Deployment DiagramsDeployment Diagrams

Page 54: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Subsystem and Component ViewSubsystem and Component View

A A subsystemsubsystem• is a large object that provides opaque interfaces is a large object that provides opaque interfaces

to its clients and achieves its functionality to its clients and achieves its functionality through delegation to objects that it owns through delegation to objects that it owns internallyinternally

• contains components and objects on the basis of contains components and objects on the basis of common run-time functional purposecommon run-time functional purpose

• a metasubtype of both a metasubtype of both Classifier Classifier and and PackagePackage A A componentcomponent

• is the basic reusable element of softwareis the basic reusable element of software• organizes objects together into cohesive run-organizes objects together into cohesive run-

time units that are replaced together.time units that are replaced together.• provides language-independent opaque provides language-independent opaque

interfacesinterfaces

Page 55: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Distribution ArchitectureDistribution ArchitectureDistribution model refers to Distribution model refers to Policies for distribution objects among Policies for distribution objects among

multiple processors and communication multiple processors and communication links, e.g.links, e.g.• Asymmetric distribution (dedicated links to Asymmetric distribution (dedicated links to

objects with objects with a priori a priori known location)known location)• Publish-SubscribePublish-Subscribe• CORBA and Broker symmetric distributionCORBA and Broker symmetric distribution

Policies for managing communication linksPolicies for managing communication links• Communication protocolsCommunication protocols• Communication quality of service managementCommunication quality of service management

Page 56: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Safety and Reliability ModelSafety and Reliability Model

Safety and reliability model refers to Safety and reliability model refers to the structures and policies in place to the structures and policies in place to ensureensure• SafetySafety

Freedom from accidents or lossesFreedom from accidents or losses• ReliabilityReliability

High MTBFHigh MTBF Fault toleranceFault tolerance

Safety and fault tolerance Safety and fault tolerance always always require some level of redundancyrequire some level of redundancy

Page 57: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Concurrency ArchitectureConcurrency Architecture

Refers toRefers to• Identification of task threads and their propertiesIdentification of task threads and their properties• Mapping of passive classes to task threadsMapping of passive classes to task threads• Identification of synchronization policiesIdentification of synchronization policies• Task scheduling policiesTask scheduling policies

Unit of concurrency in Unit of concurrency in UMLUML is the «active» is the «active» objectobject• «active» objects are added in architectural «active» objects are added in architectural

design to organize passive objects into threadsdesign to organize passive objects into threads• «active» objects contain passive semantic «active» objects contain passive semantic

objects via composition and delegate objects via composition and delegate asynchronous messages to themasynchronous messages to them

Page 58: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Task IdentificationTask Identification Single event groups -- for simple systems, you may Single event groups -- for simple systems, you may

define a thread fordefine a thread for each event typeeach event type Event source --- group all events from a single Event source --- group all events from a single

source together for a threadsource together for a thread Related information --- For example, all numeric Related information --- For example, all numeric

heart dataheart data Interface device --- For example, a bus interfaceInterface device --- For example, a bus interface Event properties --- Events with the same Event properties --- Events with the same

period, or aperiodic eventsperiod, or aperiodic events Target object --- For example, waveform queue or Target object --- For example, waveform queue or

trend databasetrend database Safety Level --- For example, BIT, redundant thread Safety Level --- For example, BIT, redundant thread

processing,processing,

Page 59: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Concurrency ModelConcurrency Model

Active object is a stereotype of an Active object is a stereotype of an object which owns the root of a object which owns the root of a threadthread

Active objects normally aggregate Active objects normally aggregate passive objects via passive objects via composition composition relationsrelations

Standard icon is a class box with Standard icon is a class box with heavy lineheavy line

Page 60: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Task DiagramTask Diagram

A task diagram is a class diagram A task diagram is a class diagram that shows only model elements that shows only model elements related to the concurrency modelrelated to the concurrency model• – – Active objectsActive objects• – – Semaphore objectsSemaphore objects• – – Message and data queuesMessage and data queues• – – Constraints and tagged valuesConstraints and tagged values

May use opaque or transparent May use opaque or transparent interfacesinterfaces

Page 61: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Elements of Task DiagramElements of Task Diagram

Mutex semaphoreMutex semaphore Message queueMessage queue «active» object as basis for threads«active» object as basis for threads Schedulability propertiesSchedulability properties

Page 62: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Quality of Service ConceptsQuality of Service Concepts

An abstract, technology-independent An abstract, technology-independent representation of the engineering model representation of the engineering model that can be specified using the general that can be specified using the general concept of concept of Quality of Service (QoS):Quality of Service (QoS):• a specification (usually quantitative) of how a a specification (usually quantitative) of how a

particular service is (to be) performedparticular service is (to be) performed• e.g. throughput, capacity, response timee.g. throughput, capacity, response time

The specification of a model element can The specification of a model element can include:include:• offered QoS: offered QoS: the QoS that it provides to its the QoS that it provides to its

clientsclients• required QoS: required QoS: the QoS it requires from other the QoS it requires from other

components to support its QoS obligationscomponents to support its QoS obligations

Page 63: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

Resources and Quality ofResources and Quality ofServiceService

Resource: Resource: an element whose service capacity an element whose service capacity is limited, directly or indirectly, by the finite is limited, directly or indirectly, by the finite capacities of the underlying physical capacities of the underlying physical computing environmentcomputing environment

The services of a resource are characterized The services of a resource are characterized by one or more by one or more quality of service (QoS) quality of service (QoS) attributesattributes• capacity, reliability, availability, response time, capacity, reliability, availability, response time,

etc.etc.

Page 64: RT -UML José M. Garrido Department of Computer Science Kennesaw State University

AbstractionAbstraction

One person’s abstraction is another’s One person’s abstraction is another’s ConcretizationConcretization

Models can always be viewed one multiple Models can always be viewed one multiple levels of abstractionlevels of abstraction

Analysis may be need to be done at Analysis may be need to be done at any or any or all all of these levels of abstractionof these levels of abstraction

There is intrinsic difficulty in maintaining There is intrinsic difficulty in maintaining consistency among different levels of consistency among different levels of abstractionabstraction

The profile refers to this as the The profile refers to this as the realization realization mappingmapping