Computer Science, Informatik 4 Communication and Distributed Systems Simulation Techniques Dr. Mesut Güneş
Computer Science, Informatik 4 Communication and Distributed Systems Chapter 7 Queueing Models
Computer Science, Informatik 4 Communication and Distributed Systems Purpose Simulation is often used in the analysis of queueing models. � A simple but typical queueing model � Calling population Waiting line Server Queueing models provide the analyst with a powerful tool for � designing and evaluating the performance of queueing systems. Typical measures of system performance � • Server utilization, length of waiting lines, and delays of customers • For relatively simple systems, compute mathematically • For realistic models of complex systems, simulation is usually required Dr. Mesut Güneş Chapter 7. Queueing Models 3
Computer Science, Informatik 4 Communication and Distributed Systems Outline � Discuss some well-known models • Not development of queueing theory, for this see other class! � We will deal with • General characteristics of queues • Meanings and relationships of important performance measures • Estimation of mean measures of performance • Effect of varying input parameters • Mathematical solutions of some basic queueing models Dr. Mesut Güneş Chapter 7. Queueing Models 4
Computer Science, Informatik 4 Communication and Distributed Systems Characteristics of Queueing Systems � Key elements of queueing systems • Customer: refers to anything that arrives at a facility and requires service, e.g., people, machines, trucks, emails. • Server: refers to any resource that provides the requested service, e.g., repairpersons, retrieval machines, runways at airport. System Customers Server Reception desk People Receptionist Hospital Patients Nurses Airport Airplanes Runway Production line Cases Case-packer Road network Cars Traffic light Grocery Shoppers Checkout station Computer Jobs CPU, disk, CD Network Packets Router Dr. Mesut Güneş Chapter 7. Queueing Models 5
Computer Science, Informatik 4 Communication and Distributed Systems Calling Population Calling population: the population of potential customers, may be � assumed to be finite or infinite. • Finite population model: if arrival rate depends on the number of customers being served and waiting, e.g., model of one corporate jet, if it is being repaired, the repair arrival rate becomes zero. n n -1 • Infinite population model: if arrival rate is not affected by the number of customers being served and waiting, e.g., systems with large population of potential customers. ∞ Dr. Mesut Güneş Chapter 7. Queueing Models 6
Computer Science, Informatik 4 Communication and Distributed Systems System Capacity � System Capacity: a limit on the number of customers that may be in the waiting line or system. • Limited capacity, e.g., an automatic car wash only has room for 10 cars to wait in line to enter the mechanism. Waiting line Server • Unlimited capacity, e.g., concert ticket sales with no limit on the number of people allowed to wait to purchase tickets. Waiting line Server Dr. Mesut Güneş Chapter 7. Queueing Models 7
Computer Science, Informatik 4 Communication and Distributed Systems Arrival Process For infinite-population models: � • In terms of interarrival times of successive customers. • Random arrivals: interarrival times usually characterized by a probability distribution. - Most important model: Poisson arrival process (with rate λ ), where A n represents the interarrival time between customer n- 1 and customer n , and is exponentially distributed (with mean 1/ λ ). • Scheduled arrivals: interarrival times can be constant or constant plus or minus a small random amount to represent early or late arrivals. - Example: patients to a physician or scheduled airline flight arrivals to an airport • At least one customer is assumed to always be present, so the server is never idle, e.g., sufficient raw material for a machine. Dr. Mesut Güneş Chapter 7. Queueing Models 8
Computer Science, Informatik 4 Communication and Distributed Systems Arrival Process For finite-population models: � • Customer is pending when the customer is outside the queueing system, e.g., machine-repair problem: a machine is “pending” when it is operating, it becomes “not pending” the instant it demands service from the repairman. • Runtime of a customer is the length of time from departure from the queueing system until that customer’s next arrival to the queue, e.g., machine-repair problem, machines are customers and a runtime is time to failure (TTF). • Let A 1 (i) , … be the successive runtimes of customer i , and S 1 (i) , A 2 (i) , S 2 (i) be the corresponding successive system times: Dr. Mesut Güneş Chapter 7. Queueing Models 9
Computer Science, Informatik 4 Communication and Distributed Systems Queue Behavior and Queue Discipline � Queue behavior: the actions of customers while in a queue waiting for service to begin, for example: • Balk: leave when they see that the line is too long • Renege: leave after being in the line when its moving too slowly • Jockey: move from one line to a shorter line � Queue discipline: the logical ordering of customers in a queue that determines which customer is chosen for service when a server becomes free, for example: • First-in-first-out (FIFO) • Last-in-first-out (LIFO) • Service in random order (SIRO) • Shortest processing time first (SPT) • Service according to priority (PR) Dr. Mesut Güneş Chapter 7. Queueing Models 10
Computer Science, Informatik 4 Communication and Distributed Systems Service Times and Service Mechanism Service times of successive arrivals are denoted by S 1 , S 2 , S 3 . � • May be constant or random. { S 1 , S 2 , S 3 , …} is usually characterized as a sequence of independent and • identically distributed random variables, e.g., exponential, Weibull, gamma, lognormal, and truncated normal distribution. A queueing system consists of a number of service centers and � interconnected queues. • Each service center consists of some number of servers, c , working in parallel, upon getting to the head of the line, a customer takes the 1 st available server. Dr. Mesut Güneş Chapter 7. Queueing Models 11
Computer Science, Informatik 4 Communication and Distributed Systems Service Times and Service Mechanism Example: consider a discount warehouse where customers may: � • Serve themselves before paying at the cashier Dr. Mesut Güneş Chapter 7. Queueing Models 12
Computer Science, Informatik 4 Communication and Distributed Systems Service Times and Service Mechanism • Wait for one of the three clerks: • Batch service (a server serving several customers simultaneously), or customer requires several servers simultaneously. Dr. Mesut Güneş Chapter 7. Queueing Models 13
Computer Science, Informatik 4 Communication and Distributed Systems Service Times and Service Mechanism Dr. Mesut Güneş Chapter 7. Queueing Models 14
Computer Science, Informatik 4 Communication and Distributed Systems Example � Candy production line • Three machines separated by buffers • Buffers have capacity of 1000 candies Assumption:Allways sufficient supply of raw material. Dr. Mesut Güneş Chapter 7. Queueing Models 15
Computer Science, Informatik 4 Communication and Distributed Systems Queueing Notation – Kendall Notation A notation system for parallel server queues: A/B/c/N/K � represents the interarrival-time distribution A • represents the service-time distribution B • represents the number of parallel servers c • represents the system capacity N • represents the size of the calling population K • N, K are usually dropped, if they are infinity • Common symbols for A and B � Markov, exponential distribution M • Constant, deterministic D • Erlang distribution of order k E k • Hyperexponential distribution H • General, arbitrary G • Examples � M/M/1/ ∞ / ∞ same as M/M/1 : Single-server with unlimited capacity and call- • population. Interarrival and service times are exponentially distributed G/G/1/5/5 : Single-server with capacity 5 and call-population 5. • Dr. Mesut Güneş Chapter 7. Queueing Models 16
Computer Science, Informatik 4 Communication and Distributed Systems Queueing Notation Primary performance measures of queueing systems: � steady-state probability of having n customers in system P n • probability of n customers in system at time t P n (t) • • arrival rate λ • effective arrival rate λ e • service rate of one server μ • server utilization ρ interarrival time between customers n- 1 and n A n • service time of the n -th arriving customer S n • total time spent in system by the n -th arriving customer W n • total time spent in the waiting line by customer n W n Q • the number of customers in system at time t L(t) • the number of customers in queue at time t L Q (t) • long-run time-average number of customers in system L • long-run time-average number of customers in queue L Q • long-run average time spent in system per customer w • long-run average time spent in queue per customer w Q • Dr. Mesut Güneş Chapter 7. Queueing Models 17
Recommend
More recommend