The Decreasing-Time Algorithm Lecture 36 Sections 8.4 Robb T. Koether Hampden-Sydney College Wed, Apr 18, 2018 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 1 / 10
1 The Decreasing-Time Algorithm 2 Assignment Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 2 / 10
Outline 1 The Decreasing-Time Algorithm 2 Assignment Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 3 / 10
The Decreasing-Time Algorithm Definition (The Decreasing-Time Algorithm) The decreasing-time algorithm creates a priority list in which the tasks arranged in order of decreasing time. It then proceeds as before. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 4 / 10
Example (The Decreasing-Time Algorithm) Apply the decreasing-time algorithm with 2 processors. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 5 / 10
Example (The Decreasing-Time Algorithm) Apply the decreasing-time algorithm with 2 processors. Apply it with 3 processors. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 5 / 10
Example (The Decreasing-Time Algorithm) Apply the decreasing-time algorithm with 2 processors. Apply it with 3 processors. Would it help to have 4 processors? Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 5 / 10
Example Example (Priority-List Scheduling) A B C D E F G H P2 P1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) E H F G A B D P2 P1 C 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) B E H F G D P2 A P1 C 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) E H F G D P2 A B P1 C 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) P2 P1 E H F G A C D B 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) E H G P2 A B P1 C D F 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) H G P2 A B E P1 C D F 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) G P2 A B E P1 C D F H 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example Example (Priority-List Scheduling) P2 A B E G P1 C D F H 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 6 / 10
Example (The Decreasing-Time Algorithm) A(3) B(4) C(1) D(3) E(1) F(2) H(1) G(1) I(1) Apply the decreasing-time algorithm with 2 processors. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 7 / 10
Example (The Decreasing-Time Algorithm) A(3) B(4) C(1) D(3) E(1) F(2) H(1) G(1) I(1) Apply the decreasing-time algorithm with 2 processors. Apply it with 3 processors. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 7 / 10
Example (The Decreasing-Time Algorithm) A(3) B(4) C(1) D(3) E(1) F(2) H(1) G(1) I(1) Apply the decreasing-time algorithm with 2 processors. Apply it with 3 processors. Would it help to have 4 processors? Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 7 / 10
Task Label Prec. Tasks Set up tables and chairs TC(1.5) Set tablecloths and napkins TN(0.5) TC Make flower arrangements FA(2.2) Unpack crystal, china, etc. CC(1.2) Put place settings on table PS(1.8) TN, CC Arrange table decorations TD(0.7) FA, PS Set up the sound system SS(1.4) Set up the bar SB(0.8) TC Schedule the project using 2 processors and the decreasing-time algorithm. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 8 / 10
Outline 1 The Decreasing-Time Algorithm 2 Assignment Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 9 / 10
Assignment Assignment Chapter 8: Exercises 43, 44, 45, 46, 49. Robb T. Koether (Hampden-Sydney College) The Decreasing-Time Algorithm Wed, Apr 18, 2018 10 / 10