120 likes | 614 Vues
Queuing Theory. B.Ramamurthy Appendix A. Problem. Consider the following problem.
E N D
Queuing Theory B.Ramamurthy Appendix A B.ramamurthy
Problem • Consider the following problem. • Message packets are sent from a computers on a LAN to systems on other networks through a router. Given the network specification and request pattern, determine queuing time at router, and queue length, say, 95% of the time and similar metrics. • What information do you need? • How will you model the network? • What formulas or expressions will you use in your computation of metrics? What metrics? B.ramamurthy
Some More Questions • What happens to file retrieval time when disk utilization goes up? • How does response time change if both processor speed and number of users on the system are doubled? • How many lines should a dial-in facility of a time-sharing system have? • How many lines are needed on on-line inquiry center (call center) ? B.ramamurthy
Queuing Analysis • Queuing analysis is one of the most important tools for answering such questions. • The number of questions addressed that can be addressed by queuing analysis is endless and it touches every area we discussed in the operating systems course and also in networking. • We will look at some practical application of queuing analysis and simple rudimentary formulas. B.ramamurthy
Alternatives • Case Study: Scaling up a LAN to two buildings. • Actual implementation and evaluation of metrics. • Make a simple projection using prior experience. • Computer simulate a model. • Develop an analytic model based on queuing theory. B.ramamurthy
Example • Disk that is capable of transferring 1000 blocks per second is considered as having 50% (1/2 the load) when it is transferring at 500 blocks per second. • Response time is the time it takes to retransmit any incoming block. • See graph. B.ramamurthy
Queuing Models • Single server queue • Entities: server, clients, queue (line) • Parameters: arrival distribution, arrival times, service time, queue length, waiting time, server utilization (busy time / total time) B.ramamurthy
Queuing Parameters λ – average arrival rate (of requests) w – average queue length Tw – average wait time Ts – average service time Tq – average time spent in the system (Tw+ Ts) λmax = 1 / Ts theoretical maximum rate that can be handled by the system. See Table A.1 B.ramamurthy
dispatch discipline queue arrivals departures Server W- items waiting Tw – waiting time q – items in queuing system Tq – queuing time Queuing structure B.ramamurthy
Multiple servers • Multi-server , single queue • Multi-server, multiple queue • Theoretical maximum input rate: λmax = N / Ts for N servers Lets look at basic queuing relationships specified a well Little’s formulas. B.ramamurthy
Little’s Formula General Single server Multi-server q = lTq r = lTs r = lTs/N w = lTw q = w + r u = rN Tq = Tw + Ts q = w + Nr • q -- mean number of items in the system • – utilization : fraction of busy time u -- traffic intensity w – mean number of items waiting to be served l -- arrival rate B.ramamurthy
Queuing Models • We would like to estimate (w,Tw, q,Tq), waiting items, waiting time, queued items, and queuing time, mean and standard deviation of each. • Assumptions made about queuing model is summarized using a notation: • G – general distribution, M – exponential distribution, D – deterministic fixed rate • Accordingly models are named: M/M/1 refers to Poisson arrival , exponential service with a single server. B.ramamurthy