CS432 – Network Modeling and Simulation: Midterm Important Subjective (31 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS432 Course Page · CS432 MCQ Pack (125 MCQs)
-
Differentiate between modeling and simulation in Network Modeling and Simulation (NeMS).
Topic: Introduction to Network Modeling and Simulation
Modeling and simulation are not the same thing. Modeling is the step that precedes simulation: it produces a model, which is the logical representation of a complex entity, system, phenomenon or process. In communications, a network model may be an analytical representation, a mathematical form such as a state machine, or a closed/approximate form. Simulation is the imitation of the behaviour of a real-world system, i.e. the computational re-enactment of the system according to the rules described in the model; formally, a simulation is a piece of computer software that implements algorithms, takes inputs and gives outputs. Together, modeling and simulation form an iterative process that approximates real-world systems.
-
List the components of a simulator and briefly describe what happens during a simulation run.
Topic: Introduction to Network Modeling and Simulation
A simulator is a self-contained program consisting of: an event queue, a simulation clock, state variables, event routines, an input routine, a report generation routine, an initialization routine and a main program. During a run: (1) inputs are created/initialized; (2) events of transmission, reception and noise occur; (3) randomness causes queues to behave and errors to occur; (4) packet successes and failures are determined; and (5) simulation logs are compiled and presented as output in the desired formats.
-
When should simulation be used, and when should it NOT be used?
Topic: Introduction to Network Modeling and Simulation
Simulation should be used when an analytical model is not feasible (the system is too complex), when an analytical model is not possible, or when simulation is needed to verify an analysis; otherwise simulations are unnecessary. Simulation should NOT be used when an analytical model gives a good enough representation of the system, when the simulation would take months to build or run, when it is too expensive, or when it is non-scalable.
-
Name and explain two sources of simulation inaccuracy related to wireless network modeling.
Topic: Introduction to Network Modeling and Simulation
(1) Over-reliance on link budget methods for abstraction: link budget losses are overly static, which is fair enough for steady-state analysis, but dynamic analysis is not possible, so the results are misleading. (2) Overly simplistic modeling of radio layers: the lowest layer is often ignored, with no bit-level BER and delay modeling; this layer is often the Achilles heel of the simulation and produces wrong results in highly dynamic use cases.
-
Describe the steps of the simulation development process.
Topic: Simulation Development Process and Common Mistakes
The simulation development life cycle consists of: (1) Problem formulation - identify the controllable and uncontrollable inputs. (2) Data collection and analysis - decide what to collect and how much, trading off cost against accuracy. (3) Simulation development - codify the model into a working simulation program. (4) Model validation, verification and calibration - check that the model is the right system, that it is built right, and tune its parameters. (5) What-if analysis - obtain performance measures with different inputs. (6) Sensitivity estimation - determine the relative importance of the different parameters with respect to the output.
-
Differentiate between validation, verification and calibration of a simulation model.
Topic: Simulation Development Process and Common Mistakes
Validation asks 'Is it the right system?' - it checks that the model emulates the real phenomenon. Verification asks 'Are we building the system right?' - it checks that the implementation corresponds to the model. Calibration is parameter estimation: tweaking/tuning the model parameters to ensure that the simulated data follows the real data.
-
Explain any four common mistakes made in simulation studies.
Topic: Simulation Development Process and Common Mistakes
(1) Inappropriate level of detail: including irrelevant detail makes the simulation computationally heavy with many interdependent parameters whose interplay is hard to assess; the tip is necessity and sufficiency - include only what is relevant. (2) Unverified models: programming is non-trivial and semantic mistakes make simulations produce wrong and misleading results, so modular verification is a must. (3) Improper initial conditions: if the initial condition is not the steady state, results can be surprisingly wrong and may never converge. (4) Short run times: results remain strongly dependent on the initial conditions and the true steady state is never achieved. (Other common mistakes: improper selection of programming language, poor random number generators, inadequate time estimates, no achievable goals, incomplete mix of essential skills, inadequate user participation, and inability to manage the simulation project.)
-
What is OMNeT++? Why is it called a framework rather than a simulator?
Topic: OMNeT++ Fundamentals
OMNeT++ (Objective Modular Network Testbed in C++) is a component-based simulation library and framework, primarily for building network simulators. It is a framework, not a simulator itself: it provides the simulation kernel, the simulation class library and runtime environments, but it contains no ready-made network models. Domain-specific simulation models (for the Internet stack, wireless networks, peer-to-peer overlays, vehicular networks, etc.) are provided by separate model frameworks such as INET, OverSim, Veins, MiXiM and Castalia, which are built on top of OMNeT++ and are easily integrated because of its modular architecture.
-
Explain simple modules, compound modules and networks in OMNeT++. How do modules communicate?
Topic: OMNeT++ Fundamentals
An OMNeT++ model consists of modules that communicate by message passing. Simple modules are the active building blocks of the model; their behaviour is implemented in C++ using the simulation class library. Simple modules can be grouped into compound modules, and compound modules can be nested into further compound modules - the number of hierarchy levels is not limited. Modules communicate through gates, which are the input/output interfaces of modules, linked via connections (channels) that can carry properties such as propagation delay, data rate and bit error rate. A network is a compound module with no external gates; it is the concrete simulation model built by instantiating module types.
-
Compare Debug mode and Release mode builds of an OMNeT++ simulation.
Topic: OMNeT++ Fundamentals
Debug mode does not optimize the binary it produces; the source code and generated instructions have a complex relationship, but the build is compiled with full symbolic debug information, which allows accurate breakpoint setting and stepping through the code one line at a time. It is elaborate but slow. Release mode enables optimizations and generates instructions without any debug data; lots of code can be completely removed or rewritten, so the resulting executable may not match the written code, but it is optimized and fast. In short: Debug is elaborate but slow, Release is optimized and fast.
-
Describe the internal architecture of OMNeT++ (model component library, simulation kernel, and runtime environments).
Topic: OMNeT++ Fundamentals
OMNeT++ simulation programs have a modular structure. The model component library consists of the compiled code of simple and compound modules. The simulation kernel instantiates the modules and builds the concrete simulation model; the accompanying simulation (SIM) class library covers most common simulation tasks through classes for random number generation (distributions), queues (FIFO, priority), messages (which hold arbitrary data structures) and routing (exploring topology and generating graph data structures). The simulation executes in an environment provided by the Envir library together with either Cmdenv (command-line environment) or Tkenv (graphical environment); the environment defines where input data comes from, where simulation results go, what happens to debugging output, controls the simulation execution and determines how the model is visualized.
-
What is the NED language? List its typical ingredients.
Topic: NED Language and INI Configuration
NED is the network description language of OMNeT++; it is used to create network topologies in OMNeT++ (the topology can alternatively be created graphically, in which case the NED source code is generated automatically). Its typical ingredients are: (1) network definitions; (2) simple module declarations, which describe the interface of a module - its gates and parameters; and (3) compound module definitions, which declare the external interface (gates and parameters) and define the submodules and their interconnections. NED also supports inheritance (modules and channels can be subclassed, adding new parameters, gates and connections), module/channel interfaces used as placeholders whose concrete type is determined at network setup time by a parameter, and packages, which address name clashes between different models.
-
What is the role of INI files in OMNeT++? How do they support the separation of model and experiments?
Topic: NED Language and INI Configuration
It is good practice to separate the different aspects of a simulation: the model topology goes in NED (and MSG) files, and the model behaviour in C++ code. However, C++ and NED code have no run-to-run variables, so INI files (such as omnetpp.ini) provide the mechanism to specify the parameters that capture the effect of different inputs. An INI file is an ASCII text file of key-value pairs; the [General] section names the network to simulate, and other entries assign parameter values to modules, using wildcards such as ** to match module paths. In this way the same model can be reused across many experiments simply by changing the INI file.
-
Differentiate between Tkenv and Cmdenv.
Topic: Running Simulations, Tkenv and Experiment Organization
Tkenv is the graphical runtime interface for OMNeT++ simulations. It provides network visualization, message flow animation, a log of message flow, display of textual module logs, inspectors (Network Display, Log Viewer and Object Inspector windows that display the contents and properties of simulation objects), visualization of statistics such as histograms during execution, and event log recording for later analysis. Cmdenv is the command-line runtime environment: it runs the same simulation without graphics, which makes it suitable for batch runs and experiment execution on servers. Both are built on the Envir library, which controls simulation execution and determines where inputs come from and where results go.
-
Define study, experiment, measurement, replication and run in the organization of simulation experiments.
Topic: Running Simulations, Tkenv and Experiment Organization
Model: the executable (C++ files and external libraries plus NED files); it is invariant for the purpose of experimentation, and the INI file is not part of the model. Study: one or more experiments carried out to investigate a phenomenon, usually involving one or more models. Experiment: the exploration of a parameter space on exactly one model. Measurement: a set of simulation runs on the same model with the same parameters but different seeds; it is characterized by an INI file and may involve replication for averaging out. Replication: one repetition of a measurement, characterized by the seed values it uses. Run: one single instance of running the simulation, characterized by the exact time, date and host computer.
-
What qualities must a well-organized simulation experiment have?
Topic: Running Simulations, Tkenv and Experiment Organization
Following Kurkowski's guidelines for simulation studies, experiments must be: (1) Repeatable - a fellow researcher should be able to repeat the experiment. (2) Unbiased - the results must not be specific to the particular scenario used in the experiment. (3) Rigorous - the scenarios and conditions of the experiments must be truly representative. (4) Statistically sound - the experiment results must not violate mathematical principles.
-
What are event logs and sequence charts in OMNeT++? How are they produced and used?
Topic: Running Simulations, Tkenv and Experiment Organization
An event log file (.elog) contains a tabulated log of the messages sent during a simulation - both messages between modules and self-messages (timers) - together with the details of the events that prompted each sending or reception. Recording is enabled in the INI file with record-eventlog = true; the output is placed in the results directory with a name of the form ${configname}-${runnumber}.elog, and the user can control the amount of data recorded, the start/stop time and which modules are included. A sequence chart displays an event log file in graphical form. It helps the user focus on the causes and consequences of events/messages, understand complex simulation models, and verify that the implementation shows the desired behaviour. Axes represent modules, and the chart shows message sends, self-messages, processing events and initialization events against a timeline (linear, event-number, step or nonlinear).
-
How are processing delays and timers modeled in OMNeT++? Explain with reference to the TicToc tutorial.
Topic: The TicToc Tutorial and Simulation Programming
OMNeT++ modules cannot sleep or block; instead, delays and timers are modeled with self-messages. In TicToc step 6, to model a processing delay the module sends itself an 'event' message scheduled at a future simulation time; when the self-message arrives back at the module, the module knows the delay has expired and continues its work. The same mechanism implements protocol timers: in step 8 (stop-and-wait), a timeout self-message is scheduled when a packet is sent; if the acknowledgement arrives first, the timer is cancelled, and if the timer fires first, the packet is retransmitted. For retransmission (step 9), the sender keeps a copy of the original message and sends copies of it (sendCopyOf), because the original packet itself must be retransmitted if it is lost.
-
Why are custom message classes (.msg files) needed in OMNeT++? Illustrate with the TicToc tutorial.
Topic: The TicToc Tutorial and Simulation Programming
The built-in cMessage class carries only basic information. When a simulation needs messages with application-specific data, a custom message class is defined in a .msg file, from which OMNeT++ generates the C++ class. In TicToc step 13, hardcoding a fixed destination (such as tic[3]) is inflexible; instead a message class with source and destination address fields is defined in tictoc13.msg, so a node can draw a random destination, store it in the message, and every node can forward the message towards its destination. Similarly, INET's ARP packet class is generated from a .msg file. Custom fields also support later steps, such as displaying per-node packet counters (step 14) and collecting hop-count statistics (step 15).
-
Name and briefly describe the well-known OMNeT++ model frameworks: INET, OverSim, Veins, INETMANET, MiXiM and Castalia.
Topic: Simulation Models and the INET Framework
INET: the standard protocol model library of OMNeT++, containing models for the Internet stack. OverSim: an overlay and peer-to-peer network simulation framework, with structured P2P models (Chord, Kademlia, Pastry) and unstructured ones (GIA). Veins: an inter-vehicular communication (IVC) simulation framework based on a road traffic microsimulation model. INETMANET: a fork of the INET framework for mobile ad-hoc networks. MiXiM: a modeling framework for mobile and fixed wireless networks, WSNs, BANs and ad-hoc networks, providing models for radio wave propagation, interference estimation, power consumption and wireless MAC protocols. Castalia: a simulation framework for networks of low-power embedded devices, offering models for temporal path loss, fine-grain interference, RSSI calculation, physical processes, node clock drift and MAC protocols.
-
State Metcalfe's law and compute the number of possible connections in a network of 20 nodes.
Topic: QoE: Scalability, Availability and Performance Mathematics
Metcalfe's law states that the community value of a network grows as the square of the number of its users; it is often cited as an explanation for the rapid growth of the Internet. The number of possible connections between n nodes is n(n - 1)/2, i.e. of the order O(n squared). For n = 20 nodes: 20 x 19 / 2 = 190 possible connections.
-
What is scalability? Explain the constraints on scalability and the MinMax decision rule.
Topic: QoE: Scalability, Availability and Performance Mathematics
Scalability refers to the ability of a network to grow - in number of applications, sites, users, servers and addressing. Growth affects performance: efficiency decreases and execution time increases with the growing factors. Scalability is constrained by the upper bounds of the model's parts: nodes (Nmax), protocol operation (Omax) and message formats (Mmax), and device ports (Pmax) and specifications (Smax) - for example, IPv4 addressing was exhausted (top-level exhaustion on 31 Jan 2011), while IPv6 offers 2^128 addresses. By the MinMax decision rule, the maximum scaled-up network is Min(Nmax, Omax, Mmax, Smax): the strength of the chain is determined by its weakest link.
-
Define availability. A network is up for 165 hours in a 168-hour week; compute its availability. Also compute the availability of a component with MTBF = 4000 hours and MTTR = 1 hour.
Topic: QoE: Scalability, Availability and Performance Mathematics
Availability is the degree to which a system, subsystem or equipment is in a specified operable and committable state; numerically it is the percent uptime in a period (per year, month, week, day or hour) relative to the total time in that period. For the network: Availability = 165 / 168 x 100 = 98.21%. Using MTBF and MTTR: Availability = MTBF / (MTBF + MTTR) = 4000 / (4000 + 1) = 4000 / 4001 = 0.99975, i.e. approximately 99.98%.
-
What is 'five nines' availability? What does it imply in terms of downtime and system design?
Topic: QoE: Scalability, Availability and Performance Mathematics
Five nines means an availability of 99.999%, which corresponds to only about 5 minutes of downtime per year. It is a best-case availability figure quoted by hardware manufacturers, but the sum is not equal to the parts: carrier and power outages, faulty software in routers and switches, sudden increases in bandwidth or server usage, configuration problems and human errors (about 90% of all failures), security breaches and software glitches all reduce real availability. Achieving 99.999% might require triple redundancy - one unit active, one in hot standby ready to be used immediately, and one in standby or maintenance - and a clear agreement on whether repair time is inclusive or exclusive and whether in-service upgrades (hot swaps) are possible.
-
How is the cost of downtime calculated? Compute the yearly cost if a company faces 90 branch outages in a year, each lasting an average of 1.5 hours and costing $300 per hour.
Topic: QoE: Scalability, Availability and Performance Mathematics
The step-wise approach first identifies the business continuity components (people, property, systems, data), defines what is being protected (the core competencies), prioritizes the business functions needed to sustain them, and classifies outage types (branch, regional, data centre, national) with their frequencies and durations. The cost is then: Cost = Frequency x Duration x Hourly Cost. For the given figures: 90 outages x 1.5 hours x $300/hour = $40,500 per year.
-
Differentiate between throughput, goodput and badput. List the factors that affect goodput.
Topic: QoE: Scalability, Availability and Performance Mathematics
Throughput is the quantity of data transmitted per second over the network; at the application layer, Throughput = Goodput + Badput. Goodput is the useful, error-free data delivered to the application. Badput is the wasted portion, contributed by retransmissions, protocol headers, and packets that collided or were lost (the collision fraction can be expressed as Fc = C/N and the loss fraction as Fc = L/N). Factors affecting goodput include: end-to-end error rates; protocol functions (handshaking, windows, acknowledgements); protocol parameters (frame size, retransmission timers); the packets-per-second rate of networking devices; lost packets at networking devices; workstation and server performance (disk-access speed, disk-caching size, device driver performance); computer bus performance; processor and memory performance; operating system inefficiencies; and application inefficiencies or bugs.
-
What is optimum network utilization? Why is exceeding it harmful, and how does it differ between WAN and LAN links?
Topic: QoE: Scalability, Availability and Performance Mathematics
Optimum network utilization is the percentage of bandwidth capacity used in a specific time period that gives the best performance; it is both a goal and a constraint, and it is a time-varying phenomenon (instantaneous, averaged or weighted). The typical optimum value is about 70%; exceeding it results in performance degradation (queues build up and delay grows sharply). WAN link utilization is more crucial than LAN utilization because WAN usage is typically paid per packet, so compression, caching and concatenation are used to reduce WAN utilization. LANs are usually over-provisioned (e.g. Fast Ethernet with full-duplex switches), though LANs can still suffer when switch-to-switch links exceed the optimum.
-
List and explain the sources (causes) of packet delay in a network.
Topic: QoE: Delay, Jitter, Response Time, Security and Tradeoffs
The main sources of packet delay are: (1) Propagation delay - depends on the media type and the length of the link. (2) Transmission (serialization) delay - the time to push the packet onto the link, e.g. sending 1024 bytes on a T1 link. (3) Switching delay - up to about 5-20 microseconds for a 64-byte frame. (4) Router delay - due to look-up, router architecture and configuration, and software features that optimize forwarding such as NAT, IPsec, QoS and ACLs. (5) Queuing delay - depends on utilization; the queue depth is given by Utilization / (1 - Utilization), so queuing delay grows rapidly as utilization approaches 100%. For example, at a utilization of 0.8 the queue depth is 0.8 / 0.2 = 4.
-
What is jitter? Describe its two measures and how it can be controlled.
Topic: QoE: Delay, Jitter, Response Time, Security and Tradeoffs
Jitter is delay variation - the amount by which the average delay varies. Voice, video and audio applications are intolerant of delay variation, and the acceptable variation is about 1-2% of the delay. Jitter is quantified in two ways: (1) Delay jitter bounds the maximum difference in the total delay of different packets (assuming a perfectly periodic source); it is used for interactive communication such as voice and video teleconferencing and helps translate into the maximum buffer size needed at the destination. (2) Rate jitter bounds the difference in packet delivery rates at various times, i.e. the difference between minimal and maximal inter-arrival times; it is useful for many real-time applications such as video broadcast. Jitter is controlled with a jitter buffer at the receiver, which smooths out the variation before playout; the variations on the input side are smaller than the buffer.
-
What is a network design tradeoff? Give examples of tradeoffs at different levels.
Topic: QoE: Delay, Jitter, Response Time, Security and Tradeoffs
A design tradeoff is a balance or compromise between desirable but incompatible features; conflicting technical goals make tradeoffs a necessity. Examples: (1) Availability vs affordability and usability vs security at the design level - for instance, strict security decisions can negatively affect usability. (2) Computation vs communication: compressing an image reduces transmission time and cost at the expense of CPU time. (3) Throughput vs fairness at the network level: maximizing total throughput can starve some flows, and the tradeoff can be implemented through weighted scheduling. Tradeoff problems can be handled like a knapsack problem: selecting the best combination of features within a fixed budget.
-
Define response time and explain how simulation results are recorded and analysed in OMNeT++ (scalars, vectors, histograms and analysis files).
Topic: QoE: Delay, Jitter, Response Time, Security and Tradeoffs
Response time is the amount of time between a request for a network service and the response to that request; it is a relative phenomenon and where it is measured (measurement points) matters. In OMNeT++, simulation results are recorded as scalar values (single summary numbers, e.g. total bytes received), vector values (time series, e.g. end-to-end delay over time) and histograms. Analysing the results is a lengthy process in which statistical methods are applied to extract relevant information and draw conclusions. An analysis file (.anf) automates the analysis steps - loading result files, filtering them and transforming the data. Datasets describe a set of input data, the processing applied and the charts, arranged as a tree of processing steps; nodes add or discard data, apply processing to vectors and scalars, and create charts. Compute Vectors and Compute Scalars nodes derive new quantities from recorded ones, e.g. bit rate = pkLen x 8 / sendInterval from the recorded pkLen and sendInterval scalars, or throughput = 8 x rcvdByteCount / duration.