You are on page 1of 103

Session 1501

Introduction to
Process Modeling Methodology
R&D Solutions for Commercial and Defense Networks

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any
CONFIDENTIAL ─ format
RESTRICTED
ACCESS:
This information
may not Technologies,
be disclosed, copied,
or transmitted in any
without the
prior written
consent of OPNET
Inc.
format without ©
the
priorOPNET
written Technologies,
consent of OPNET
2007
Inc. Technologies, Inc.
© 2010 OPNET Technologies, Inc.

1501 Introduction to Process Modeling Methodology

What Are We Going To Learn?

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

2

1501 Introduction to Process Modeling Methodology

Agenda
ƒ Introduction / motivation
ƒ Process Modeling Methodology explained through an example

• Lab for students to apply the methodology (lab 1)

ƒ Dynamic processes

• Introduction
• Process life cycle

Lab 2
• Interrupt steering
• Process communication
ƒ Lab 3
ƒ

ƒ Debugging processes in ODB
ƒ Conclusion

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

3

or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. 4 . Inc. copied.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc.

Inc. most efficient method of development • Protection from some common pitfalls • Produces consistent results • Indispensable for larger models ƒ But first… What is a Process Model? CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. copied. 5 . © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Introduction ƒ What is the Process Modeling Methodology (PMM)? • A systematic approach to creating process models in OPNET Modeler® • Quickest.

Inc. 6 . or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology OPNET Environment Process model is the heart of custom simulation development CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. copied. Inc.

tcp_manager_v3 PMM .1501 Introduction to Process Modeling Methodology Comparing Approaches Flower Petal . Inc. Inc. 7 . © 2010 OPNET Technologies. copied.tcp_conn_v3 Both of these are parts of the standard OPNET TCP model CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.

© 2010 OPNET Technologies. 8 . Inc. copied. Inc. or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Process Model Dynamics init msg1 INITIALIZED MSG1 connect CONNECTED FAIL RECOVER register REGISTERED MSG2 wait msg2 FAIL FAIL fail MSG3 msg3 Beginners avoid RED states. but they are very important! CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. 8:00 9 . and Actions Important definitions State Event Alarm Action / State Wakeup asleep awake Stimulus to move system Condition of system 0:00 Time progresses 6:00 Response of system to stimulus Instantaneous Condition of system 6:00 Time progresses CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. copied.1501 Introduction to Process Modeling Methodology States. Events. © 2010 OPNET Technologies.

There goes 40 hours of my life.. I guess that CAN happen.” ƒ Avoids painting yourself into a corner • “I have to start from scratch. 10 . or transmitted in any format without the prior written consent of OPNET Technologies.” PMM is your roadmap to process model development success CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied.. Inc.1501 Introduction to Process Modeling Methodology Motivation ƒ PMM helps the user over many common pitfalls ƒ Gets you past the initial blank screen • “Where do I even begin?” ƒ Reveals unexpected relationships • “Oh yeah. © 2010 OPNET Technologies. Inc.

1501 Introduction to Process Modeling Methodology

Steps for Building a Process Model
ƒ Obtain protocol specification
ƒ Design using the methodology
ƒ Review the design
ƒ Implement in OPNET

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

11

1501 Introduction to Process Modeling Methodology

Process Modeling Methodology Stages
ƒ First four stages: Design

• Stage 1: Context definition
• Stage 2: Process level decomposition
• Stage 3: Enumeration of events (per process)
• Stage 4: Event Response Table development (per process)
ƒ

1
2
3

This is an iterative stage and is the meat of process model
methodology

ƒ Last stage: Implementation in OPNET

4

• Stage 5: Specification of process actions (per process)

5

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

12

1501 Introduction to Process Modeling Methodology

Agenda
ƒ Introduction / motivation
ƒ Process Modeling Methodology explained through an example

• Lab for students to apply the methodology (lab 1)

ƒ Dynamic processes

• Introduction
• Process life cycle

Lab 2
• Interrupt steering
• Process communication
ƒ Lab 3
ƒ

ƒ Debugging processes in ODB
ƒ Conclusion

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

13

1501 Introduction to Process Modeling Methodology Process Modeling Methodology Example 1: Stop-and-Wait Retransmission Protocol ƒ Protocol for the Data Link Layer at the sending side only ƒ Basic functionality: Provide reliable communications over a lossy channel ƒ Accept frames from the upper layer and send them to the physical layer CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. copied. 14 . © 2010 OPNET Technologies.

