rhapsody to opnet

62
© 2008 The MITRE Corporation. All rights Reserved For Internal MITRE Use. J. James, G. Quinn, S. Orr and E. Walters September 2008 Rhapsody to OPNet This technical data was produced for the U. S. Government under Contract No. FA8721-09-C-0002, and is subject to the Rights in Technical Data-Noncommercial Items clause at (DFARS) 252.227-7013 (NOV 1995)

Upload: rinah-england

Post on 30-Dec-2015

48 views

Category:

Documents


0 download

DESCRIPTION

Rhapsody to OPNet. J. James, G. Quinn, S. Orr and E. Walters September 2008. This technical data was produced for the U. S. Government under Contract No. FA8721-09-C-0002, and is subject to the Rights in Technical Data-Noncommercial Items clause at (DFARS) 252.227-7013 (NOV 1995). Objective. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Rhapsody to  OPNet

© 2008 The MITRE Corporation. All rights Reserved.For Internal MITRE Use.

J. James, G. Quinn, S. Orr and E. Walters

September 2008

Rhapsody to OPNet

This technical data was produced for the U. S. Governmentunder Contract No. FA8721-09-C-0002, and issubject to the Rights in Technical Data-NoncommercialItems clause at(DFARS) 252.227-7013 (NOV 1995) 

Page 2: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

2

Objective

■ Provide a manual for creating a model using the Unified

Modeling Language (UML) tool, Rhapsody, that can be

exported into the analysis tool, OPNET

Expedite Integrated Design and Analysis

Page 3: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

3

Applicable Models

■ Contain model functionality that has associated timing parameters

– End-to-end deadline (DL) for sequence diagram and/or periodicity of trigger (OP) for sequence diagram

– Duration for operations (dur) within the sequence diagram

■ Contain model classes/objects that are allocated to resources (e.g., processors (Proc))itsUser:User itsDisseminate

:Disseminate

disseminateInfo()

evInfo()

disseminateInfo()

evInfo()

itsGenerate:Generate

generateData()generateData()

itsProcess:Process

evProcessData()

processData()

evDisseminateInfo()

evProcessData()

processData()

evDisseminateInfo()

itsReceive:Receive

evRequestInfo()

receiveRequests()

evGenerateData()

evRequestInfo()

receiveRequests()

evGenerateData()

{Name=evRequestInfoDL=(100,'ms')OP=(125,'ms')}

{Name=disseminateInfodur(L)=(10,'ms')}

{Name=processDatadur(L)=(30,'ms')}

{Name=generateDatadur(L)=(20,'ms')}

{Name=disseminateInfodur(L)=(10,'ms')}

{Name=itsReceiveProc=CommunicationProcessor}

{Name=itsDisseminateProc=CommunicationProcessor}

{Name=itsProcessProc=ProcessingProcessor}

{Name=itsGenerateProc=GenerationProcessor}

Page 4: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

4

Process Currently Utilizes

■ Telelogic Rhapsody 7.1– UML 2.1 Sequence diagrams

– Schedulability, Performance and Time (SPT) profile

– XML Metadata Interchange (XMI 2.1)

■ Software Performance Model Interchange Format (S-PMIF)

■ Java Runtime Environment (JRE) 5.0

■ OPNET 14.5 – Modeler and Simulation Runtime

– Detailed Server Model

Runtime Process

UML – Unified Modeling LanguageSPT- Schedulability, Performance and TimeXMI – XML Metadata Interchange

Industry Standards

S-PMIF – Software Performance Model Interchange FormatProposed Standard

UML – Sequence Diagrams

Response Time Statistics

Page 5: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

retrieveFile(imageFile)

:FileManagerServices

retrieveFile(imageFile)

saveFile()saveFile()

ENV :SensorDataReceiver

radarData=buildInfoObject(MPRTIPData)

AllMessageTilesReceived(MPRTIPData)

receiveRawSensorData()

radarData=buildInfoObject(MPRTIPData)

AllMessageTilesReceived(MPRTIPData)

receiveRawSensorData()

sendImageryToDataWriter(radarImagery)

:SensorDataWriter

sendImageryToDataWriter(radarImagery)

writeFile()

eImageReadyToPublish()

eSaveFile(file)

writeFile()

eImageReadyToPublish()

eSaveFile(file)

:LayerRefresh

eRetrieveFile(ImageFile)

:ImageryConvert

eRetrieveFile(ImageFile)

convertImagery()

:ImageryImportandRender

performMapRenderingServices()

eDDSMessageReceived(ImageryNotification)

ddsMessageReceived(IndexedImagery)

convertImagery()

performMapRenderingServices()

