Queueing Networks 1 QUEUEING NETWORKS
Total Page:16
File Type:pdf, Size:1020Kb
J. Virtamo 38.3143 Queueing Theory / Queueing networks 1 QUEUEING NETWORKS A network consisting of several interconnected queues Network of queues • Examples Customers go form one queue to another in post office, bank, supermarket etc • Data packets traverse a network moving from a queue in a router to the queue in another • router History Burke’s theorem, Burke (1957), Reich (1957) • Jackson (1957, 1963): open queueing networks, product form solution • Gordon and Newell (1967): closed queueing networks • Baskett, Chandy, Muntz, Palacios (1975): generalizations of the types of queues • Reiser and Lavenberg (1980, 1982): mean value analysis, MVA • J. Virtamo 38.3143 Queueing Theory / Queueing networks 2 Jackson’s queueing network (open queueing network) Jackson’s open queueing network consists of M nodes (queues) with the following assumptions: Node i is a FIFO queue • – unlimited number of waiting places (infinite queue) Service time in the queue obeys the distribution Exp(µ ) • i – in each queue, the service time of the customer is drawn independent of the service times in other queues – note: in a packet network the sending time of a packet, in reality, is the same in all queues (or differs by a constant factor, the inverse of the line speed) – this dependence, however, does not markedly affect the behaviour of the system (so called Kleinrock’s independence assumption) Upon departure from queue i, the customer chooses the next queue j randomly with the • probability qi,j or exits the network with the probability qi,d (probabilistic routing) – the model can be extended to cover the case of predetermined routes (route pinning) The network is open to arrivals from outside of the network (source) • – from the source s customers arrive as a Poisson stream with intensity λ – fraction qs,i of them enter queue i (intensity λqs,i) J. Virtamo 38.3143 Queueing Theory / Queueing networks 3 Node i in Jackson’s network lqs,i liq i,d Ni s = source, external l1..q1,i li li liq i,1 ..mi .. d = destination, sink lMqM,i liq i,M Exp(mi ) Ni = number of customers in queue i Without complications one could assume state dependent service rates µi = µi(Ni). This could describe e.g. multiserver nodes. To simplify the notation, we assume in the sequel a constant sevice rate µi. l1q1,d Jackson’s network lqs,1 lähdes l 1 m l 1 nielud l q The opnenness of the lqs,2 1 1,4 l l q network requires that 1 1,2 lqs,3 from each node there l4q4,1 l 3 l is at leas one path (= 2 6 m4 l2q2,d l4 0) to the sink d, i.e. m m 2 3 the probability that a l3q3,2 l q customer entering the 2 2,4 l q network will ultimately 3 3,4 exit the network is 1. J. Virtamo 38.3143 Queueing Theory / Queueing networks 4 Conservation of the flows Denote λi = average customer flow through node i. Although the external arrival streams to the nodes are Poissonian, there is no guarantee • that the flows inside the network were also Poissonian. In general, they are not. – except when there are no loops, i.e. a customer never re-enters a previously visited queue; then the Poisson property follows from Burke’s theorem. Stream λi is composed of the direct stream from the source and the split output streams from other nodes: M The conservation laws constitute a set of λi = λqs,i + λjqj,i i =1,...,M linear equations, from which the λi can be X j=1 solved. A similar equation holds for the destination d. Since the total M stream exiting the network must equal the stream entering the λ = λjqj,d jX=1 network, we have (qs,d = 0): Example λ1 = λ + qλ1 q λ λ1 = l m1 ⇒ 1 q l − 1 1-q Note. λ1 is not Poissonian although λ is. J. Virtamo 38.3143 Queueing Theory / Queueing networks 5 Jackson’s theorem The number of customers N in different nodes, i =1,...,M, are independent. • i Queue i behaves as if the arrival stream λ were Poissonian. • i State vector State probability The network state is determined by the vector N = (N ,...,N ). p(n) = P N = n 1 M { } Its possible values are denoted by n = (n1,...,nM ). Define p(n)=0, The network is in state n when N = n, i.e. N1 = n1,...,NM = nM . if some ni < 0 Jackson’s theorem M ni p(n)= p1(n1) pM (nM )= pi(ni) where pi(ni)=(1 ρi)ρi ρi = λi/µi ··· iY=1 − The network behaves as if it were composed of idependent M/M/1 queues. • The state probability is of the product form independence. • ⇔ If there are many customers in one of the nodes, this does not imply anything about the • number of customers in other nodes. ni If the service rate is state λi where pi(0) is determined by pi(ni)= pi(0) ni dependent µi(ni), then j=1 µi(j) the normalization condition. Q J. Virtamo 38.3143 Queueing Theory / Queueing networks 6 Proof of Jackson’s theorem n Denote ei = (0,..., 0, 1 , 0,..., 0). 2 component|{z} i Then, for instance p(n ei)= p(n1,...,ni 1,ni 1,ni+1,...,nM ) − − − Write the globabl balance condition for state n (one equation for each possible state n, n 0 i): i ≥ ∀ M M λ p(n)+ µi1ni>0 p(n) = λ qs,i p(n ei) iX=1 iX=1 − M n1 + qi,d µi p(n + ei) iX=1 M M + qj,i µj p(n + ej ei) iX=1 jX=1 − jonoon2saapuuasiakasulkopuolelta where the lhs represents the probability flow out jonosta2poistuuasiakasulkopuolelle of state n (in state n, any arrival or any departure jonoon1saapuuasiakasulkopuolelta causes a transition to another state) ant the rhs jonosta1poistuuasiakasulkopuolelle the flow to state n (cf. the transition diagram). asiakassiirtyyjonosta2jonoon1 asiakassiirtyyjonosta1jonoon2 Note. One could again allow state dependent service rates µi = µi(ni). J. Virtamo 38.3143 Queueing Theory / Queueing networks 7 Proof of Jackson’s theorem (continued) Rewrite the factor λqs,i in the first term on the rhs by means of the flow conservation equation: M λqs,i = λi λjqj,i. The equation becomes − jX=1 M M M M λ p(n)+ µi1ni>0 p(n) = λi p(n ei) λj qj,i p(n ei) iX=1 iX=1 − − iX=1 jX=1 − M + qi,d µi p(n + ei) iX=1 M M + qj,i µj p(n + ej ei) iX=1 jX=1 − We insert the product form solution of Jackson’s theorem as a trial and show that the equation indeed is satisfied. The following relations hold for the product form trial λ p(n e ) = µ 1 p(n) i i i ni>0 − λj p(n ei) = µj p(n ei + ej) − − λi p(n) = µi p(n + ei) Substitute these relations, in this order, into the first three terms on the rhs. J. Virtamo 38.3143 Queueing Theory / Queueing networks 8 Proof of Jackson’s theorem (continued) The equation takes now the form M M M M λ p(n)+ µi1ni>0 p(n) = µi 1ni>0 p(n) qj,i µj p(n + ej ei) iX=1 iX=1 − iX=1 jX=1 − M + qi,d λi p(n) iX=1 M M + qj,i µj p(n + ej ei) iX=1 jX=1 − The second term on the lhs and the first term on the rhs cancel; so do the second and fourth term on the rhs. What remains is M M λ p(n) = qi,d λi p(n)= p(n) qi,d λi iX=1 iX=1 M which is satisfied, because the streams into and out from the network are equal, λ = λiqi,d. iX=1 Thus we have shown that the product form solution stated in Jackson’s theorem indeed satisfy the global balance equations of the Markov process describing the network. J. Virtamo 38.3143 Queueing Theory / Queueing networks 9 Example l l λ 1 CPU 1 l (1-q)l λ1 = 1 λ1 = λ + λ2 m1 1 q − λ q λ2 = q λ1 ⇒ l2 l2=ql1 · λ2 = · 1 q I/O − m ρ1 = λ1/µ1, ρ2 = λ2/µ2 2 p(n ,n )=(1 ρ )ρn1(1 ρ )ρn2 1 2 − 1 1 − 2 2 Mean queue lengths ρ ρ ρ ρ N¯ = 1 , N¯ = 2 , N¯ = N¯ + N¯ = 1 + 2 1 1 ρ 2 1 ρ 1 1 1 ρ 1 ρ − 1 − 2 − 1 − 2 mean time in the system N¯ ρ ρ λ /µ λ /µ S S T¯ = = 1 + 2 = 1 1 + 2 2 = 1 + 2 λ λ(1 ρ ) λ(1 ρ ) λ(1 λ /µ ) λ(1 λ /µ ) 1 λS 1 λS − 1 − 2 − 1 1 − 2 2 − 1 − 2 Equivalent system miss¨a λ1 1 1 S1 = = averge CPU time I/O µ1λ 1 q · µ1 CPU − 1/S1 1/S2 λ2 q 1 S2 = = average I/O time µ2λ 1 q · µ2 − J. Virtamo 38.3143 Queueing Theory / Queueing networks 10 Mean results of Jackson’s networks Assume state independent service rates µi. Mean number of customers in node i Mean sojourn time in node i ¯ ρi N¯ 1 1 1 Ni = T¯ = i = = 1 ρi i λ 1 ρ µ µ λ − i − i i i − i Mean waiting time in node i 1 ρ 1 W¯ = T¯ = i i i − µ 1 ρ µ i − i i Mean time in the network of a customer entering node i ¯ ¯ M ¯ cf.