+ All Categories
Home > Documents > Excursions in Modern Mathematics, 7e: 8.4 - 2Copyright © 2010 Pearson Education, Inc. 8 The...

Excursions in Modern Mathematics, 7e: 8.4 - 2Copyright © 2010 Pearson Education, Inc. 8 The...

Date post: 01-Jan-2016
Category:
Upload: ami-fleming
View: 216 times
Download: 0 times
Share this document with a friend
23
Transcript

Excursions in Modern Mathematics, 7e: 8.4 - 2Copyright © 2010 Pearson Education, Inc.

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

Excursions in Modern Mathematics, 7e: 8.4 - 3Copyright © 2010 Pearson Education, Inc.

Our first attempt to find a good priority list is to formalize what is a seemingly sensible and often used strategy: Do the longer jobs first and leave the shorter jobs for last. In terms of priority lists, this strategy is implemented by creating a priority list in which the tasks are listed in decreasing order of processing times– longest first, second longest next, and so on. (When there are two or more tasks with equal processing times,we order them randomly.)

The Decreasing-Time Algorithm

Excursions in Modern Mathematics, 7e: 8.4 - 4Copyright © 2010 Pearson Education, Inc.

A priority list in which the tasks are listed in decreasing order of processing times is called, not surprisingly, a decreasing-time priority list, and the process of creating a schedule using a decreasing-time priority list is called the decreasing-time algorithm.

The Decreasing-Time Algorithm

Excursions in Modern Mathematics, 7e: 8.4 - 5Copyright © 2010 Pearson Education, Inc.

The figure shows, once again, the project digraph for the Martian Habitat Unit building project. To use the decreasing-time algorithm we first prioritize the 15 tasks in a decreasing-time priority list.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 6Copyright © 2010 Pearson Education, Inc.

Decreasing-time priority list: AD(8), AP(7), IW(7), AW(6), FW(6), AF(5), IF(5), ID(5), IP(4), PL(4), HU(4), PU(3), PD(3), EU(2), IC(1)

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 7Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 8Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 9Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 10Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 11Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 12Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 13Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 14Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 15Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 16Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 17Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 18Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 19Copyright © 2010 Pearson Education, Inc.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 20Copyright © 2010 Pearson Education, Inc.

Using the decreasing-time algorithm withN = 2 processors, we get this schedule with project finishing time Fin = 42 hours.

Example 8.9 Building That Dream Home on Mars: Part 4

Excursions in Modern Mathematics, 7e: 8.4 - 21Copyright © 2010 Pearson Education, Inc.

When looking at the finishing time under the decreasing-time algorithm, one can’t help but feel disappointed. The sensible idea of prioritizing the longer jobs ahead of the shorter jobs turned out to be somewhat of a dud–at least in this example! What went wrong? If we work our way backward from the end, we can see that we made a bad choice at T = 33 hours. At this point there were three ready tasks [PD(3), EU(2), and IC(1)], and both processors were available.

Weaknesses of this Algorithm

Excursions in Modern Mathematics, 7e: 8.4 - 22Copyright © 2010 Pearson Education, Inc.

Based on the decreasing-time priority list, we chose the two “longer” tasks, PD(3) and EU(2) ahead of the short task, IC(1). This was a bad move! IC(1) is a much more critical task than the other two because we can’t start task FW(6) until we finish task IC(1). Had we looked ahead at some of the tasks for which PD, EU, and IC are precedent tasks, we might have noticed this.

Weaknesses of this Algorithm

Excursions in Modern Mathematics, 7e: 8.4 - 23Copyright © 2010 Pearson Education, Inc.

An even more blatant example of the weakness of the decreasing-time algorithm occurs at the very start of this schedule when the algorithm fails to take into account that task AF(5) should have a very high priority. Why? AF(5) is one of the two tasks that must be finished before IF(5) can be started, and IF(5) must be finished before IW(7) can be started, which must be finished before IP(4) and ID(5) can be started, and so on down the line.

Weaknesses of this Algorithm


Recommended