eDDSMessageReceived(ImageryNotification)

ddsMessageReceived(IndexedImagery)

:SpatialDataManager

mapStore(map)

eMapStore(map)

mapStore(map)

eMapStore(map)

Process DataProcess Data

Convert And Distribute Sensor Data

Convert And Distribute Sensor Data

UML Sequence Diagram

Lifeline

Object or Classifier Role[< object name >] : < class name >

Object name in all of the above examples is blank so they are

anonymous. Class name specifies the underlying class that the Object is an

instance of.

MessageAn instance of an

operation defined on the Class that the

Lifeline is an instance of

Triggering Message

Reflexive Message

Page 6: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

6

Model Functionality Captured in UML Sequence Diagrams■ Initial event is the trigger■ Pattern that works well is that an event is processed by one

or more operations (as a Reflexive messages) – Ultimately that results in an event to an new lifeline

■ Level of detail should be consistent with the performance data available

itsUser:User itsDisseminate:Disseminate

disseminateInfo()

evInfo()

disseminateInfo()

evInfo()

generateData()

itsGenerate:Generate

generateData()

evProcessData()

itsProcess:Process

processData()

evDisseminateInfo()

evProcessData()

processData()

evDisseminateInfo()

evRequestInfo()

itsReceive:Receive

receiveRequests()

evGenerateData()

evRequestInfo()

receiveRequests()

evGenerateData()

trigger

Operation

event

Page 7: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

7

Model Contains SPT Profile

■ SPT Profile needs to be added to Your Model– The default location for the profile is:

– One method is to add As Reference using Add to Model

Page 8: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

8

Using the SPT Profile

■ There are Stereotype, Tag and Property fields in Rhapsody associated with– Classes, events and operations that apply throughout the

model– Instances of classes, events and operations for a specific

sequence diagram

■ There are several methods for capturing performance data and processor allocations in Rhapsody UML – Using Rhapsody to enter data into the UML stereotype and SPT

tag property fields– Using the RapidRMA* plug-in for Rhapsody to enter data into

the RapidRMA property fields – Using Rhapsody to enter data into the RapidRMA property

fields

■ The method used for capturing SPT data in the model will determine which stereotype, tag and property fields apply

*RapidRMA is a separate product that can be obtained from TriPacific

Page 9: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

9

Definitions

■ Stereotype - a notation allowing the extension of UML symbols. Some are defined within Profiles, eg. SPT (Schedulability, Performance and Time) Profile

■ Tag – name given to the extension attribute: eg SPT: SADuration

■ Property – ad hoc extensions given by proprietary tools like RapidRMA– These attributes to do not export in XMI in Rhapsody– They must be mapped to appropriate SPT tags for use in

performance analysis by OPNET etc.– We have supplied a VBA script for Rhapsody to map these

properties

Page 10: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

10

USING RHAPSODY TO CAPTURE SPT DATA

Page 11: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

11

Using Rhapsody to Capture SPT Data

■ Processor allocations are captured in class stereotype and tag fields

■ Trigger (initial event) and thread reoccurrence (load) data are captured in the associated sequence diagram message stereotype and tag fields

■ The data in these stereotype and tag fields appear in the Rhapsody’s XMI export and are mapped to S-PMIF in later steps

Page 12: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

12

Using Rhapsody: Processor Allocations

■ For each class associated with an object in the sequence diagram bring up Features

Page 13: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

13

Using Rhapsody: Processor Allocations■ Using the General tab,

select SAScheduler in the Stereotype field

■ Using the Tags tab, enter the resource/processor to which the class has been allocated in the SAExecution Engine field

■ Here: CommunicationProcessor

Page 14: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

14

Using Rhapsody: Trigger Data

■ Right click on trigger message and bring up Features

Page 15: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

15

Using Rhapsody: Trigger Data

■ Right click on trigger message and bring up Features– Using the General tab,

select SATrigger in the Stereotype field

– Using the Tags tab, enter the periodicity in the SAOccurrence field

Page 16: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

16

Using Rhapsody: Operation Data

■ For each operation message in the sequence diagram bring up Features– Using the General tab,

select RTAction in the Stereotype field

– Using the Tags tab, enter the duration in the RTDuration field

Page 17: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

17

USING RAPIDRMA TO CAPTURE SPT DATA

Page 18: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

18

Using RapidRMA to Capture SPT Data

■ One method in Rhapsody– RapidRMA must be installed – Tools/ Edit Timing Properties– Start by adding processors– Then allocate to classes

Page 19: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

19

Using RapidRMA: Trigger Data

■ Select the trigger event in the Events folder and use Tag:– SATrigger::SAOccurrencePattern to enter the periodicity– SAAction::SAAbsDeadline to enter the deadline

