Presentation is loading. Please wait.

Presentation is loading. Please wait.

8.2: Digraphs (continue). Digraphs Example 1) TASKSTIMETASKS BEFORE A3 B10C,F,G C2A D4G E5C F8A,H G7H H5.

Similar presentations


Presentation on theme: "8.2: Digraphs (continue). Digraphs Example 1) TASKSTIMETASKS BEFORE A3 B10C,F,G C2A D4G E5C F8A,H G7H H5."— Presentation transcript:

1 8.2: Digraphs (continue)

2 Digraphs Example 1) TASKSTIMETASKS BEFORE A3 B10C,F,G C2A D4G E5C F8A,H G7H H5

3 Digraphs Example 1) TASKTASK TI M E TASKS BEFORE A3 B10C,F,G C2A D4G E5C F8A,H G7H H5 End Start A(3) H(5) C(2) G(7) F(8) E(5) B(10) D(4)

4 Digraphs Example 2) TASKSTIMETASKS BEFORE A3B,C B5 C2 D6A E7C

5 Digraphs Example 2) TASKTASK TIMETIME TASKS BEFORE A3B,C B5 C2 D6A E7C start end B(5) C(2) A(3) D(6) E(7)

6 Practice: Digraphs Example 3) TASKSTIMETASKS BEFORE A5C B5C,D C5 D2G E15A,B F6D G2 H2G

7 Digraphs Example 4) Ten computer programs need to be executed. Three of the program require 4 minutes each to complete, 3 more require 7 minutes each to complete, and 4 of the programs require 15 minutes each to complete. Moreover, none of the 15- minute programs can be started until all of the 4-minute programs have been completed. Draw a digraph for this problem

8 8.3 Create a schedule using Priority List Steps: –Copy down the priority list (it is given) –Circle the tasks that are ready –Assign the ready tasks to the processors –When a task a complete, check for the next ready tasks When a processor is free, scan the priority list from left to right and assign the next ready task to that processor More than 1 processor is free, the first ready task is assign to 1 free processor and the 2 nd ready task is given to the other processor When tasks are not ready, the processors have to stay “IDLE” A A A

9 Ex1: Create schedule for 2 people using the given priority list Priority List: E(5), D(2), C(7), B(5), A(6) 2 D 6A5B P2P2 idleidle 5E7C P1P1 Start End A B C D E 2 people can complete these tasks in 13 hours

10 Ex2: use a different priority list Priority List: A(6), B(5), D(2), C(7), E(5) Start End A B C D E


Download ppt "8.2: Digraphs (continue). Digraphs Example 1) TASKSTIMETASKS BEFORE A3 B10C,F,G C2A D4G E5C F8A,H G7H H5."

Similar presentations


Ads by Google