1 / 19

8 The Mathematics of Scheduling

8 The Mathematics of Scheduling. 8.1 The Basic Elements of Scheduling 8.2 Directed Graphs (Digraphs) 8.3 Scheduling with Priority Lists 8.4 The Decreasing-Time Algorithm 8.5 Critical Paths 8.6 The Critical-Path Algorithm 8.7 Scheduling with Independent Tasks. Independent Tasks.

mballard
Download Presentation

8 The Mathematics of Scheduling

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. 8 The Mathematics of Scheduling 8.1 The Basic Elements of Scheduling 8.2 Directed Graphs (Digraphs) 8.3 Scheduling with Priority Lists 8.4 The Decreasing-Time Algorithm 8.5 Critical Paths 8.6 The Critical-Path Algorithm 8.7 Scheduling with Independent Tasks

  2. Independent Tasks We will briefly discuss what happens to scheduling problems in thespecial case when there are no precedence relations to worry about. This situation arises whenever we are scheduling tasks that are all independent. Thereare no efficient optimal algorithms known for scheduling, even when the tasksare all independent.

  3. Scheduling with Independent Tasks The nuts-and-bolts details of creating a schedule using apriority list become tremendously simplified when there are no precedence relations to mess with. In this case, we just assign the tasks to the processors as theybecome free in exactly the order given by the priority list.

  4. Scheduling with Independent Tasks Withoutprecedence relations, the critical-path time of a task equals its processing time.This means that the critical-time list and decreasing-time list are exactly the samelist, and, therefore, the decreasing-time algorithm and the critical-path algorithmbecome one and the same.

  5. Example 8.13 Preparing for Lunch Priority list:A(70), B(90), C(100), D(70), E(80), F(20), G(20), H(80), I(10) Since there are no precedence relations, there are no ineligible tasks, and alltasks start out as ready tasks. As soon as a processor is free, it picks up the nextavailable task in the priority list. From the bookkeeping point of view, this is apiece of cake. It is obvious from thefigure on the next slide that this is not a very good schedule.

  6. Example 8.13 Preparing for Lunch

  7. Example 8.13 Preparing for Lunch If we use the decreasing-time priority list (which in this case is also thecritical-time priority list), we are bound to get a much better schedule. Priority list:C(100), B(90), E(80), H(80), A(70), D(70), F(20), G(20), I(10)

  8. Example 8.13 Preparing for Lunch This is clearly an optimal schedule, since there is no idle time for any of the processors throughout the project.The optimal finishing time for the project is Opt= 180minutes.

  9. Example 8.14 Preparing for Lunch: Part 2 After the success of your last banquet, you and your two friends are asked to prepare another banquet. This time it will be a seven-course meal. The courses are allindependent tasks, and their processing times (in minutes) are A(50), B(30), C(40), D(30), E(50), F(30), and G(40).

  10. Example 8.14 Preparing for Lunch: Part 2 The decreasing-time priority list is A(50), E(50), C(40), G(40), B(30), D(30), and F(30). The resulting schedule, has project finishingtime Fin = 110 minutes.

  11. Example 8.14 Preparing for Lunch: Part 2 An optimal schedule (found using old-fashioned trial and error) with finishing time Opt = 90 minutes is shown.

  12. Example 8.14 Preparing for Lunch: Part 2 Knowing the optimal finishingtime Opt = 90 minutes allows us to measure how much we were off when we used the decreasing-time priority list. As we did with earlier approximate solutions, we usethe relative error. In this case, the relative error is (110 – 90)/90 = 20/90 ≈ 0.2222 = 22.22%.

  13. RELATIVE ERROR OF A SCHEDULE For a schedule with finishing time Fin, the relative error (denoted by ) is given by

  14. Graham Bound In 1969 American mathematician Ron Graham showed that when schedulingindependent tasks using the critical-path algorithm with N processors, the relativeerror is at most(N – 1)/3N. We will call this upper bound for the relative errorthe Graham bound.

  15. GRAHAM BOUND The Graham bound for the relative error  when scheduling a set of independent tasks with N processors is

  16. Graham’s Bound The table shows the Graham bound for the relative error  for a few small valuesof N.

  17. Graham’s Bound The table gives us a good sense of what is happening: As N grows, so doesthe Graham bound, but the Graham bound tapers off very quickly and willnever go past 33 1/3%.

  18. Graham’s Bound Graham’s bound essentially implies that with independent tasks we can use the critical-path algorithm with the assurance that therelative error is bounded–no matter how many tasks need to be scheduled orhow many processors are available to carry them out the finishing time of theproject will never be more than 33 1/3% more than the optimal finishing time.

More Related