Page 20: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

20

Using RapidRMA: Operation Data

■ Operation data can be entered using either the realization operation or the sequence diagram message– Use the realization-operation when it is triggered by only one

event or the duration of the operation remains the same for each triggering event

– Use the message when it is triggered by more that one event and the duration of the operation differs for at least two triggering events

Page 21: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

21

Using RapidRMA: Operation for Operation Data

■ For each operation message in the sequence diagram. select the operation’s class in the Class folder

■ For each operation in the class, select the operation and use Tag:– Local::SAAction::RTduration to enter the duration

Page 22: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

22

Using RapidRMA: Message for Operation Data ■ Not all data entered by RapidRMA is visible to Rhapsody

and not all data entered into Rhapsody is visible to RapidRMA– Data must be visible to Rhapsody for it to be contained in the

XMI– Data must be visible to RapidRMA when RapidRMA is being

used for performance analysis

■ For duel visibility, operation SPT data must be entered twice for messages– Using RapidRMA– Using Rhapsody

Page 23: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

23

Using RapidRMA: Message for Operation RapidRMA Visibility■ Select Interactions■ Select each operation’s message and use Tag:

– Local::SAAction::RTduration to enter the duration

Page 24: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

24

Using Rhapsody: Message for Operation Rhapsody Visibility■ For each operation message in the sequence diagram bring

up Features– Using the Properties tab, change View Common to View All– Select Local::SAActionAction– For Message, enter the duration in the RTduration field

View All

Page 25: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

25

USING RHAPSODY TO CAPTURE SPT DATA IN

RAPIDRMA FIELDS

Page 26: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

26

■ For each class associated with an object in the sequence diagram bring up Features– Select the Realization– Using the Properties tab, change View Common to View All– Select SAResource– For Class, enter the resource/processor to which the class has

been allocated in the SAExecution Engine field

View All

Page 27: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

27

Using Rhapsody to Capture SPT Data in RapidRMA Property Fields: Trigger Data■ For the trigger message bring up Features

– Select the Realization– Using the Properties tab, change View Common to View All– Select SAAction, enter the deadline in SAAbsDeadline– Select SATrigger, enter the periodicity in SAOccurrencePattern

View All

Page 28: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

28

■ For each operation message in the sequence diagram bring up Features– Select the Realization– Using the Properties tab, change View Common to View All– Select Local SAAction, enter the duration in RTduration

View All

Page 29: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

29

Copy RapidRMA data to SPTusing VBA Script■ From the Rhapsody Menu:

– Tools VBA Visual Basic Editor

■ From the Visual Basic Editor Menu:– File Import File [only necessary once per session]

■ Select the “CopyRMAtoSPT.bas” file,■ And the CExecutingMessage.cls file if necessary

– (if the former file is not sufficient for a successful run)

■ From the Visual Basic Editor Menu:– Run Run Macro

■ Choose the CopyRMAtoSPT macro– You should receive a “Done” dialog when the import for each

thread is finished

■ Verify that the values you imported now exist in the tags for your sequence diagrams – as above

Page 30: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

30

CREATING AN ANALYZABLE DESIGN MODEL

Page 31: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

Creating an Analyzable Design Model

■ Create a UML Sequence Diagram per thread1. Specify the inter-arrival time for the thread

2. Specify the priority for the thread (optional)

3. Mark asynchronous messages (splits) (optional)

4. For each Lifeline, identify an Execution Engine (optional)

5. For each Execution Engine, identify the number of processors it has (optional)

6. For each Lifeline, identify a scheduling policy (optional)

7. Mark Lifelines representing passive resources (optional)

8. Specify the duration of each reflexive message within the thread

Page 32: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

Specifying Times

■ Whenever specifying times, use the following format:– {100,'ms'} for 100 milliseconds

Units Legal Abbreviations

Minutes mins, m

Seconds secs, sec, s

Millseconds ms

Microseconds us

Nanoseconds ns

Page 33: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

1. Thread Inter-arrival Time(Required)

■ Stereotype the Triggering Message with SATrigger– Set the inter-arrival time using the SAoccurrence tag (See

Specifying Times)

■ OR stereotype the Triggering Message with PAopenLoad– Set the inter-arrival time using the PAoccurrence tag (See Specifying

Times)

Page 34: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

2. Thread Priority(Optional)

■ Stereotype the Triggering Message with PAopenLoad– Set the priority using the PApriority tag

Page 35: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

3. Asynchronous Messages (Optional)

■ Set Message Type of Message to Event.

Page 36: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

4. Execution Engines(Optional)

