Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP60621 Designing for Parallelism

Similar presentations


Presentation on theme: "COMP60621 Designing for Parallelism"— Presentation transcript:

1 COMP60621 Designing for Parallelism
Lecture 11 Discrete Event Simulation John Gurd, Graham Riley Centre for Novel Computing School of Computer Science University of Manchester

2 Discrete Event Simulation
Build a (computational) simulation model so that the behaviour of the simulation model replicates the behaviour of the real system as far as the properties being modelled are concerned. The simulation model includes parameters such as average arrival rate, average service time, number of service points, etc. Model inter-arrival times according to some suitable probability distribution, and model service times in a similar way – Monte Carlo simulation. Evolve the simulation system by tracking from one event to the next: Arrival  if there is an available server, go to be served, else enter queue; Service completion  leave system and, if queue is not empty, begin new service for the task at the head of the queue. 09 December 2018

3 Discrete Event Simulation
Suppose inter-arrival times satisfy a negative exponential distribution with parameter . Determine a random number that is uniformly distributed in the range [0,1] and use this to predict the inter-arrival time and, hence, the next arrival (see graph on next slide). Model service times in a similar way: a negative exponential distribution with parameter . But, importantly, other kinds of distribution are easy to implement and thus investigate. 09 December 2018

4 Pr{arrival in (0,t)} inter-arrival time 09 December 2018

5 Discrete Event Simulation
Thus, given the first arrival (at time t = 0), we can use the sequence of predicted inter-arrival times to predict all subsequent arrival times. Each arrival enters an ordered queue. Customers/tasks are removed from the head of the queue whenever there is an available service point. The time to complete a service is predicted in a similar fashion to the prediction of inter-arrival times, but with a parameter , rather than . The same uniform random number generator can be used to drive both predictions (inter-arrival times and service times). 09 December 2018

6 Discrete Event Simulation
Discrete event simulation is used in many contexts. A typical example is given by one of our current research projects, which is using a discrete event simulation package called SimGrid to model the scheduling of the computational tasks constituting a large concurrent application to some number of heterogeneous parallel processors, as typified by the architecture of a modern HPC (High Performance Computing) system. The concurrent tasks are represented by the nodes of a DAG (directed acyclic graph), and the data dependencies between the tasks are represented by the arcs of the DAG. The objective is to schedule the nodes of the DAG to the heterogeneous processors in such a way as to minimise the overall execution time. 09 December 2018

7 Summary Queueing systems occur in many different situations in real life, and it is frequently necessary to anticipate the way that such systems will behave in practical scenarios. We have introduced queueing theory as a useful vehicle for analysing the behaviour of (relatively simple) queueing systems. We have touched on PEPA, a process algebra for describing more complex queueing systems. We have further introduced Discrete Event Simulation as a means of approaching more complicated queueing systems, where theoretical analysis becomes too difficult. 09 December 2018


Download ppt "COMP60621 Designing for Parallelism"

Similar presentations


Ads by Google