2005 Proprietary ƒ Receive frames from higher layer ƒ Transmit frame over physical layer ƒ Must receive an acknowledgment before sending the next frame ƒ Queue frames arriving from the higher layer if the process is waiting for acknowledgment for a previous frame ƒ Retransmit the frame if an acknowledgment is not received before the end of a timeout period ƒ When the link fails. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Process Modeling Methodology Example 1: Protocol Requirements Amalgamated Communications Kompany (ACK) C. Ash SWaRe Protocol Version 1. © 2010 OPNET Technologies. Inc. copied. frames cannot be sent or retransmitted until the link recovers Marketing 9 Sales 9 Simulation CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.3. R. 15 .X Aug 23.

Inc. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. Inc. 16 . copied.1501 Introduction to Process Modeling Methodology Just for Fun… How many lines of OPNET code are needed to model this protocol? CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

copied. Inc.1501 Introduction to Process Modeling Methodology Stage 1: Context Definition ƒ Fit this piece into the big picture: ƒ Step 1: Identify interdependent modules ƒ Step 2: Select communication mechanisms with interdependent modules ƒ Step 3: Develop diagram of system and interdependent modules 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. 17 . © 2010 OPNET Technologies. Inc.

copied. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 1: Context Definition (cont.) 1 2 3 Higher Layer Frames for Transmission 4 SWaRe Protocol Transmitted Frames Acknowledgements Physical Layer CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 5 18 . or transmitted in any format without the prior written consent of OPNET Technologies.

19 . or transmitted in any format without the prior written consent of OPNET Technologies. determine circumstances of process creation and which process will be the root 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.1501 Introduction to Process Modeling Methodology Stage 2: Process-Level Decomposition ƒ Step 1: Determine which process model decomposition technique is applicable to the system • Single process model • Multiple (parent-child) process models ƒ Step 2: If a multi-process implementation is chosen. identify the areas of responsibility assigned to each process ƒ Step 3: For multi-process implementations. © 2010 OPNET Technologies. Inc. Inc. copied.

Inc. © 2010 OPNET Technologies. copied. Inc. 20 .1501 Introduction to Process Modeling Methodology Stage 2: Process-Level Decomposition (cont. or transmitted in any format without the prior written consent of OPNET Technologies.) ƒ Use a single process for this example 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. 21 . © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 3: Enumeration of Events ƒ Step 1: Define logical events of each process ƒ Step 2: Select event implementation methods 1 2 3 4 Frames for Transmission Ack timeout SWaRe Protocol ! ! System – Link Fail System – Link Up 5 Acknowledgements CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied.