■ Stereotype the Object with SAScheduler– Set the SAExecutionEngine tag to the name of the processing

unit that the Object runs on

■ OR stereotype the Object’s underlying Class with SAScheduler– Set the SAExecutionEngine tag to the name of the processing

unit that the Object runs on

Page 37: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

5. Number of Processors(Optional)

■ Create a Class (not as the realization of a lifeline or in the sequence diagram at all)– Name the Class after the Execution Engine with multiple

processors– Stereotype the Class with SAEngine– Set the tag SAresources to the number of processors the

execution engine has

Page 38: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

6. Scheduling Policy(Optional)

■ Only applicable for Lifelines that are Execution Engines■ If the Object is stereotyped with SAScheduler

– Set the SASchedulingPolicy tag to the desired scheduling policy

■ OR if the Object’s underlying Class is stereotyped with SAScheduler– Set the SASchedulingPolicy tag to the desired scheduling

policy

■ Legal values for SASchedulingPolicy:– RateMonotonic– FixedPriority– FIFO– PS

Page 39: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

7. Passive Resources(Optional)

■ Only applicable for lifelines that are not Execution Engines■ Stereotype the Object’s underlying Class with SAResource

– Name of the Object’s underlying Class becomes the name of the Passive Resource

Page 40: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

8. Durations(Required)

■ Only should be done on Reflexive Messages■ Stereotype the Message with RTaction

– Set tag value RTduration to the time it takes for the message to execute (See Specifying Times)

■ OR stereotype the underlying Operation– (See Specifying Times)

Page 41: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

Executing Transform

java –jar XmlTransformer < input file > Uml21ToSpmif4 < output file >[ < sequence diagram 1 >][ <sequence diagram 2 >][…]

■ The XmlTransformer application is extensible with new transforms.

■ The ‘Uml21ToSpmif4’ argument specifies the transform to execute.– Uml21ToSpmif4 represents the transform that accepts

Rhapsody UML 2.1 in XMI 2.1 exports and transforms them to S-PMIF (version 4)

– The Uml21ToSpmif4 transform supports specifying specific sequence diagrams to transform. If none are specified, it transforms all sequence diagrams.

– The Uml21ToSpmif4 transform will output warnings for messages in processed sequence diagrams that do not have an underlying operation specified

– In version 7.1 if SPT data or entire file is missing; remove threads till “bad” thread(s) are found and export has SPT data

■ Error message being put in XmlTransformer application to help with this

Page 42: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

42

Export XMI from Rhapsody

■ Start menu All Programs Telelogic Telelogic Rhapsody 7.1 XMI Toolkit Rhapsody XMI Toolkit

■ Using the Rhapsody XML Toolkit – In most cases, Export XMI should be available under the Tools

menu within Rhapsody as well– Export the XMI for the project

■ Use UML and XMI versions 2.1

– Things should be okay if there are warnings.– Note where it exported the file– In version 7.1 if SPT data or entire file is missing; remove

threads till “bad” thread(s) are found and export has SPT data■ Error message being put in XmlTransformer application

Page 43: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

43

Translate XMI to S-PMIF

java –jar XmlTransformer < input file > Uml21ToSpmif4 < output file >[ < sequence diagram 1 >][ <sequence diagram 2 >][…]

■ Eg:– Java –jar XmlTransformer.jar E10_Rhap71_SPT21_AMSTEBad.xml

Uml21ToSpmif4 SPMIF_AMSTE_bad.xml

■ The XmlTransformer application is extensible with new transforms.

■ The ‘Uml21ToSpmif4’ argument specifies the transform to execute.– Uml21ToSpmif4 represents the transform that accepts Rhapsody UML

2.1 in XMI 2.1 exports and transforms them to S-PMIF (version 4)– The Uml21ToSpmif4 transform supports specifying specific sequence

diagrams to transform. If none are specified, it transforms all sequence diagrams.

– The Uml21ToSpmif4 transform will output warnings for messages in processed sequence diagrams that do not have an underlying operation specified

Page 44: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

44

Transform the S-PMIF File into OPNET XML

■ You will need the following libraries in your classpath:– JAXB Reference Implementation Files:– activation.jar– jaxb-api.jar– jaxb-xjc.jar – jaxb-impl.jar  – jsr173_1.0_api.jar– GNU Getopt (for the command-line):– java-getopt-1.0.13.jar 

Page 45: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

45

Transform the S-PMIF File into OPNET XML (cont.)

■ Use the following invocation:– java -jar spmif2opnet.jar -i<input S-SPMIF file>– [-o<output OPNET XML file>] – [-p<OPNET properties file>]

  [-P DIRECT | SCALED | ORDERED | RM]– [-n] (Generate OPNET Network)

  [-h] (Print this help message)

