Presentation is loading. Please wait.

Presentation is loading. Please wait.

A processor is a person, machine, computer, or robot etc., which works on a task. To solve a scheduling problem typically the tasks are scheduled to minimize.

Similar presentations


Presentation on theme: "A processor is a person, machine, computer, or robot etc., which works on a task. To solve a scheduling problem typically the tasks are scheduled to minimize."— Presentation transcript:

1

2 A processor is a person, machine, computer, or robot etc., which works on a task. To solve a scheduling problem typically the tasks are scheduled to minimize completion times. Make sure to consider importance of a task, does one task need to be completed before another task.

3 ASSUMPTIONS AND RULES If a processor starts working on a task, the work will continue until that task is complete. No processor stays idle if there is a task to be done. The CPA has an associated order- requirement digraph. The tasks are arranged in a priority list that is independent of the digraph.

4 Goals of CPA Minimize the completion time for a given number of processors Minimize processor idle time Minimize the number of processors needed to complete the job in a specified time. A task is considered ready if all its predecessors (prerequisite tasks) in the digraph have been completed.

5 LIST PROCESSING ALGORITHM 1.Assignment of Processors: The lowest numbered idle processor is assigned to the highest priority ready task until either all processors are assigned or all ready tasks are being worked on 2.Status Check: When a processor completes a task, that processor becomes idle. Check for ready tasks and tasks not yet completed and determine which of the following applies a)If there is a ready task repeat step 1. b)If there are no ready tasks bunt not every task has been completed, the idle processor remains idle until more tasks are completed. c)If all tasks are completed, the job is done.

6 EXAMPLE: T1 3 T2 8 T3 7 T4 4 T5 7

7 T1 3 T2 8 T3 7 T4 4 T5 7

8 EXAMPLE: T1 3 T2 8 T3 7 T4 4 T5 7

9 T1 3 T2 8 T3 7 T4 4 T5 7

10 Tortillas Chicken 1 onion Seasoning Tomatoes Cilantro T1: slice chicken & onions – 5 min T2: Cook chicken – 10 min T3: Cook onions – 5 min T4: Add seasoning – 1 min T5: Chop tomato – 4 min T6: Mix tomato and cilantro – 2 min T7: Warm tortillas – 1 min T8: Serve – 1 min

11 T2 10 T3 5 T4 1 T5 4 T1 5 T6 2 T7 1 T8 1

12 T2 10 T3 5 T4 1 T5 4 T1 5 T6 2 T7 1 T8 1

13

14

15

16 1.Find a task that heads a critical (longest) path in the order-requirement digraph 2.Place the task found in step 1 next in the priority list 3.Remove the task found in step 1 from the digraph 4.If all tasks have been removed, the list is completed. If tasks remain return to step one.

17 T1 5 T2 3 T3 7 T4 2 T5 2 T6 3 T7 1 T8 4

18

19

20 Critical path algorithm on 3 processors

21 List process algorithm on 3 processors

22 Critical path algorithm on 2 processors

23 Critical path algorithm on 3 processors


Download ppt "A processor is a person, machine, computer, or robot etc., which works on a task. To solve a scheduling problem typically the tasks are scheduled to minimize."

Similar presentations


Ads by Google