Chapter 3: Planning and Scheduling Independent Tasks List-Processing Algorithm Part I At a given time, assign to the lowest-numbered free processor the first task on the priority list that is ready at that time and that hasn’t already been assigned to a processor.
Chapter 3: Planning and Scheduling Independent Tasks List-Processing Algorithm Part II As the priority list is scanned from left to right to assign a task to a processor at a particular time, we pass over tasks that are not ready to find ones that are ready. If no task can be assigned in this manner, we keep one or more processors idle until such time that, reading the priority list from the left, there is a ready task not already assigned. After a task is assigned to a processor, we resume scanning the priority list, starting over at the far left, for unassigned tasks.
Chapter 3: Planning and Scheduling Independent Tasks Independent Tasks Tasks that are independent of each other if they can be performed in any order (no edges in the order-requirement digraph). Label the tasks by their task times rather than their task number. The list-processing algorithm can be used to schedule the tasks onto machines using the given list but may not be efficient. Finding an optimal schedule amounts to packing the tasks with no “idle time” between adjacent tasks.
Chapter 3: Planning and Scheduling Independent Tasks Example: Find a schedule for independent tasks of lengths 10, 4, 5, 9, 7, 7 using the list-processing algorithm.
Chapter 3: Planning and Scheduling Independent Tasks
Chapter 3: Planning and Scheduling Independent Tasks Decreasing-Time List Algorithm First put the tasks in decreasing order by time, then apply the list processing algorithm. This will help pack the longest tasks first, so they do not “stick out” on the right end.
Chapter 3: Planning and Scheduling Independent Tasks Example: Apply decreasing-time list algorithm on independent tasks 10, 4, 5, 9, 7, 7. Rewrite the tasks as: 10, 9, 7, 7, 5, 4
Chapter 3: Planning and Scheduling Independent Tasks This result is an optimal schedule!
Recommend
More recommend