1 / 65

Ihsan Ayyub Qazi

“Achievable sojourn times in M/M/1 and GI/GI/1 systems: A Comparison between SRPT and Blind Policies”. Ihsan Ayyub Qazi. D ( t ). A ( t ), l. Q ( t ). Plan for the Presentation. Some basics Motivation for minimizing sojourn times Intuition for the Optimality of SRPT

nat
Download Presentation

Ihsan Ayyub Qazi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. “Achievable sojourn times in M/M/1 and GI/GI/1 systems: A Comparison between SRPT and Blind Policies” Ihsan Ayyub Qazi D(t) A(t), l Q(t) CS 3150 Presentation

  2. Plan for the Presentation • Some basics • Motivation for minimizing sojourn times • Intuition for the Optimality of SRPT • Paper 1: “On the average sojourn time under M/M/1/SRPT” by Nikhil Bansal • Paper 2: “Achievable sojourn times by non-size based policies in a GI/GI/1 queue” by Nikhil Bansal CS 3150 Presentation

  3. Some Basics… • The sojourn time of a job is the time since a job arrives until the time it completes its service requirement. CS 3150 Presentation

  4. Why minimize sojourn time? • Sojourn time is one of the most useful measures of • user satisfaction and • performance in a scheduling system. • Keeping the average sojourn time low is often an important criteria in the choice of a scheduling policy. CS 3150 Presentation

  5. Optimizing the average sojourn time • SRPT policy that at any works on the job with the smallest remaining service requirement, achieves the optimum possible average sojourn time for all possible instances of the problem [1], [2] CS 3150 Presentation

  6. Optimality of SRPT 5 • Shortest Job First (SJF) is a non-preemptive policy that schedules the jobs in increasing order of their sizes. • It is optimal for all non-preemptive polices • However, the SJF policy is optimal only when all the jobs are present at the server at once. Scheduler 20 Total Completion Time = 20+25 = 45 Average Completion Time = 45/2 = 22.5 20 Scheduler 5 Total Completion Time = 5+25 = 30 Average Completion Time = 30/2 = 15 CS 3150 Presentation

  7. Optimality of SRPT However, one can consider the remaining processing time (i.e. 15) as a separate job and hence swap it with 5 • One can view SRPT as a preemptive version of SJF. • Hence one can get an idea about the optimality of SRPT 5 Scheduler 15 5 20 Total Completion Time = 5+20 = 25 Average Completion Time = 25/2 = 12.5 Total Completion Time = 15+20 = 35 Average Completion Time = 35/2 = 17.5 CS 3150 Presentation

  8. Disadvantages of SRPT • SRPT requires exact knowledge of the service requirement for each job • It is unfair to Jobs with large service requirements and may even starve them. • Blind policies have many attractive properties such as • they are stateless and • easier to implement in a real system. CS 3150 Presentation

  9. “On the average sojourn time under M/M/1/SRPT” by Nikhil Bansal CS 3150 Presentation

  10. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  11. Problem “How much more can the sojourn time improve if the knowledge of job sizes is used while scheduling?” CS 3150 Presentation

  12. Classical Result • It is a well-known result that the average sojourn time in an M/M/1 system is • This holds for all scheduling policies that do not make use of the job sizes while scheduling [3]. CS 3150 Presentation

  13. Problem Definition (revisited) “How much more can the sojourn time improve if the knowledge of job sizes is used while scheduling?” In essence, this question reduces to finding the expression for the average sojourn time in a M/M/1/SRPT system CS 3150 Presentation

  14. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  15. Main result of the Paper… The average sojourn time [under M/M/1/SRPT] with exponentially distributed job sizes varies as Thus SRPT offers a factor improvement over policies that ignore knowledge of job sizes while scheduling CS 3150 Presentation

  16. Improvement Factor CS 3150 Presentation

  17. Contribution of the paper • This result places a lower bound on the achievable average sojourn time under any scheduling policy in an M/M/1 system • The result provides an analytical justification for the empirically observed improvement under SRPT at high loads. CS 3150 Presentation

  18. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  19. Some Previous work… • Schrage and Miller first obtained the expression for the expected sojourn time for a job of size x under SRPT in the more general M/G/1 queuing system. They showed that, Mean Waiting Time Mean Residence Time CS 3150 Presentation

  20. Mean Waiting and Residence times for a job of size (Intuition) • Average time a job of size x takes from when it arrives to when it receives service for the first time Expected Waiting Time of a job of size x corresponds to waiting for all jobs of sizes less than or equal to x to complete • Average time it takes for a job of size x to complete once it begins execution. CS 3150 Presentation

  21. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  22. Analysis: Expressions with exponentially distributed job sizes CS 3150 Presentation

  23. Expression for the sojourn time under SRPT for exponential distributed job sizes • The average sojourn time under SRPT is given by CS 3150 Presentation

  24. Results • Theorem 1: For all p between 0 and 1 • Theorem 2 (Heavy Traffic Case): CS 3150 Presentation

  25. Sketch of the proof • An upper bound on E[R] is derived. • Then an upper bound for E[W] is derived for the case when the utilization is more than 75%. • For other values of utilization, the result is shown to be true by considering the average sojourn time under FCFS as the upper bound. • It is shown that that the contribution of E[R] to E[T] is not significant. • Hence a good tight bound can be obtained for E[T] by lower bounding it by E[W] CS 3150 Presentation

  26. Upper Bounding the Sojourn Time • Lemma 1: For any load p, such that it is between 0 and 1 • For any load p, such that it is between 2/3 and 1 CS 3150 Presentation

  27. Comparison between the bounds on E[R] and E[W] CS 3150 Presentation

  28. Lower Bounding the Sojourn Time • Lemma 3: CS 3150 Presentation

  29. Sketch of the proof (contd) • For any load, the average sojourn time under SRPT is atleast equal to the average job size. Since SRPT is optimal E[T] is upper bounded by the average sojourn time under the policy FCFS. Thus • And hence for p < 2/3. The theorem equation is seen to be true in this case. CS 3150 Presentation

  30. Upper Bound for Theorem 1 Lemma 3 gives the required lower bound, hence theorem 1 is proved CS 3150 Presentation

  31. Thankyou CS 3150 Presentation

  32. “Achievable sojourn times by non-size based policies in a GI/GI/1 queuing system” by Nikhil Bansal CS 3150 Presentation

  33. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  34. Problem How much worse can the average time under the best blind policy be as compared to SRPT (in a GI/GI/1 system)? CS 3150 Presentation

  35. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  36. Main result of the paper “For a GI/GI/1 system, the average sojourn time under the best blind policy is atmost time worse (upto a constant factors) then the best average sojourn time possible under any arbitrary policy” • Thus in a sense, the lack of knowledge of actual job-sizes does not pose a serious problem if the blind policy is chosen carefully. CS 3150 Presentation

  37. Improvement Factor of SRPT against the Best Blind Scheduling Policy CS 3150 Presentation

  38. Background and Motivation • A GI/GI/1 queuing system • Inter-arrival times are i.i.d rvs, A, taken from a General distribution Ga • Job Sizes are i.i.d rvs, S, taken from a General distribution Gs • Different from a G/G/1 system. • Gs and Ga specify a GI/GI/1 system completely. Therefore, the optimum blind policy A (which minimizes the average sojourn time) only depends on the respective distributions. • Opt(Ga, Gs) = Average sojourn time under the optimum blind policy. CS 3150 Presentation

  39. Difference in the analyses of M/M/1 and G1/G1/1 queuing systems • In a M/M/1 system all blind policies are identical as far as the average sojourn time is concerned. In particular any blind scheduling policy has average sojourn equal to • So the question reduced to determining the average sojourn time under SRPT. Bansal showed that for exponential job sizes the average sojourn time under M/M/1/SRPT is CS 3150 Presentation

  40. So why is the analysis of a G1/G1/1 queuing system different and more difficult? • Unlike the case in M/M/1, all blind policies are no more identical !!! • No single blind policy is optimal for e.g. • In an M/G/1 system FCFS is optimum for job size distributions with increasing failure rates. • Foreground Background (FB) [that at time works on the job with the least attained service] is optimum for job size distributions with decreasing failure rates CS 3150 Presentation

  41. So why is the analysis of a G1/G1/1 queuing system different and more difficult? • Same blind policy can have very different behaviours for different job sizes. • While FB has average sojourn time when job sizes are exponentially distributed, the • Average sojourn time under FB varies as when the job sizes have the pareto distribution with CS 3150 Presentation

  42. What to do? So why is the analysis of a G1/G1/1 queuing system so difficult? • Furthermore, As the analytic expression for average sojourn time under an arbitrary GI/GI/1 system is not known and moreover no analytic expression for Opt(Ga, Gs) for general Ga, Gs is known, therefore we cannot adopt the approach that we used in the case of M/M/1 CS 3150 Presentation

  43. Hmmm… CS 3150 Presentation

  44. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  45. Competitive Analysis • Let A(I): Total sojourn time when the instance is executed according to the algorithm A. • We say that a deterministic algorithm has a competitive ratio c(n) if • The definition of competitive ratio is quite strict, • A more useful notion is that of a randomized algorithm. Worst Case Ratio over all input instances of size atmost n achieved by A and the optimum cost on that instance CS 3150 Presentation

  46. Competitive Analysis • The competitive ratio of a randomized algorithm is defined as • The crucial thing to observe is that there is no probabilistic assumption on the input instance. • The input instance is still chosen adversarially to maximize the ratio. CS 3150 Presentation

  47. Competitive Analysis • Randomized algorithms can have significantly better competitive ratios than deterministic algorithms. • NOTE: The notion of the performance of a randomized algorithm is dual to the notion of the average case performance of a system like GI/GI/1 • While the former deals with the performance over a distribution over algorithms on a fixed input instance, the latter deals with the performance of a fixed algorithm on a distribution over input instances. Can we relate the two? CS 3150 Presentation

  48. Yao’s Minimax Theorem (Contrapositive) [Minimization Problem] • Suppose a cost minimization problem P has a c(R,n) competitive randomized online algorithm R for request sequences of length atmost n. Let distribution y(j) be any distribution over request sequences of length atmost n. Then, • In particular, for any distribution over the input instances, if we consider the algorithm Ai that has the best average case performance on this distribution, then this performance is no worse than c(R,n) times the performance of the optimum algorithm. CS 3150 Presentation

  49. Plan • Problem • Results • Background • Analysis CS 3150 Presentation

  50. Some known results for competitive ratio of blind scheduling algorithm • For the problem of minimizing the average sojourn time: • Motwani, Phillips and Torng showed that no blind deterministic scheduling algorithm can have a competitive ratio better than • The same people showed that any randomized algorithm has a competitive ratio atleast CS 3150 Presentation

More Related