main content

m/m/1 queuing system -凯发k8网页登录

overview

this example shows how to model a single-queue single-server system with a single traffic source and an infinite storage capacity. in the notation, the m stands for markovian; m/m/1 means that the system has a poisson arrival process, an exponential service time distribution, and one server. queuing theory provides exact theoretical results for some performance measures of an m/m/1 queuing system and this model makes it easy to compare empirical results with the corresponding theoretical results.

structure

the model includes the components listed below:

  • entity generator block: models a poisson arrival process by generating entities (also known as "customers" in queuing theory).

  • simulink function exponentialarrivaltime(): returns data representing the interarrival times for the generated entities. the interarrival time of a poisson arrival process is an exponential random variable.

  • entity queue block: stores entities that have yet to be served in fifo order

  • entity server block: models a server whose service time has an exponential distribution.

results and displays

the model includes these visual ways to understand its performance:

  • scopes labeled "waiting time: theoretical" and "waiting time: simulation" showing the theoretical and empirical values of the waiting time in the queue, on a single set of axes. you can use this plot to see how the empirical values evolve during the simulation and compare them with the theoretical value.

  • a scope labeled "server utilization" showing the utilization of the single server over the course of the simulation.

theoretical results

queuing theory provides the following theoretical results for an m/m/1 queue with an arrival rate of $$ \lambda $$ and a service rate of $$ \mu $$:

  • mean waiting time in the queue = $$ 1/(\mu-\lambda) - 1/\mu $$

the first term is the mean total waiting time in the combined queue-server system and the second term is the mean service time.

  • utilization of the server = $$ \lambda / \mu $$

experimenting with the model

move the arrival rate knob during the simulation and observe the change in the simulation results

related examples

references

[1] kleinrock, leonard, queueing systems, volume i: theory, new york, wiley, 1975.

see also

| | |

related topics

网站地图