OMPCM

From SDQ-Wiki
Jump to: navigation, search
OMPCM.png

OMPCM is an implementation of the Palladio Component Model based on the OMNeT++ simulation framework. As OMNeT++ offers full network simulation support, the influence of network effects on a modeled system can be investigated. It uses a specialised representation for description of RD-SEFF behavior called SimCore. By applying a series of model-transformations, a Palladio model can be transformed full automatically to a OMNeT++ network definition file (NED) that uses the developed OMPCM modules.


Structure

Modules of OMPCM
The implementation is spread across several modules:
  • StoEx-C
  • ExtQueueing
  • OMPCM Variables
  • OMPCM SimCore
  • OMPCM Net

OMPCM SimCore Elements

Variable Scoping and Assignment
EnterContext Denotes the beginning of a new variable scope.
ExitContext Denotes the end of the current variable scope.
PushVariable Adds a variable to the current scope.
Control Flow Statements
EvalBranch
ForkThread Splits the control flow into two separate flows that run in parallel.
JoinThread Reunites forked control flows to a single one.
Calling Operations
SendCall Calls a service, which is identified by its name. All values in the current context are provided as parameters to the called service.
ReceiveCall Handles returning calls. Values returned by the called service are added in a new variable scope.
Resource Operations
InternalAction Issues a specified demand to a resource. The control flow is interrupted until the resource demand has been serviced. The resource can be active or passive.

The building blocks of the SimCore model are described in the following.

Variable Scoping and Assignment

The elements in the category Variable Scoping and Assignment are essential for supporting parametric dependencies. They are used to define the scope of stochastic variables, i.e. the context used for evaluation the variables. The underlying concept of scopes is that of a stack. Whenever a new scope begins, a new stack frame is pushed on top of the stack. Each time a scope ends, the topmost stack frame is removed. Stochastic variables are added to the current scope by adding them to the corresponding stack frame as a name value pair; existing variables with the same name are overwritten. The value of a variable is either a stochastic expression (i.e., a StoEx), which in turn can refer to further variables or constants. When a variable is encountered during the evaluation of an expression, the current stack frame is queried for the variable. When not found, the parent stack frame is queried (and so on).

Control Flow Statements

The Control Flow Statements are mainly reduced to the EvalBranch element. It allows to express if–then, if–then–else and while constructs as it is equivalent to the checks with goto label semantic cf. [1]. Therefore, it can also be used to model all kind of looping behaviour. Furthermore, the SimCore supports to model parallel control flows that resemble the concept of threads.

Calling Operations

In the category Calling Operations, elements for making calls to services can be found. These calls can be either (sub-)services in the same compo- nent or services defined by the required interface of a component. Finally, there is one element in the Resource Operations category for modelling the interaction with system resources. Therefore, demands to specific resources can be defined, that e.g. resemble to processing times of CPUs, HDDs or semaphores.

Publications and Presentations

  • Jörg Henß: “OMPCM - An OMNet++ simulator for Palladio” [2] Presentation given at the Palladio Days 2012
  • Jörg Henss, Philipp Merkle and Ralf Reussner: "The OMPCM Simulator for Model-Based Software Performance Prediction" [3] Poster and presentation given at OMNeT++ Workshop 2013 at SIMUTools 2013"

Compiling and Installing OMPCM

Prerequisites

  • Required tools: lib tool, coreutils, autoconf and automake
    • Use ports or apt-get to fetch the tools
  • Download, compile and install antlr3 C Runtime (Using autogen.sh), version 3.4 was used for testing
    • Download ANTLR Distribution
    • Building manual can be found here [4] (build 64-bit where possible)
    • On Windows MINGW the antlr-debugger has to be disabled to create a DLL

OMNeT++

  • Install OMNeT++ according to the manual
    • Download and compile OMNeT 4.x (Tested with 4.3)
    • Import the "Queuing" example provided by OMNeT++ in your workspace

LibStoEx

On Windows this library should be compiled as static library!

INET Framework

  • Download, import and build the INET framework in your workspace
    • The 2.0.0 stable version has been tested to work with OMPCM

OMPCM

  • Checkout the following projects from in your workspace from the development repository, (Anonymous SVN Access: anonymous/anonymous):
    • ExtQueuing: Special queuing implementation
    • OMPCM-Variables: The StackFrame related code and evaluation of StoExs
    • OMPCM-Core: The core Palladio parts
    • OMPCM-Net: The network bridge for Palladio
    • MediaStore++: An manual modeled example based on the MediaStore (deprecated and will be replaced with a generated example)
  • The icons used in the NEDs currently have to be installed manually in the "omnetpp-4.x/images/pcm" directory

Limitations of OMPCM

  • only support for basic scheduling strategies
  • no support for simulation of failures

The OMPCM Transformation

The OMPCM transformation is a two step model transformation for converting Palladio models to OMPCM compliant OMNeT++ NED files. It is based on QVT-O and XText.

  • As a first step the Palladio model is transformed to an XMI-based file that represents the NED structure
    • The transformation can be parameterized to generate network modules
  • Then, the NED Serializer Component can be used to serialize the XMI-File to text-based NED representation

Known Issues

  • Network latencies modeled in Palladio are converted to DatarateChannel delays, how ever the channel is used twice for each connection. Furthermore the delay of the switch is added to this.
  • The rarely occurring "gates are all connected, no gate left for `++' operator" error during startup can be fixed by giving the array a high fixed number instead of dynamic size calculation

Development

An issue tracking system will be provided soon. If you want to contribute to the OMPCM please contact us and we can provide you with SVN developer accounts!

Team

Jörg Henß Philipp Merkle