or transmitted in any format without the prior written consent of OPNET Technologies.) Event Name Event Description Interrupt Type 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. 22 . Inc. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 3: Enumeration of Events (cont.

) Event Name ! ! Event Description Interrupt Type Frame Arrival A frame has arrived from the higher level. copied. Self 1 2 3 4 Acknowledgement Received An acknowledgement Stream for the last transmitted frame has been received. Recovery Power Up The process starts. Inc.1501 Introduction to Process Modeling Methodology Stage 3: Enumeration of Events (cont. Inc. Link Fail The link has failed. Failure Link Up The link has recovered. Begin Simulation CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Stream Timeout The retransmission timer has expired. © 2010 OPNET Technologies. 5 23 . or transmitted in any format without the prior written consent of OPNET Technologies.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development ƒ The Event Response Table specifies how the model reacts to various events. depending upon the state of the model State Event Condition Action 1 2 3 Final State 4 ƒ The events and actions are indicated in the specification ƒ What are the conditions? ƒ What are the states? CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 5 24 . copied. Inc.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Conditions State Event Condition Action CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. State 25 .

1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – Identifying States ƒ A state… • Represents a blocking point of the process • Corresponds to particular sequences of events having occurred • Reacts to events in a specific manner • Is mutually exclusive of and complementary to other states ƒ Problem: • Typically we do not know all possible states of the system at this 1 2 3 4 point in the design process ƒ Solution: • Start with an initial state and “walk” through the model CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. Inc. © 2010 OPNET Technologies. Inc. 5 26 . or transmitted in any format without the prior written consent of OPNET Technologies.

copied. 27 . © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development: Iteration Plan – Start With Initial State ƒ Step 1: Choose a state • Step 2: Choose an event ƒ Step 3: Choose a condition under which the event occurs • Step 4: Determine all actions to perform • Step 5: Determine the final state ƒ Loop Step 3 for all conditions • Loop Step 2 for all events ƒ Loop Step 1 until all states are complete State Event Condition Action Final State 1 2 3 4 5 Init CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc.

Inc.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – Initial State Using a BEGINSIM interrupt assures that the Init state will not have to handle any other type of event State Event Init Frame Arrival 1 2 3 Condition Action Final State 4 Timeout Acknowledgement Received Link Fail 5 Link Up Power Up Always None Idle CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. 28 . copied. © 2010 OPNET Technologies. Inc.

Inc. copied. 29 . © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – Idle State Specify actions down to the KP level State Event Init Power Up Idle Power Up Frame Arrival Condition Found Foundnew newstates states Action Final State Always None Idle Always Copy frame Send frame Set timer ACK Wait 1 2 3 4 Timeout Acknowledgement Received Link Fail 5 Always None Link Down Link Up CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.

Inc. © 2010 OPNET Technologies. copied. or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – Two New States State Event Init Power Up Condition Action Always None Idle Always Frame Arrival Link Fail Always Final State Idle Copy frame ACK Wait Send frame Set timer None Link Down ACK Wait Link Down CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 1 2 3 4 5 30 .

Inc. 31 . or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – ACK Wait State State ACK Wait Event Condition Action Final State Frame Arrival Always Queue frame ACK Wait Timeout Always Copy frame Send frame Set timer ACK Wait Acknowledgement Received Queue Empty Queue Occupied Cancel timer Destroy copy Cancel timer Destroy copy Pop queue Copy frame Send frame Set timer Idle Link Fail Always None 1 2 3 4 ACK Wait 5 ACK Wait and Link Down Link Up CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. copied.

copied.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – Link Down State State Link Down Event Frame Arrival Condition Always Action Final State Queue frame Link Down 1 2 3 Timeout Acknowledgement Received 4 Link Fail Link Up Queue Empty None Idle Queue Occupied Pop queue Copy frame Send frame Set timer ACK Wait CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. © 2010 OPNET Technologies. 5 32 . Inc. or transmitted in any format without the prior written consent of OPNET Technologies.

1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development – ACK Wait and Link Down State State ACK Wait and Link Down Event Frame Arrival Timeout Condition Action Final State ACK Wait and Link Down Always Queue frame Always Set retransmit ACK Wait and flag Link Down Acknowledgement Received 1 2 3 4 Link Fail Link Up Often. designing the model helps flush out the design of the real system Retransmit Flag No Retrans Flag Reset flag Copy frame Send frame Set timer None ACK Wait ACK Wait CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. Inc. copied. or transmitted in any format without the prior written consent of OPNET Technologies. 5 33 . © 2010 OPNET Technologies.

or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions ƒ Step 1: Review specification of the process’ logical actions for completeness ƒ Step 2: Implement STD in OPNET ƒ Step 3: Define or replace macros and pseudo-code 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. 34 . Inc. Inc.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies. copied. state2 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET Placing Actions in the STD ƒ Actions can be contained in three different places •Leaving the current state: Exit Executives •Going from one state to the next: Transition Executives •Entering the new state: Enter Executives 1 2 3 4 state1 PK_ARRIVAL/sample_function_call(). 35 .

1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET Placing Actions in the STD (cont. © 2010 OPNET Technologies. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. copied. actions common to all outputs or inputs can be placed in exit or enter executives state1 state2 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 36 .) ƒ Exit Executive contains actions common to all outgoing transitions ƒ Enter Executive contains actions common to all incoming transitions ƒ Transition Executive contains actions associated with a specific transition 1 2 3 state1 4 state2 ƒ Recommendation: Start by placing all actions in transition executives • Later.

1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET Placing Actions in the STD (cont.) 1 2 3 ƒ Green states as code holders… state1 trans state2 4 RED states are true states of the system. 5 37 . copied. or transmitted in any format without the prior written consent of OPNET Technologies. GREEN states are for coding convenience CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. Inc. © 2010 OPNET Technologies.

) 1 2 3 State Init Event Power Up Condition Always Action None Final State Idle 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. Inc. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. 38 .1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET (cont. copied.

Inc.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET (cont. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. copied. 39 .) State Idle Event Frame Arrival Link Fail Condition Always Always Action Copy frame Send frame Set timer None Final State 1 2 3 ACK Wait Link Down 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. 40 . or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET (cont. copied. Inc.) State Event ACK Wait Frame Arrival Always Queue frame ACK Wait Timeout Always Copy frame Send frame Set timer ACK Wait Acknowledgement Received Queue Empty Cancel timer Destroy copy Idle Queue Occupied Cancel timer Destroy copy Pop queue Copy frame Send frame Set timer ACK Wait None ACK Wait and Link Down Link Fail Condition Always Action Final State 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. 41 . © 2010 OPNET Technologies.) State Link Down ACK Wait and Link Down Event Condition Action Queue frame Final State Frame Arrival Always Link Down Link Up Queue Empty None Idle Queue Occupied Pop queue Copy frame Send frame Set timer ACK Wait Frame Arrival Always Queue frame ACK Wait and Link Down Timeout Always Set retransmit flag ACK Wait and Link Down Link Up Retransmit flag Copy frame Send frame Set timer ACK Wait No Retrans flag None ACK Wait 1 2 3 4 5 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET (cont. Inc. copied.

1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET (cont. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies. 42 . copied.) ƒ Alternate solution: Using forced states QFrame2 QFrame3 QFrame1 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

0) • Enable Begin Simulation Interrupt • Define state variables • Write functions CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. 43 . OPC_QSTAT_PKSIZE) == 0. Inc. copied. Inc.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 3 – Define/Replace Macros & Pseudo-Code ƒ Define macros in header block: #define PowerUp (op_intrpt_type() == OPC_INTRPT_BEGSIM) #define FrameArrival (op_intrpt_type() == OPC_INTRPT_STRM && \ op_intrpt_strm() == StreamFromApp) #define Timeout (op_intrpt_type() == OPC_INTRPT_SELF) #define ACK (op_intrpt_type() == OPC_INTRPT_STRM && \ op_intrpt_strm() == StreamFromLink) #define LinkFail (op_intrpt_type() == OPC_INTRPT_FAIL) #define LinkUp (op_intrpt_type() == OPC_INTRPT_RECOVER) #define QEmpty (op_subq_stat(0.