■ Eg: – Java –jar spmif2opnet.jar -i SPMIF_AMSTE_bad.xml –o

amstebad_SPMIF_opnet.xml –n –P RM

Page 46: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

46

Cygwin script

■ If Cygwin installed both steps are handled in one script■ Be sure xmi2opnet.pl is available■ ./xmi2opnet.pl <input XML file><Rhapsody Project Name>■ EG: ./xmi2opnet.pl E10_Rhap71_SPT21_amsteGood.xml

TomCase2_good

Page 47: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

47

■ Open OPNET Modeler 14.5, and select File New■ Select a New Project, name it

– do not use the Startup Wizard

■ From the Project Menu:– Topology Import Topology From XML File…

■ Select your OPNET XML file■ Select the Logical Network

– Check the Task and Server Definitions to verify the data made it in

■ If you chose to generate the network, check its structure

Page 48: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

48

■ Sometimes the net has problems with ports. – Select all links. Under Topology select Verify Links/Choose

“transceivers for selected links”– We have simple work-around in code

■ Select all devices■ Right click on background

– Select: Choose individual DES statistics. – To see Response times set under Global Statistics/Custom

Application■ Task Response time

– To see CPU utilizations set under Node Statistics/Server Jobs■ CPU Total Utilization

■ Run the OPNET Simulation! (running man)

Page 49: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

49

Miscellaneous OPNET Lessons

■ Always make sure that the interarrival time of any thread > 0– On each life line in the thread– There are checks in both Java programs for this– Sometime realization has not been set in the UML

■ This results in zero service times

■ Tests for this are being made now

– And that the total sum of the thread's execution time > 0

■ Detailed picture of the behavior of a single OPNET device – e.g. the utilization several tasks on a particular server – Make sure you turn the “DES Values per Statistic” up by an

order of magnitude– Ensures that the behavior you want to see is not missed

because of low sampling

Page 50: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

50

Miscellaneous Lessons (cont.)

■ "Detailed/Specialized Server License" is required– Our generated simulations depend on it

■ OPNET's simulation compilation process is much easier when you use the recommended environment– OPNET 12 and MSVC 7 (.NET 2003)– OPNET 14 and MSVC 9 (.NET 2008)– Simulator options “force recompile” to make sure you compile

with the same MSVC version■ On systems with multiple versions of MSVC

■ If a ‘Default” Node gets created in the Network diagram– This means that a SAExecutionEngine was not set for a class in

the UML– Usually a modeling problem

Page 51: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

51

Miscellaneous Lessons (cont.)

■ To do RT scheduling in OPNet– Set the OS slice time to a large number– OPNET Server Config Object

■ Operating System Definitions

■ Change Solaris (our current default) Timeslice to some large amount (e.g., 1000 sec)

■ To do simple lock (only one works) – Assign all threads to a phase to on a device with the same

priority (highest)– Assign RT scheduling to that device

Page 52: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

52

HOW TO MODEL SW THREAD IN OPNET

Page 53: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

53

Translation of OPNET Terms

■ Tasks– Thread of Phases thru networked nodes that run SW

■ Phases– Steps in Thread– Source, Destination pair of logical nodes

■ Typically a transport via a network element

■ Source and Destination can be same node == “SW step”

– Use of Server resource by associating a Job■ Job runs on server and has CPU time and other resources (memory,

disk)

■ Jobs have priority on a physical server

• Application - Custom– Set of Tasks to be scheduled

■ Profiles– Load - how often want to run Applications

Page 54: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

54

Determine Use of OPNET Constructs

■ To Deploy an application on a physical network– Associate the reusable pattern of the OPNET Application on top

of a given network model– Make node associations

■ Physical network– Models of realizable nodes

■ Eg server = Sun Ultra 10 333MHz; 1 CPU

– Network elements■ Ethernet 10 BaseT

■ Connecting Nodes

■ Application– Tasks-Applications defined in tables

Page 55: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

55

Define Tasks in OPNET

Page 56: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

56

Define Applications

CustomApplication

Page 57: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

57

Define Load = Profile

Interarrival times

Page 58: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

58

Deploy Custom Application on our Network

Page 59: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

59

Server Configuration Resource Use by Jobs

Cpu timesJobsNamed forAssociatedphases

Page 60: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

60

Physical ServerPriority - Jobs (steps)

Priority

Task1

Task2

Page 61: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

61

Server Contention

Page 62: Rhapsody to  OPNet

© 2009 The MITRE Corporation. All rights Reserved.

62

Associate Phases with Jobs

Job

Phase