Mapping Real Systems to Models
Modeler divides the majority of model specifications into a set of four environments called modeling domains. This differs from the approach taken by most modeling frameworks, which use one paradigm to specify all aspects of a system. The contrast between the Modeler approach and the single-paradigm approach is most evident when considering the problem of modeling both a system’s behavior and its structure.
Rationale for Multi-Paradigm Approach
Communication networks and distributed systems typically encompass a wide range of technologies ranging from low-level communications hardware to high-level decision-making software. A successful system modeling effort must represent each of these subsystems and their interactions at a level of detail that is sufficient to obtain valid predictions of performance and behavior. Because the nature of these subsystems varies significantly from level to level (for example, a communications protocols and real-time operating systems are fundamentally different types of entities than communications links or packet buffers), single-paradigm frameworks must be “stretched” to develop adequate models. Modeler’s approach to modeling is based on three paradigms that specifically target the distinct levels identified in a communications network. A fourth paradigm provides the communications devices necessary for cosimulation.
The following table lists each of the modeling domains supporting these paradigms.
Table 23: Modeling Domains
| Domain | Purpose |
|---|---|
| “Network Domain” | concerned with the specification of a system in terms of high-level devices called nodes, and communication links between them. |
| “Node Domain” | concerned with the specification of node capability in terms of applications, processing, queueing, and communications interfaces. |
| “Process Domain” | concerned with the specification of behavior for the processes that operate within the nodes of the system. Fully general decision making processes and algorithms may be specified. |
| “External System Domain” | concerned with the specification of communications mechanisms that allow Modeler to include models from external code or systems in a cosimulation. |
Key Concept—Modeler uses distinct modeling paradigms to represent the fundamentally different components of a network or distributed system. Each paradigm has an associated modeling domain and editor. This allows the structure of models to closely resemble that of real-world systems and to be more intuitive.
Identifying Modeling Support for Actual System Features
With the power of having several modeling domains comes the requirement to decide which domain will be used to implement each characteristic of a modeled system. This breakdown is usually the first step in designing a system model. While there are no strict rules, this section provides useful guidelines for establishing a correspondence between an actual system and the modeling domains.
The following table lists the modeling domains by stating which aspects of a system each domain may play a role in representing. In certain cases, more than one domain may be marked as correct for a particular system aspect; this indicates either that a combination of domains is required in the modeling or that, depending on other aspects of the system, one of the marked domains will provide the best support.
Table 24: Domain Applicability to Selected System Aspects
| System Aspect | Network | Node | Process & External System |
|---|---|---|---|
| Hierarchical Topology | ✓ | ||
| Communication Pathways | ✓ | ✓ | |
| Geographical Layout | ✓ | ||
| Device Mobility (Wireless functionality) | ✓ | ||
| Device Failure | ✓ | ✓ | ✓ |
| Communication Delays | ✓ | ✓ | ✓ |
| Communication Errors | ✓ | ✓ | |
| Resource Management and Contention | ✓ | ✓ | |
| Packet/Transaction Queueing | ✓ | ✓ | |
| Packet/Transaction Generation | ✓ | ✓ | |
| Packet/Transaction Generation | ✓ | ||
| Remote Sensing and Control | ✓ | ✓ | |
| Interrupt Processing | ✓ | ||
| Behavioral Logic | ✓ | ||
| General Information Storage | ✓ |
Hierarchical Topology
The topology of a system consists of both an inventory of its devices and the communications links between them. The network domain refers to these devices as nodes, and has several types of links that can be defined to connect them together for the purpose of sending information between them. Groups of nodes and links can be used to form subnetworks, and subnetworks can in turn contain lower-level subnetworks to form unlimited hierarchies. Some system topologies can be entirely represented in the node domain by interconnecting the node level building blocks, called modules. In such cases, the network domain model may consist of just one node. This occurs particularly for small systems with no real physical layout requirements, or where the communication between devices is mostly of a logical nature (that is, interfaces based on commands, requests, indications, or interrupts). However, in most cases the network domain is used to represent high-level system topology because of its direct support for unlimited-depth hierarchies, sophisticated communication links, and measured physical layout.
Key Concept—Hierarchical network structure is accommodated by the concept of subnets in Modeler. Subnets can be placed in different geographical locations and connected via links. In each subnet, a model may contain arbitrary groupings of nodes and links, as well as additional nested subnetworks.
Communication Pathways
Most systems involving multiple subsystems or devices implement one or more forms of communication between them. Some forms of communication may require no physical connections to transfer information, such as interrupts issued by an operating system to a process, for example. However, for many systems, particularly systems with geographic separation, some physical resources are used to connect the subsystems. Modeler’s network domain provides several types of link objects that are generally used to model connections between devices that are separated by some physical distance. These links transfer data in the form of user-defined messages called packets. Network domain links model properties found in the communication media of real systems, including interference, errors, and delay.
Network domain links are rarely used to model device-connectivity of a purely logical nature. These types of communication are generally supported by simpler connections within the node domain, called packet streams and statistic wires. Packet streams are simple pipes that carry packets between modules in a node. The interface they provide typically corresponds to a need to transfer blocks of information or messages between local devices, cooperating software processes, or neighboring protocol layers. Statistic wires convey numeric values between devices or processes that are located in the same node. They are used for two primary purposes: to allow processes to monitor changes in state and performance of the devices that make up a node; and to create a simple signaling mechanism between processes.
Key Concept—Links are used to transfer packets between physically separated nodes or subnetworks in the Network Domain. Within a node, modules use packet streams to transfer packet and numerical information or signaling can be conveyed using statistic wires.
Geographical Layout
For certain network models, the actual physical disposition of nodes may affect the results produced by a simulation. In particular, systems that include bus links or (with the Wireless functionality) radio links can make use of the distances between nodes to compute link effects including propagation delay, interference, and received power levels. Modeler’s network domain provides for precise descriptions of the physical aspects of a network within a configurable coordinate system. The units of the coordinate system can be degrees, arc seconds, kilometers, miles, meters, or feet to accommodate both large and small-scale models. Cartographic backgrounds may be loaded to provide models with a geographical context.
Key Concept—Network models can be deployed within a physical context to match the actual system environment. Physical relationships between nodes can be used to accurately calculate delays for links, and propagation and interference effects for wireless transmissions.
Device Mobility
The Wireless functionality supports systems that include mobile communicating devices. Such systems may require models that explicitly represent the devices’ motion histories to account for time-varying distances that will affect communication characteristics, including quality of transmission and connectivity. If this level of modeling is required, the network domain allows mobile sites (nodes or subnets) to be defined, each of which can be assigned an independent trajectory that specifies its positions as a function of time. Trajectories, which are specified as either a series of discrete positions and associated times or by a speed and bearing, are the most common mechanism used to model mobility. It is also possible for user-developed process models to dynamically update the position attributes of node objects, allowing adaptive node mobility which can be a function of the system’s state and of its history.
Key Concept—With the Wireless functionality, mobile sites can change position over time in the Network Domain. Site positions can change in a predefined way (using trajectories) or adaptively (by directly modifying position attributes during simulation).
Device Failure
Certain modeling efforts include a requirement to model the behavior of a system when some of its components experience failures. Depending upon the sophistication of the system it may have built-in procedures for adapting to such conditions; these capabilities may also need to be incorporated into the system model to accurately simulate the system’s behavior. Modeler offers several capabilities in this area, spanning all three modeling domains.
The feature that most directly supports modeling of failures is the condition attribute of node and link objects within the network domain. By modifying this attribute as the simulation progresses, user-defined processes can affect the operability of selected nodes and links. Disabling a node or a link essentially prevents it from carrying out any operations; in the case of a node, this means that simulation events that occur within the node are suppressed; in the case of a link, all transmitted packets are lost. Each node and link can be disabled and enabled any number of times during one simulation run. An important aspect of using “condition” attributes to generate failures is that processes throughout the entire network model may receive asynchronous notification of the changes in the attributes’ state. This notification mechanism, which causes a special interrupt to be delivered to the process in question, is controlled by setting the failure intrpts and recovery intrpts attributes of processors and queues.
Additional capability to model failures within the modeled system can be derived from the general ability to program behavior into the models of system components. For example, Modeler provides no built-in support for implementing the failure of a queue module; however each queue is a programmable object that can respond to commands or changes in its attributes. By sending the correct command to a queue module, its internal logic can respond by discarding the packets that it contains and rejecting further attempts to enqueue packets. Similar types of behaviors can be programmed for processors, links, or for nodes as a whole. The principle is that, if the built-in support for modeling failures and recoveries of system components is insufficient, these may be treated as general events whose specific repercussions are implemented by user-defined logic.
Key Concept—Component failures for nodes and links can be modeled by modifying their “condition” attribute when appropriate. Optionally, changes in this attribute can automatically generate notification interrupts for processes in any part of the network. Other component failures, or different behavior can be programmed as necessary in process model logic.
Communication Delays
Delays affecting information transfer can occur at many levels in an actual distributed system or communication network. Modeler provides a number of possibilities for modeling delay.
Signal propagation delays over links (due to distance) are an important cause of communication delays; network domain point-to-point and bus link objects include a “delay” attribute that is used by the default underlying link models. In the case of point-to-point links, the delay is usually simply a constant, while in the case of bus links, the delay is per unit-distance. For all link types, the underlying link model used to compute propagation delay may be customized. In the node domain, each packet stream supports the assignment of a propagation delay for the packets that it transfers.
Transmission delay is the second form of delay incurred by each packet as it is sent over a link. Transmission delay is the amount of time between the start of processing of the first bit to the completion of processing of the last bit. For all types of links, there is an underlying model, or pipeline stage that computes this value, and can be customized. The default model makes use of the data rate attribute of the transmitting channel (specified in the node domain via the transmitter module of interest) and the length of the transmitted packet.
Queuing delays occur when data is made to wait for resources to become available, typically a communications link or a processor. This type of delay can in some cases account for the majority of a packet’s end-to-end delay from its point-of-origin to its final destination. Most queuing delay in Modeler occurs within the node domain, in either queue or transmitter modules. Transmitter modules (for all three link types) incorporate a first-in-first-out queue for packets to wait while packets that arrived before them complete transmission; queue modules use a process model (which may be user-defined) to determine when packets should be dequeued and forwarded. Therefore, the process domain is also involved in determining queueing delays.
Key Concept—There are many sources of delays incurred by packets as they travel through a network, including propagation, transmission, and queuing. Propagation delay on links can be based on a fixed “delay” attribute, or on distance. Transmission delay depends on packet size and link “data rate”. Queuing delays are determined by process models.
Communication Errors
Many communication systems are subject to errors that affect the transmission of data. Various causes are associated with these errors, ranging from faulty electronics to interference from other transmissions or noise sources. Typically, these errors are modeled in the network domain by assigning bit error rates (BERs) to link objects. In addition, the underlying bus link models can account for collisions caused by simultaneous transmissions. The default bus models cause collided packets to be lost. Therefore, most modeling of communication error phenomena is performed in the network domain. However, it is possible to use process models to model errors that are internal to nodes. For example, a process that normally forwards packets to another module may be programmed to destroy the packets instead with a certain probability, modeling a stochastic error mechanism. If such a process is deployed as the immediate neighbor of a receiver module within a node, then it may replace the link’s bit-oriented error characterization with a packet-oriented one (the link’s bit error rate can be set to zero).
Key Concept—Communication errors can exist on all types of links and result in damaged or lost packets. Each link model has its own error mechanisms, including stochastic errors, collisions, and various types of interference. These are implemented, and can be customized, by the underlying link models. Processes can also induce packet loss or change.
Resource Management and Contention
Resources can generally be thought of as entities that are required to complete tasks. Typically, resources are hardware devices such as CPUs, disks, memory, or computer busses; they may also be more abstract as in the case of a software program with a limited number of simultaneous users, or a communications channel. Generally, resources enter into system modeling problems because they are contended for by a number of clients. A client is an another entity or process that seeks to use the resource to progress in its completion of a task. Each system must have established policies to decide in which order and to what extent the various clients will be granted access to the resource. Because the number of clients and their need for resource access may be a function of many factors, and the resource allocation policy may also be complex and non-analytic, simulations are often the most effective means of forecasting the behavior of such systems. Indeed, many simulation packages focus on resource-oriented modeling exclusively.
Although Modeler does not have a paradigm dedicated to resource modeling, the power and generality of the node and process domains make it an excellent environment for modeling complex resource-based systems. The most commonly adopted strategy for modeling resources in Modeler is to create a queue module in the node domain to represent each resource. Because queues are fully programmable, each resource can be managed by its own allocation algorithm. A number of example policies are provided including a simple FIFO, processor sharing and preemptive-priority. The flexibility of the process domain’s Proto-C language allows any new resource management policy to be defined. Models of the clients are usually implemented as processes that send access requests to the various system resources. They may choose to block while waiting for resources to become available, or to continue, depending upon their task definition. Resource access requests may be formulated as packets with specific parameters of the request encoded as packet fields; these parameters may factor in to the resource policy’s decisions on how to process requests.
Key Concept—Resources are often modeled as queues in the Node Domain. The “process model” of the queue implements the resource’s policy and accepts and processes requests which can be submitted in the form of packets. Fields of the packets can indicate parameters of the request. Arbitrary resource management policies may be defined.
Packet/Transaction Generation
Most simulated systems involve at least one type of dynamic entity that circulates among the components of the system. Depending on the primary orientation of the development environment, these entities will have different names such as transaction, data-structure, or data-unit. Modeler supports several such dynamic objects, the most common of which is called a packet, due to the traditional application of Modeler to communication network modeling. Packets are general data structures that are organized into fields of information according to a user-defined format. One system model may rely on multiple types of packets, each with its own format.
Packets are considered dynamic simulation entities, because they are created and destroyed as a simulation progresses. Packets can be created in a simulation model through only a limited number of mechanisms:
- Processes operating within processors or queues can create entirely new packets, as required by their process models’ specification. This allows processes to model sophisticated packet-generating devices.
- Processes can create copies of already existing packets.
- Bus communication links can create copies of packets to deliver them to multiple destinations as part of a “broadcast” transmission.
Key Concept—The primary information-carrying object in a discrete event simulation is a packet. Each packet has a format which defines which fields it contains. Packets can be generated spontaneously by processes. They are then forwarded to other objects. Packets may also be copied by processes or for broadcasting.
Packet/Transaction Processing
As packets circulate through the various components of a system, they trigger certain actions, which in many cases are based on information that the packets contain. Because packets are modeled as individual entities with specific data contents, the packet processing performed by an actual system can be modeled in full detail. Definition of packet processing occurs within the process domain, where Proto-C process models make use of Simulation Kernel procedures to manipulate the packets that they create or receive from outside.
Process models do the following operations on packets:
- create new packets
- receive new packets
- copy packets
- extract field values
- set field values
- send packets to other modules
- enqueue packets
- dequeue packets
- destroy packets
Many packet-processing operations can cause further non-packet-related actions to take place. For example, a routing-update packet may trigger a process to update the contents of a routing table, and an acknowledgment packet may cause a timer to be canceled, depending on its contents.
Key Concept—Packet fields carry actual values that can be assigned and extracted by processes. When a packet is received by a process, the information that it contains can be analyzed and used as the basis for decisions. Actions can include modifying, destroying, or relaying the packet, as well as creating other packets, or changing system state.
Remote Sensing and Control
The design of certain systems may require that distinct components keep track of each other’s state to coordinate overall operations. Changes in the state of one system component may require another component to take specific actions. This coordination of activities implicitly involves some communication between the components. In some cases, packets are well-suited to modeling this type of communication, as in the case of telemetry data transmitted from a remote node via a radio link. However, Modeler provides two simpler communication mechanisms that can often be more correct, particularly when the coordination between the components is based on the sharing of numerical values. For localized communication of numerical data, the node domain provides an object known as a statistic wire, which allows a module to “export” values that reflect its state or performance as these vary over time. For example, a node may contain several queues and a processor that acts as a multiplexor for the queues’ output, having to select which queue to draw from next; as part of the system definition, the processor may need to be aware of the queue sizes on a synchronous basis, as well as receive an asynchronous warning when any of the queue sizes exceed a certain threshold. Statistic wires are an appropriate modeling construct to represent such a system because all of the coordinating objects are located within the same node, and because the communicated information consists only of simple numerical values. Statistic wires also have a set of attributes called triggers that specify criteria for changes in the source value that will generate interrupts at the remote module; this supports asynchronous notification of particular types of changes to model “alarms”.
The role of statistic wires is restricted to communication within one node and therefore does not always provide adequate support for remote sensing. An important alternative is provided by a mechanism called the remote interrupt, which can communicate information between processes without relying on the existence of any physical connections between them. A process operating in a processor or queue module can send a remote interrupt to any other processor or queue in the entire modeled system, regardless of location. The interrupt can be accompanied by some state information, either in the form of an integer value, a formatted information structure known as Interface Control Information (ICI), or a data structure known as an event state. Note that this mechanism does not support communication between remote objects other than processors or queues.
Key Concept—An object may rely on knowledge of another object’s state. Packets may be appropriate for remote objects connected by links; but for modules within the same node, statistic wires are used to transfer numerical values and to provide interrupts for specific changes. Remote interrupts allow information to be sent to any process in the system.
Interrupt Processing
Each event in a model is associated with a module within the node domain. Most events result in the module being interrupted to do a series of actions. Two types of modules, processors and queues, allow a general set of actions to be defined by developing a process model using the Proto-C language of the process domain. The general approach to developing process models is to view them as procedures that respond to interrupts. A process model may use the various provided Simulation Kernel procedures to obtain information concerning the nature and source of the interrupt. In most cases, interrupts carry additional information that a process model may access and factor into the actions that it implements and the state-transitions that it traverses. For example, a stream interrupt represents the arrival of a packet, and usually causes a process to obtain the packet and decode its contents; and self interrupts have an associated user-defined code that can be used to distinguish between multiple outstanding interrupts of the same type.
Key Concept—Processes are interrupt-driven. When a process is invoked, it can access data associated with the interrupt. The logic of the process uses the data, combined with state information, to take appropriate actions and modify the state.
Behavioral Logic
The developer of a model may choose to simulate the behavior of the modeled system at many levels of detail, including all necessary interactions between subsystems. While data communication is often an important part of a model, the modeling framework provides equal depth in modeling the processing that takes place within each subsystem. In fact, it is typically the case that the communications “layers” of a model are viewed as support mechanisms for the higher level applications processes. In this sense, models of application behavior are actually those that “drive” an overall system model, and therefore these need to be accurately represented. The Proto-C language provides a rich set of operations for modeling the processing activities of applications, including: construction and transmission of packets and ICIs to represent commands, resource requests, or communications loads; scheduling of interrupts to do future activities; queueing according to user-defined algorithms to provide access to communications, processing, and storage resources; object identification and topological discovery; dynamic model-attribute modification; stochastic value generation; programming support (for example, memory allocation, linked-lists, and file I/O); and the general computational capabilities of the C and C++ programming languages.
Key Concept—Applications and in general, any generation or processing of data, are represented with process models. Process models use the Kernel Procedures and general C/C++ code to allow specification of any system behavior.
General Information Storage
Both applications and communications protocols in distributed systems typically require that significant amounts of state information be maintained. The word state is often used to represent the position of a Proto-C process model in its finite state machine graphical representation; however in the larger sense, a process model’s state additionally consists of an arbitrary set of variables of either built-in datatypes, or of datatypes specified by the modeler. A communication protocol may define unique structures for storing information, such as routing tables, timer information, lists of packets to retransmit, data fragments held for reassembly, and so on. An application may store different types of information, such as variables for custom performance calculations, or lists of requests that are pending processing. Beyond attributes of network and node domain objects, the primary mechanisms defined for storing the state of a system are specified in the process domain. State variables are declared as part of each process model’s specification, and the Simulation Kernel maintains these separately for each instance of a process model in the system. This is the mechanism most often used to specify state information that is independently maintained by each process. Global variables are used when multiple processes need to implicitly share information without the use of an active communication mechanism to update each other. These variables may also have general data types and can be declared both in process models and in external source code files. Both state variables and global variables can provide statically allocated (allocated in advance), or dynamically allocated (allocated as needed) memory.
Key Concept—In addition to the attributes of objects, the state of the modeled system can be stored in a combination of: 1) the state variables of processes; and 2) model global variables. Both types of variables can support statically or dynamically allocated storage.