or transmitted in any format without the prior written consent of OPNET Technologies. } void ResendFrame() { send (copyPkt). Inc. } CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies.) ƒ Write functions in function block void QFrame() { op_subq_pk_insert (0. } void SendFrame() { send (op_pk_get (op_intrpt_strm())). } void ProcAck() { op_ev_cancel (ackEvent). 44 . op_pk_destroy (copyPkt). op_pk_get(op_intrpt_strm()). OPC_QPOS_TAIL). Inc. copied.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 3 – Define/Replace Macros & Pseudo-Code (cont.

) ƒ Write functions in function block void SendNext() { send (op_subq_pk_remove (0. } CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. StreamToLink). 45 . ackEvent = op_intrpt_schedule_self (op_sim_time() + ackDelay. Inc. Inc. } void RetransIfFlagSet() { if (retransFlag) ResendFrame(). © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 3 – Define/Replace Macros & Pseudo-Code (cont. copied. or transmitted in any format without the prior written consent of OPNET Technologies. op_pk_send (aPkt. OPC_QPOS_HEAD)). retransFlag = 0. 0). } void SetRetrans() { retransFlag = 1. } Only 27 lines of code! void send (Packet* aPkt) { copyPkt = op_pk_copy (aPkt).

© 2010 OPNET Technologies. Inc. Inc. 46 . or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied.

© 2010 OPNET Technologies. 47 . Inc. Inc.1501 Introduction to Process Modeling Methodology Lab 1: Using the Methodology ƒ You are provided with a specification for a protocol ƒ Implement it using the Process Modeling Methodology ƒ Blank forms are provided to assist you ƒ There may be many correct solutions ƒ Feel free to ask TAs for help CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. copied.

Inc.1501 Introduction to Process Modeling Methodology Solution for Lab 1 ƒ The following slides present one possible solution for all stages of the methodology CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. copied. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. 48 .

or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. copied.1501 Introduction to Process Modeling Methodology Stage 1: Context Definition Traffic Source Packet Arrival CSMA Protocol Send Packet Medium Busy/Not Busy Physical Medium CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 49 . Inc.

50 .1501 Introduction to Process Modeling Methodology Stage 2: Process-Level Decomposition ƒ Use a single process for this example CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. copied. Inc.

Inc. © 2010 OPNET Technologies. copied. or transmitted in any format without the prior written consent of OPNET Technologies. 51 . Inc.1501 Introduction to Process Modeling Methodology Stage 3: Enumeration of Events Event Name Event Description Interrupt Type Power Up Initialize CSMA Begin Sim Packet Arrival A packet has arrived from the source Stream Medium Free The transmission medium has changed from busy to free Stat Backoff Over Time to send a packet Self NOTE: NOTE:We Wedo donot notneed needan anevent eventfor forMedium MediumBusy Busy CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. copied.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development Found Foundnew newstates states State Event Condition Action Final State Init Power Up Always None Idle Idle Packet Arrival Medium not Busy Send packet Idle Medium Busy Queue packet MediumIsBusy None Idle Medium Free Always Backoff Over NOTE: NOTE:Medium MediumFree Freeisisan anEVENT EVENT Medium MediumBusy Busyisisaastatus statusthat thatwe wecheck check CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 52 . © 2010 OPNET Technologies.

Inc. Inc.) Found Foundnew newstate state State Event MediumIsBusy Packet Arrival Medium Free Condition Action Final State Always Queue Packet MediumIsBusy Always Start Backoff BackOff Backoff Over CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 53 . or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development (cont. copied.

1501 Introduction to Process Modeling Methodology Stage 4: Event Response Table Development (cont. © 2010 OPNET Technologies. 54 .) No Nomore morenew newstates! states! State Event BackOff Packet Arrival Condition Always Medium Always Free Action Final State Queue Packet BackOff None BackOff Backoff Medium Busy None Over Medium is not Busy Send Packet & only one packet MediumIsBusy Idle Medium is not Busy Send first packet BackOff & multiple packets Start Backoff CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. copied.

1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 2 – Implement STD in OPNET CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies. Inc. 55 .

© 2010 OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Stage 5: Specification of Process Actions Step 3 – Define/Replace Macros & Pseudo-Code CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. 56 . copied.

or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Summary – Process Modeling Methodology ƒ What is a Process Modeling Methodology? • Systematic approach to creating process models in OPNET Modeler • Quickest. Inc. copied. Inc. © 2010 OPNET Technologies. most efficient method of development • Protection from some common pitfalls ƒ What are the advantages? Why use this methodology? • Universal approach eliminates hesitation in model design • Front-end design effort will decrease implementation time • Possible reduction in lines of code • Uniformly designed process models • Behavior easy to visualize CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 57 .

© 2010 OPNET Technologies. 58 . Inc. or transmitted in any format without the prior written consent of OPNET Technologies.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. copied.

or transmitted in any format without the prior written consent of OPNET Technologies. 59 . Inc.1501 Introduction to Process Modeling Methodology Introduction ƒ What is a Dynamic Process? • Process that can be dynamically created and destroyed during the course of a simulation ƒ When are they used? • Reducing complexity in a module One module performs several distinct tasks ƒ Different processing phases for information • Variable number of interactions ƒ A module needs to monitor many queues ƒ Server communicating with several clients at once ƒ CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. copied. Inc.

© 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Example Process Models ƒ Both of these are parts of the standard OPNET TCP model ƒ Perfect example of dynamic processes at work • Manager spawns tcp_conn_v3 children for each TCP connection spawn invoke tcp_manager_v3 tcp_conn_v3 CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. copied. Inc. 60 .

61 . Inc. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Motivation ƒ Modular organization (decomposition) • Each process performs a specific task • Design several “simple” process models rather than one “complex” model • With identical input/output requirements. copied. child processes can be interchangeable • Core concept behind scalable modeling techniques ƒ Imitates “real world” system designs ƒ Easier to create and maintain CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. or transmitted in any format without the prior written consent of OPNET Technologies. copied. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Terminology ƒ Root process • The single process initially present within each module at the node level ƒ Child process • Additional processes created within the module during simulation • May be created by the root process or other child processes ƒ Parent process • The process that created a given child process • The root process has no parent ƒ Process group • The collection of all processes within a module CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 62 .

copied. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. Inc. but typically only one or two are used First-generation child processes Second-generation child processes The number of child processes at any level can scale dynamically as needed The models at any level do not all have to be the same CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc.1501 Introduction to Process Modeling Methodology Illustration of Process Hierarchy The entire process group runs within a single module Process Group Root process The number of generations is not limited. 63 .

© 2010 OPNET Technologies. copied. 64 . Inc. Inc.1501 Introduction to Process Modeling Methodology OPNET Configuration: Declaring Child Processes ƒ Create the child process models ƒ Open the parent process in the Process Editor ƒ Choose File > Declare Child Process Models ƒ Select the child process models CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.

Inc. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. 65 . copied. Inc.1501 Introduction to Process Modeling Methodology Model Attributes of Child Processes ƒ Parent and child process model attributes are merged together in the module (viewed with Edit Attributes) ƒ Child process attributes are prefixed by the child model name ƒ All instances of a child process model within a module have the same attributes and values ƒ Child process model attributes are not used often • Usually the parent passes state to each child upon creation CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

© 2010 OPNET Technologies. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. copied.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 66 .

67 . or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Process Lifecycle ƒ Process creation ƒ Process invocation ƒ Process destruction CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied.

copied. or transmitted in any format without the prior written consent of OPNET Technologies. ptc_mem_ptr) • Creates a new process as an instance of the specified process model.pr. someData). 68 . MY_STRUCT* someData. Inc. associating it with a module • Allows for the installation of parent-to-child shared memory • Returns a process handle Don’t put “. © 2010 OPNET Technologies. CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc.m” EXAMPLE: Prohandle aChildProc.1501 Introduction to Process Modeling Methodology Process Creation ƒ op_pro_create (model_name. aChildProc = op_pro_create ("childProcModel".

Inc. © 2010 OPNET Technologies. 69 .1501 Introduction to Process Modeling Methodology Process Creation (cont.) ƒ Child process shares all module resources • Subqueues • Packet streams • Statistic wires • Statistic declarations ƒ Run-time efficiency • Logical simulation construct Not a separate OS process or thread • Tests show creation of child process is about the same as 10 empty events • Minor performance hit for great simulation flexibility and modularity ƒ CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. copied. Inc.

someData). MY_OTHER_STRUCT* someOtherData. 70 . Inc. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. aChildProc = op_pro_create ("childProcModel". MY_STRUCT* someData. someOtherData). CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.1501 Introduction to Process Modeling Methodology Process Invocation ƒ op_pro_invoke (pro_handle. arg_mem_ptr) • Invokes a process in the context of the current event and current module • The invoked process reacts as if it received an event • Information can be passed in argument memory • The originating process is suspended until this KP returns ƒ Analogous to a C function call ƒ Caller blocks until the callee finishes executing ƒ Invoked process can further invoke other processes EXAMPLE: Prohandle aChildProc. op_pro_invoke (aChildProc. Inc. copied.

copied.1501 Introduction to Process Modeling Methodology Process Invocation (cont. or transmitted in any format without the prior written consent of OPNET Technologies. 71 . an invocation is treated just like an interrupt • Starts at an unforced (red) state • Execution continues until the next unforced (red) state • Control is passed back to the invoking process ƒ Can ONLY be used to invoke a process in the same module ƒ Circular (recursive) invocations are not allowed • Trapped by Simulation Kernel CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. Inc. Inc.) ƒ To the invoked process.

1501 Introduction to Process Modeling Methodology Process Destruction ƒ op_pro_destroy (pro_handle) ƒ op_pro_destroy_options (pro_handle. 72 . or transmitted in any format without the prior written consent of OPNET Technologies. options) • OPC_PRO_DESTROY_OPT_KEEP_EVENTS or • OPC_PRO_DESTROY_OPT_NONE ƒ Process destruction • Deletes a dynamically created process • Invokes the Termination Block • Good place to clean up dynamic memory allocated by child process • Good place to destroy any child processes • ONLY time Termination Block is invoked (not used in root processes) CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. copied. © 2010 OPNET Technologies. Inc.

73 . Inc. copied. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Process Destruction (cont. © 2010 OPNET Technologies.) ƒ Processes can destroy themselves ƒ The root process cannot be destroyed ƒ Any process in the current invocation stack cannot be destroyed CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

74 .1501 Introduction to Process Modeling Methodology Lab 2: Using Child Processes ƒ Module in node has multiple incoming packet streams ƒ Monitor the multiple packet streams using process groups ƒ Initially all packets are handled by the root process ƒ Create child processes to handle packets from streams Root Children CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. Inc. Inc. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies.

75 . or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. copied. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

copied. 76 . Inc. © 2010 OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Interrupt Steering ƒ Specifying which process within a module receives a given interrupt ƒ Four mechanisms: • Manual • Normal • Type-based • Port-based CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.

1501 Introduction to Process Modeling Methodology

Manual Steering
ƒ Root process receives control (by default)
ƒ Invokes appropriate child
ƒ Blocks till child returns
Simulation
Kernel

interrupt

Root
op_pro_invoke()

Children

CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

77

1501 Introduction to Process Modeling Methodology

“Normal” Steering
ƒ op_intrpt_schedule_self (time, code)

Simulation
Kernel

2)self interrupt

Root
1) op_intrpt_schedule_self()

