Optimizing system resource utilization is a key design objective for system engineers in communications, electronics, and other industries. System resources such as processors, memory, or bandwidth on a communication bus are often shared by various components in the system. To understand the utilization of a shared resource, system engineers must do two things: they must identify constraints on the resource, such as number of processors and memory size, and they must analyze the effect of input traffic or load on the shared resource.

The time-varying nature of the input traffic makes it difficult to analyze behaviors such as congestion, overload, endto- end latencies, or packet loss. These systems are best modeled as event-driven or activity-based systems, since the input traffic activity places the load on the shared resource. Discrete-event simulation (DES) is the most suitable simulation paradigm for modeling event-driven or activity-based systems.

SimEvents extends the Simulink® environment for Model-Based Design into the discrete-event simulation domain. In this article, we will use SimEvents® to analyze resource constraints on three typical systems:

  • An Ethernet communication bus,
  • A real-time operating system (RTOS) with prioritized task execution, and
  • A shared memory management system.
In each case, the simulation results will enable us to understand the effects of resource constraints on the system and to determine next steps.

Ethernet Communication Bus

Figure 1. Ethernet bus.
The system in this example is a LAN consisting of three network interface cards (NICs) that share bandwidth on an Ethernet bus. We want to add another NIC and a printer to the bus, but will the bus have enough bandwidth to support them?

To answer this question, we must determine the channel utilization by evaluating the current load on the bus. As utilization increases, the end-to-end latency experienced by a packet increases in a non-linear fashion. If the Ethernet bus is heavily utilized by the current load, connecting new devices will increase communication latencies and reduce throughput for all the devices.

Figure 1 shows the SimEvents model of the system. The model includes the NIC that sends and receives data over the Ethernet bus, a medium-access control (MAC) controller that governs each computer's use of the shared channel, and a T-junction that connects the computer to the network.