Queueing Networks with Blocking - An Introduction - Jonatha ANSELMI anselmi@elet.polimi.it 5 maggio 006
Outline Blocking Blocking Mechanisms (BAS, BBS, RS) Approximate Analysis - MSS
Basic Notation We solve closed single class Queueing Network Model (QNM) with K queues Each queue k, k K, has a service time S k, a service rate µ k = /S k and a finite or infinite capacity constraint B k. Population N belongs to {,..., k B k} We denote by n k, k K, the population that may happen at station k. Note that at any time K k= n k = N P = [p i,j ] is the state independent routing matrix. A job, upon completing service at station i goes to station j with probability p i,j We assume that the queue k capacity is infinite iff B k N
Blocking QNMs with finite capacity queues and blocking are more realistic models of systems with finite capacity resources (i.e. memories, thread and connection pools, network links, buses,... ) The flow of customers through a queue may be momentarily stopped when another queue in the network reaches its available capacity, i.e. blocking occurs.
Problems arisen by blocking () QNMs with blocking do not satisfy product-form, hence we can not run well-known product-form algorithms (MVA, Convolution Algorithm,... ) Exact analysis of QNMs with blocking is based on the definition of the underlying Markov process whose solution has an exponential state space in the number of system components. In theory, steady state probabilities (and, as a consequence, performance indices) can be calculated by solving the global balance equations. In practice, this technique is unfeasible because of the computational complexity.
Problems arisen by blocking () Deadlocks may occur: a set of queues is in deadlock when every queue in the set waits for a space becomes available at another queue in the set. However, all servers are blocked and they can never get unblocked because the space required for the change of status of the server will never be available. Solutions: include in the model a mathematical formalization of deadlock (i.e., a strategy to handle deadlocks), or make deadlocks impossible to happen, i.e., assume that for each cycle C, N < k C B k.
Outline Blocking Blocking Mechanisms (BAS, BBS, RS) Approximate Analysis - MSS
Blocking Mechanisms - BAS Blocking After Service: After a job completion at queue i, if the job attempts to enter to queue j which has reached the capacity constraint B j, then it is forced to wait at i, i.e. queue i is blocked. When a space becomes available at j, the job goes to queue j and service at queue i is resumed. It is possible that (at least) two job attempt to enter a blocked queue. Hence, it is necessary to define the order in which blocked customers will be unblocked (First Blocked First Unblocked) i STOP j n j =B j
Blocking Mechanisms - BBS () Blocking Before Service: A job declares its destination queue j before it starts receiving service at queue i. If the job finds node j full, then queue i is blocked. During the process, the job does not change its destination j. STOP i j n j =B j
Blocking Mechanisms - BBS () It may happen that the job finds space in queue j but it becomes full prior to service completion at i. Service at station i is interrupted and the queue is blocked. It is assumed that the amount of service the job has received is lost, i.e. a new service starts. STOP i j n j =B j
Blocking Mechanisms - BBS (3) Depending on whether or not the server space can be used to hold a job when the server is blocked, BBS is classified into two subcategories: BBS-SO (server occupied): the center k space can be used to hold job when k is blocked BBS-SNO (server not occupied): the center k space can not be used to hold job when k is blocked. it is not well defined for QNMs with arbitrary topologies it is applicable when only when a center with a finite capacity has only one upstream center with finite capacity feeding it
Blocking Mechanisms - BBS (4) BBS-O (Overall Blocking Before Service) If a center j becomes full, it causes all its upstream centers to be blocked, regardless of the destinations of job currently receiving service at each upstream center. The server space can be used to hold the blocked customer In each upstream center, service is resumed as soon as a departure happens from j.
Blocking Mechanisms - RS () Repetitive Service Blocking After a job completion at queue i, if the job attempts to enter to queue j which has reached the capacity constraint B j, then it starts a new and independent service at i (according to center i discipline). n j =B j
Blocking Mechanisms - RS () Depending on whether or not a job chooses a different destination or not, RS blocking is classified into two subcategories: RS-RD (random destination): the job chooses its destination randomly every time it completes its service. The choices are independent RS-FD (fixed destination): the job try to enter always to the same destination
Outline Blocking Blocking Mechanisms (BAS, BBS, RS) Approximate Analysis - MSS
Approximate analysis Why approximate? Exact analysis of QNM with blocking is based on the definition of the underlying Markov process whose solution has an exponential space ant time computational complexity in the number of system components (i.e. N and K). Approximate analysis reduces computational complexity but introduces solution errors. How do we assess the accuracy of an approximate method? if the QNM state space is small, i.e. if N and K are small, then we compare approximation with exact results (solving global balance equations associated to the underlying Markov process), otherwise, evaluate the approximation with respect to simulation results
Matching State Space - MSS () The algorithm approximates the throughput of a network with BAS blocking and exponential service times. The basic idea is to approximate a network with blocking with an other one satisfying product-form which has a different population. Assumption: two networks with nearly the same state space cardinality have similar throughputs The approximated network has the same parameters but population (N ), which is chosen to approximately match the state space cardinality of the underlying Markov chain (Z BLO ).
Matching State Space - MSS () Recall that for closed product-form QNMs, the following binomial coefficient formula holds ( ) N + K Z PF (N) = K Which means, the number of possible ways to distribute N jobs into K stations.
MSS - Assumptions Each station has a single server (the multiple server case is also possible) and an exponential service time with mean value /µ k, k K. Population N < K k= B k In order to avoid deadlocks, the algorithm also assumes that for each cycle C, N < k C B k
MSS - The algorithm Let A be a QNM with BAS blocking with N customers and K service centers.. Calculate Z BLO, i.e. the state space cardinality of A. Find the population N such that argmin N Z BLO (N) Z PF (N ), where ( Z PF (N N ) = + K K 3. Solve a new QNM A with population N running a well-known product-form algorithm (e.g., MVA) The approximate QNM A has N customers and no capacity constraints. )
MSS - Two Stations Networks () For two-station networks (i.e. K = ): The State-space has a monodimensional structure the binomial coefficient formula is simplified to Z PF = N + the state space of the network with blocking is Z BLO = min{b +, N} + min{b +, N} N +,
MSS - Two Stations Example Example A Tandem Network (cyclic): N = 5, K =, B = 3, B = 4 Z BLO = 5 Z PF = N + argmin N Z BLO (5) Z PF (N ) = 4 Now, we solve the original network using the MVA and the population N For two-stations network, we have N = Z BLO = min{b +, N} + min{b +, N} N
MSS - Two Stations Networks () Theorem The state space of a two station closed blocking queueing network with N total number of jobs is isomorphic to the state space of a two station closed nonblocking queueing network with appropriate total number of jobs N. The Markov processes describing the evolution of both networks have the same behavior providing that the throughputs of both networks are exactly equal: X PF (N ) = X BLO (N)
MSS - Multiple Stations Networks () In multiple station networks cases (K > ), the state space of a blocking network in general is not isomorphic to the state space of a nonblocking network has a (K )-dimensional structure Example Tandem Network (cyclic): N = 6, K = 3, B i = +, i 3 / / / 3
Markov Chain of Example 6,0,0 5,,0 3 5,0, 3 3 4,,0 4,, 4,0, 3 3 3 3,3,0 3,, 3,, 3,0,3 3 3 3 3,4,0,3,,,,,3,0,4 3 3 3 3 3,5,0,4,,3,,,3,,4,0,5 3 3 3 3 3 0,6,0 0,5, 0,4, 0,3,3 0,,4 0,,5 3 0,0,6 Number of states Z PF = 8
MSS - Multiple Stations Networks () With respect to Example, assume the following capacities: B = 3, B =, B 3 = How do we get the number of feasible states Z BLO? 4,,0 * 4,, * 4,0, * * 3 3 3 3,3,0 3,, 3,, 3,0,3 * 3 3 3 *,3,,, 3 3 *,3,,,3,,3 * * 3 0,3,3 * Ghraphically, Z BLO = 3
MSS - State Space Cardinality Since, in general, N and K can be very large we cannot draw the state space, eliminate the non-feasible states or count the total number of feasible states and their immediate neighbors as blocking states in an efficient way. Hence, Z BLO is calculated as the last component Z BLO (N) of the following vector where, Z BLO = Z Z Z K is the convolution operation (Recall that if C = A B, we have C(n) = P n i= A(i) B(n i)) Z i, i K, is the vector [z i (0), z i (),, z i (N)] with { k = 0,,,..., Bi + z i (n) = 0 otherwise During the computation of Z BLO, each intermediate vector (i.e. the result of Z i Z i+ ) is a (N+)-vector
MSS - State Space Cardinality An Example Assuming N = 6 and B = 3, B =, B 3 =, we have Z BLO = 0 0 0 0 0 0 0 0 = 3 4 4 3 0 0 0 = 3 6 0 3 4 3 Z BLO (6) = 3 is the state space cardinality of the network with blocking
MSS - Experimental Results Since exact analysis is expensive, the algorithm has been validated by comparing numerical results with simulation (using the RESQ package) The number of jobs is varied from 5 to 00 The number of stations is varied from 3 to 8 (the number of servers is varied from to 8) Throughout a sample of 00 networks: no model with instabilities the fewer the jobs in the QNMs with finite capacity constraints, the less the chance for blocking the throughput does not increase with the number of the network most of the deviations for the throughput values are below 3%
References Simonetta Balsamo, Raif O. Onvural, Vittoria De Nitto Persone, Analysis of Queueing Networks with Blocking, Kluwer Academic Publishers, Norwell, MA, 00 S. Balsamo, Closed queueing networks with finite capacity queues: approximate analysis, in Proceedings of the 4th European Simulation Multiconference on Simulation and Modelling, SCS Europe, 000, pp. 593-600. 3 I. F. Akyildiz, Product Form Approximations for Queueing Networks with Multiple Servers and Blocking, IEEE Trans. Comput., volume 38, number, 989, 4 I. F. Akyildiz, On the exact and approximate throughput analysis of closed queueing networks with blocking, IEEE Trans. Software Eng., vol. SE-4, pp. 6-7, Jan. 988