Children

ƒ Simulation kernel automatically invokes correct child
CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

78

1501 Introduction to Process Modeling Methodology

“Normal” Steering (cont.)
ƒ op_intrpt_schedule_process (pro_handle, time, code)
2)interrupt

Simulation
Kernel

Root

Any process can schedule
any other process using
op_intrpt_schedule_process.

1) op_intrpt_schedule_process()

Children

ƒ Simulation kernel automatically invokes correct child
CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed, copied, or transmitted in any format without the prior written consent of OPNET Technologies, Inc. © 2010 OPNET Technologies, Inc.

79

pro_handle) Simulation Kernel all failure interrupts Root Children op_intrpt_type_register(OPC_INTRPT_FAIL.. Inc.) CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 80 . copied.1501 Introduction to Process Modeling Methodology Type-Based Steering ƒ Causes all interrupts of a certain type that are sent to a module to be received by the specified process ƒ op_intrpt_type_register (type. Inc. © 2010 OPNET Technologies. . or transmitted in any format without the prior written consent of OPNET Technologies..

index. or transmitted in any format without the prior written consent of OPNET Technologies.. copied. Inc. 0. © 2010 OPNET Technologies. Inc.) CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 81 . .. pro_handle) ƒ stream and statistic interrupts ƒ Takes precedence over type registration stream 0 interrupts Simulation Kernel other stream interrupts Root Children op_intrpt_port_register(OPC_PORT_TYPE_STRM.1501 Introduction to Process Modeling Methodology Port-Based Steering ƒ op_intrpt_port_register (type.

Inc. copied. © 2010 OPNET Technologies. port_index) • Calling op_intrpt_port_register() on a new process handle deregisters the old handle and registers the new one CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. 82 . Inc.1501 Introduction to Process Modeling Methodology Interrupt Deregistration ƒ Type-based • Re-register root process (or any other process) ƒ Port-based • op_intrpt_port_deregister (port_type.

copied. 83 . Inc. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. invmode_ptr) ƒ Example (Case A): • Port-based steering to child • OPC_PROINV_DIRECT returned (to *invmode_ptr) Simulation Kernel Incoming packets: Cause STREAM interrupts Root Child CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Direct and Indirect Invocation ƒ Identify the direct or indirect invocation using op_pro_invoker (pro_handle.

84 . Inc. copied. © 2010 OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Direct and Indirect Invocation (cont.) ƒ Example (Case B): • Root process invokes child process after receiving packets • OPC_PROINV_INDIRECT returned from op_pro_invoker(…) Incoming packets: Cause STREAM interrupts Simulation Kernel Root Child CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.

1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. 85 . © 2010 OPNET Technologies. Inc. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. copied.

copied. 86 . Inc. © 2010 OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Process Communication ƒ Shared process memory • Module-wide memory • Parent-to-child memory ƒ Argument memory CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies.

© 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Module-Wide Memory ƒ Establish ƒ Access op_pro_modmem_install (mem_ptr) op_pro_modmem_access() modmem CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. 87 . Inc. Inc. or transmitted in any format without the prior written consent of OPNET Technologies.

1501 Introduction to Process Modeling Methodology Parent-to-Child Memory ƒ Establish ƒ Access op_pro_create (model_name. copied. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. ptc_mem_ptr) op_pro_parmem_access() pm You do not have to create Parent-Child memory pm pm pm pm CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 88 . Inc.

89 . Inc. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Argument Memory ƒ Establish ƒ Access op_pro_invoke (pro_handle. copied. argmem_ptr) op_pro_argmem_access() op_pro_invoke() am CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

90 . Svar_Name) • op_pro_svar_get (pro_handle. or transmitted in any format without the prior written consent of OPNET Technologies. Svar_Name) For root process ƒ Global registry • oms_pr_process_register () • oms_pr_attr_set () • oms_pr_process_discover () • oms_pr_attr_get () May be slow ƒ ICIs • op_ici_create () • op_ici_attr_set () • op_ici_attr_get () ƒ General scope options • Header block variables • Header file variables CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. Inc.1501 Introduction to Process Modeling Methodology Additional Data Sharing Concepts ƒ Applicable in general — not just to child processes ƒ Get state variables from another process • op_ima_obj_svar_get (Objid. copied. © 2010 OPNET Technologies.

91 .1501 Introduction to Process Modeling Methodology Lab 3: Interrupt Steering and Process Communication ƒ Stream interrupts steered to appropriate child processes ƒ Port-based steering is used: • Root process requires no processing to be done with incoming packets • Therefore packets can be directly steered to child process • All incoming packets generate stream interrupts. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies. so type-based registering is not sufficient ƒ Communication between the root and child processes ƒ Module-wide memory holding dimensioned statistic handles • Use of oms_dim_stat package for statistic reporting CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. Inc.

© 2010 OPNET Technologies. 92 . copied. Inc.1501 Introduction to Process Modeling Methodology Summary – Dynamic Processes ƒ Modules can contain more than one process ƒ Benefits include scalability and modularity ƒ Processes can be created and destroyed during runtime ƒ Interrupts can be steered to an appropriate process ƒ Processes communicate using shared memory CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.

Inc.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. © 2010 OPNET Technologies. 93 . or transmitted in any format without the prior written consent of OPNET Technologies. Inc.

1501 Introduction to Process Modeling Methodology Debugging Processes in the OPNET Debugger (ODB) ƒ Locating processes ƒ Controlling processes ƒ Tracing processes ƒ Displaying process state CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. © 2010 OPNET Technologies. copied. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. Inc. 94 .

© 2010 OPNET Technologies. copied. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.1501 Introduction to Process Modeling Methodology Locating Processes in ODB ƒ promap <objref> • Displays a list of the processes associated with a specified module in ODB • Use promap all to list all existing processes ƒ Use hierarchical network tree view of ODB ƒ Process tags • Strings used to distinguish one process from others of the same type within the same module when using the promap command • Set with op_pro_tag_set (pro_handle. 95 . tag_string) CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. 96 . Inc. © 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. copied.1501 Introduction to Process Modeling Methodology Controlling Processes in ODB ƒ prostop <proc_id> • Enables a breakpoint for all invocations of the specified process • Can be also done in the graphical tree view by right-clicking on the process of interest and selecting “Break On Any Event For This Process” ƒ op_prg_odb_bkpt (label) • Defines a breakpoint that occurs if the simulation is running under ODB control • Labeled breakpoint must also be enabled ƒ prolstop <proc_id> <label> • Enables a labeled breakpoint in the specified process CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed.

Inc. © 2010 OPNET Technologies. 97 . Inc.1501 Introduction to Process Modeling Methodology Tracing Processes in ODB ƒ protrace <proc_id> • Enables full trace for the specified process • Can be also done in the graphical tree view by right-clicking on the process of interest and selecting “Trace This Process” ƒ op_prg_odb_ltrace_active (label) • Used to determine if the specified labeled trace has been activated by an ODB command ƒ proltrace <proc_id> <label> • Enables a trace for the specified label restricted to the specified process CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. copied.

or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Displaying Process State ƒ Diagnostic Block • Contains C or C++ language statements that send diagnostic information to the standard output device ƒ prodiag <proc_id> • Executes diagnostic block of the specified process ƒ proldiag <proc_id> <label> • Executes diagnostic block of the specified process and sets a trace for the specified label for that execution only • Use op_prg_odb_ltrace_active() to control output CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. Inc. 98 .

© 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Homework Lab: Debugging Dynamic Processes ƒ Use ODB commands to debug dynamic processes ƒ The lab will use ODB to: • Observe the creation of the child processes • Observe the child processes handling packets • Observe the state of a child process after it has handled 50 packets CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. copied. 99 . Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc.

copied. Inc. 100 . Inc.1501 Introduction to Process Modeling Methodology Agenda ƒ Introduction / motivation ƒ Process Modeling Methodology explained through an example • Lab for students to apply the methodology (lab 1) ƒ Dynamic processes • Introduction • Process life cycle Lab 2 • Interrupt steering • Process communication ƒ Lab 3 ƒ ƒ Debugging processes in ODB ƒ Conclusion CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. or transmitted in any format without the prior written consent of OPNET Technologies. © 2010 OPNET Technologies.

© 2010 OPNET Technologies.1501 Introduction to Process Modeling Methodology Documentation References ƒ Modeling Concepts Reference Manual • Modeling Overview chapter (overview) • Process Domain chapter (concepts) ƒ ƒ ~120 pages about the Process Domain that everyone in this class should read In particular. or transmitted in any format without the prior written consent of OPNET Technologies. “Process Model Development Methodology” section • Good review and reference • Provides 4 examples ƒ Discrete Event Simulation API Reference Manual (KP reference) • Interrupt Package chapter • Programming Package chapter. “ODB Sub-Package” section • Process Package chapter ƒ External Interfaces Reference Manual • Simulation Execution chapter (ODB reference) CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. 101 . Inc. copied.

© 2010 OPNET Technologies. or transmitted in any format without the prior written consent of OPNET Technologies. 102 .1501 Introduction to Process Modeling Methodology Related OPNETWORK Sessions ƒ Session 1572: Introduction to OPNET Modeler® ƒ Session 1502: Debugging Simulation Models – Introduction ƒ Session 1503: Debugging Simulation Models – Advanced ƒ Session 1530: Modeling Custom Wireless Effects – Introduction ƒ Session 1550: Accelerating Simulations Using Efficient Modeling Techniques CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. copied. Inc.

103 . copied.1501 Introduction to Process Modeling Methodology Take-Away Points ƒ The Process Modeling Methodology can help organizing the development of complex models ƒ Don’t be afraid of “red” states ƒ Using dynamic child processes can be a natural way of representing scalable systems ƒ Next steps: use the methodology to create your own process models! CONFIDENTIAL ─ RESTRICTED ACCESS: This information may not be disclosed. Inc. or transmitted in any format without the prior written consent of OPNET Technologies. Inc. © 2010 OPNET Technologies.