Date post: | 01-Jan-2016 |
Category: |
Documents |
Upload: | annabella-lyons |
View: | 218 times |
Download: | 0 times |
Spring 2015Mathematics in
Management Science
Machine Scheduling Problem
Statement of MSP
Assumptions & Goals
Priority Lists
List Processing Algorithm
Machine Scheduling Problem To schedule tasks on processors to
get job done as efficiently as possible.
Two variations:– fixed # procs each with unlimited
capacity (minimize total time)–unlimited # of procs each with fixed
capacity (minimize total # used)
Basic Set Up
Job consists of interdependent tasks; want good schedule.
• Use fixed number of processors.• Order requirement digraph describes
task times and order dependencies.
In addition, often have priority list (PL) which gives ordering of the tasks.
Machine Scheduling Problem
Given • identical processors• tasks with task times *• order (precedence) relations * Schedule tasks so as to finish project
in as short a time as possible.* Info displayed via weighted digraph
called a project digraph.
Possible Goals
Can try to minimize any one of:• job completion time, or• total time processors are idle, or• number of processors necessary to
finish the job by a specified time.
Above may conflict with each other!
Basic Set Up
Job consists of interdependent tasks; want good schedule.
• Use fixed number of processors.• Order requirement digraph describes
task times and order dependencies.
In addition, often have priority list (PL) which gives ordering of the tasks.
The Tasks
Every large project has “jobs” or “tasks”.
A task is an indivisible unit of work that cannot be broken up into smaller units.
A task is always carried out by a single processor.
We use capital letters A, B, C…, to represent the tasks. (Or, T1,T2,… )
Each task requires only one processor.
Each processor can handle only one task at a time.
When a processor starts a task, it will be completed without interruption.
Any processor can work on any task.
No processor stays idle voluntarily.
Task Assumptions
11
The Tasks (continued)
At any particular moment, a task can be in one of four possible states:
• Completed
• In Execution
• Ready
• Ineligible T
T
T
T
Processing Times
The processing time (or individual task time) for a task T is the amount of time required for one processor to execute T.
The notation T(5) tells us that task T has a processing time of 5 units (minutes, hours, days, or any other unit of time).
Precedence Relations
Precedence relations describe the order in which the tasks must be executed.
Can’t begin task B until A is completed.
Until A is completed, B is ineligible.
Once A is completed, B is ready.
If A is in execution, B is ineligible.
Directed Graphs
Tasks and precedent info easily displayed via directed graphs (digraphs).
A digraph (directed graph) is just a graph with arrows on its edges which correspond to order requirements.
Vertices correspond to tasks, and we label them with weights (numbers) which give the processing times for each task.
Machine Scheduling Problem
Decide how to schedule tasks on identical processors (machines, humans, robots, etc.) so as to finish a project in as short a time as possible.
Will attack via
List Processing Algorithm.
Alternate problems available too!
Basic Set Up
Project consists of interdependent tasks; want good schedule.
• Use fixed number of processors.• Have order requirement digraph
describing task times and their order dependencies.
Often assume existence of a priority list (PL) – an ordering of the tasks.
Example
You just wrecked your car. Your garage has two processors, P1 & P2.
Four type of repairs necessary: A exterior body work (4 hours),
B engine repairs (5 hours),
C painting (7 hours)
D repair transmission (3 hours).
Only precedence relation is A C .
Example
Schedule (a) is very inefficient. All the short tasks are assigned to processor P1 and all the long tasks to P2.
Example
Schedule (b) looks much better, but it violates the order relation A C (we cannot start C until A is completed).
Example
If we force P2 to be idle for one hour, waiting to start task C, we get an OK schedule (c) with FinT = 11 hours.
Example
Can we beat FinT = 11 hours ?
The precedence relation A(4) C(7) implies that 11 hours is a minimum time barrier we cannot break.
The schedules in (c) & (d) are optimal.
11 hours is earliest completion time.
ECT = 11 hours
Priority Lists
A list of all the tasks prioritized in the order we prefer to execute them.
If X is before Y in the priority list, X gets priority over Y; given a choice between the two, X is executed ahead of Y.
If X is not yet ready, we must skip it and move on to the first ready task after X in the priority list.
PL Scheduling AlgorithmGiven project digraph & PLSchedule the next ready task on the next available processor.• next task is highest priority one• next available proc is first idle one
Tasks are in one of 4 states: ineligible, ready, executing, done.
Optimal Schedules
A schedule is optimal if it has the shortest possible completion time.
To find via Brute Force Method Look at all possible schedules;
obtain via PLSA using all possible priority lists. The schedules with the shortest completion time are the optimal schedules.
Finding Good Priority Lists
Want PL that yields optimal (or nearly optimal) schedule.
Use
Decreasing Time Algorithm, or Critical Path Algorithm .
These algorithms give PL; can use PLSA to get schedule.
Decreasing Time Algorithm
“common sense” – do the longer tasks first & leave the shorter tasks for last
DTACreate PL by sorting task times in decreasing order.
Must still get schedule; use PLSA.