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 8 Queueing Theory: Part 2 John Gurd, Graham Riley Centre for Novel Computing School of Computer Science University of Manchester

2 Analysis of M/M/1 Queue Diagrammatic representation of the queue at any particular time: queue service queue service XXXX X 4 in queue, none in queue, 1 being served none being served We wish to trace the queue behaviour over time and, hopefully, identify long-term steady-state characteristics. At time t, let N(t) be a random variable that describes the number (of customers) in the system. Q(t) is a related random variable that describes the number in the queue: 28 February 2019

3 Analysis of M/M/1 Queue N(t) increases by 1 with each arrival and decreases by 1 with each service completion. N(t) 5 4 3 2 1 A1 A A A4 A S1 A S2 S3 …… S6 t This diagram could represent a general G/G/1 queue. It will represent an M/M/1 queue if the inter-arrival times A2-A1, A3-A2, … and the service times S1-A1, S2-S1, S3-S2, … both satisfy negative exponential distributions. 28 February 2019

4 Analysis of M/M/1 Queue 28 February 2019

5 Analysis of M/M/1 Queue 28 February 2019

6 Analysis of M/M/1 Queue 28 February 2019

7 Analysis of M/M/1 Queue is referred to as the traffic intensity.
28 February 2019

8 Some Interesting Consequences
28 February 2019

9 Some Interesting Consequences
28 February 2019

10 Simple Example That’s a lot of theory! What does it all mean?
Consider a TV repair shop. TVs arrive for repair at random at an average rate of 4 per day (assume an 8 hour day). A single repair service does the repairs; the average time for repair is 1.5 hours and repair times satisfy a negative exponential distribution. Arrivals:  = 0.5 (0.5 sets per hour in the 8 hour day) Service:  = 2/3 (0.667 repairs per working hour – the average repair time is 1/ = 1.5 working hours). 28 February 2019

11 TV Repair Shop Example 28 February 2019

12 TV Repair Shop Characteristics
Hence, traffic intensity ρ = / = 0.5/0.667 = 0.75 (75%). Expected number of TV sets in system = L = ρ/(1 – ρ) = 0.75/0.25 = 3.00. Expected number of TV sets in queue = L – ρ = 2.25. Mean queueing time = /{( – )} = 0.5/{0.67(0.67 – 0.5)} = 0.5/{0.667*0.183} = 4.5 hours. Mean time in system = 1/( – ) = 1/(0.667 – 0.5) = 6 hours. 28 February 2019

13 TV Repair Shop Characteristics
28 February 2019

14 Analysis of M/M/k Queue
We have shown how to analyse a very simple system: M/M/1 queue We now consider a more challenging and more concurrent scenario: M/M/k queue Arrival of Customers 28 February 2019

15 System Characteristics
Arrivals: Customers arrive, at random, at a rate ; i.e. random arrivals with inter-arrival time a random variable having a negative exponential distribution with parameter . They form a single queue for the multiple servers. Service: Served by one of k service points, each having a service time which is a random variable having a negative exponential distribution with parameter  (the same for all k service points). Assuming that  < k (the arrival rate is less than the cumulative service rate), there exists a steady state solution. 28 February 2019

16 Analysis of M/M/k Queue

17 Analysis of M/M/k Queue
28 February 2019

18 Analysis of M/M/k Queue
28 February 2019

19 Simple Example (See Sasieni, Yaspan & Friedman, 1959) An insurance company has two claims adjusters in its branch office. People with claims arrive in Poisson fashion at an average rate of 20 per 8 hour working day. The length of time an adjuster spends with each claimant satisfies a negative exponential distribution with a mean service time of 40 minutes. What is the average time in the queue and what is the average time in the system? How would these characteristics change if the company employed an extra claims adjuster? Arrivals:  = 2.5 (2.5 claimants per hour in the 8 hour day) Service:  = 1.5 (1.5 claims per working hour – the average service time is 1/ = working hours). 28 February 2019

20 Characteristics 28 February 2019

21 Characteristics 28 February 2019

22 Effect of an Extra Adjuster
28 February 2019

23 Effect of an Extra Adjuster
28 February 2019

24 Effect of an Extra Adjuster
The insurance company might be more interested in how busy the claims adjusters are! As an exercise in understanding all this mathematics, work out the fraction of time that all the adjusters are busy (in other words, there are k or more customers in the system). Also, work out the fraction of time that an adjuster can expect not to be busy (this is a bit more difficult to express, but everything that is needed is in the equations). 28 February 2019

25 Recap 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. The mathematics is characterised by finding steady state solutions to systems of equations: Answers are probabilistic Mathematics is complicated 28 February 2019


Download ppt "COMP60621 Designing for Parallelism"

Similar presentations


Ads by Google