scheduling theory christina touhey april 11, 2003

12
Scheduling Theory Christina Touhey April 11, 2003

Upload: charleen-gallagher

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling Theory Christina Touhey April 11, 2003

Scheduling Theory

Christina Touhey

April 11, 2003

Page 2: Scheduling Theory Christina Touhey April 11, 2003

Real Life Applications• Building a house, bike, bird house, etc.

• Completing chores or homework

• Scheduling movie times, class times or practice times

• Similar to the Traveling Salesman Problem in that a minimal cost circuit is sought

• The key point of scheduling theory is to save time by being efficient

Page 3: Scheduling Theory Christina Touhey April 11, 2003

Important Definitions

• Processors-The “workers” who do the task.• Tasks-The individual jobs or tasks that need

to be done in the complex project.• Processing times-How much time it takes a

processor to complete the task.• Precedence relations-Restrictions where one

task might need to be completed before another task is started.

Page 4: Scheduling Theory Christina Touhey April 11, 2003

Recall from Class

• A directed graph can only go in the direction specified.

• For example only A can go to B, B cannot got to A.

• In scheduling terms this means that task A must be completed before task B.

A B

Page 5: Scheduling Theory Christina Touhey April 11, 2003

Start(0)End(0)

A(6)

B(5)

D(2)

C(7) E(5)

•A, B, C, D and E are all tasks that need to be completed.•The number in the parentheses is the number of units of time each task takes to complete.•We have two restrictions or precedence relations: 1. Tasks A and B must be completed before D. 2. Task C must be completed before E.

Example 1

Page 6: Scheduling Theory Christina Touhey April 11, 2003

Decreasing Time Algorithm• The priority list is listed by the times in

decreasing order.

• For example:Arbitrary List: A(6), B(5), C(7), D(2), E(5)

Decreasing Time List: C(7), A(6), B(5), E(5), D(2)

End(0)

A(6)

B(5)

D(2)

C(7)E(5)

Start(0)

C C C C C C C E E E E E

A A A A A A B B B B B D D

Two workers:

C C C C C C CC C C C C C C

A A A A A A

C C C C C C C

A A A A A A B B B B B

C C C C C C C E E E E E

A A A A A A B B B B B

Page 7: Scheduling Theory Christina Touhey April 11, 2003

Critical Path Algorithm• Based solely on the critical path-the longest

sum of the processing times.• Using the previous example:

End(0)

A(6)

B(5)

D(2)

C(7) E(5)

Start(0)

•A processor doing task A then task D would take 8 units of time.

•A processor doing task B then task D would take 7 units of time.

•A processor doing task C then task E would take 12 units of time.

The critical path is Start-C-E-End or just C-E since it is the longest totalprocessing time of 12 units of time.

Page 8: Scheduling Theory Christina Touhey April 11, 2003

Scheduling Example• We want to make a schedule for fixing an

apartment with one worker having to complete these tasks and specific restrictions.

Task Symbol (Time)

Bathrooms (Clean) B(8)

Carpets (Shampoo) C(4)

Filters (Replace) F(1)

General Cleaning G(8)

Kitchen (Clean) K(12)

Lights (Replace bulbs) L(1)

Paint P(32)

Smoke detectors S(1)

Windows (Wash) W(4)

L P

P K

P B

K G

B G

F G

G W

G S

W C

S C

Precedence Relations

Page 9: Scheduling Theory Christina Touhey April 11, 2003

F L P P P P P P P P P P P P P P P P P P P P P P P

0 10 20

P P P P P P P P P B B B B B B B B K K K K K K K K

30 40 50

K K K K G G G G G G G G W W WW S C C C C

60 70

With one worker it takes 71 units of time!We are of course assuming that the worker workscontinuously for this amount of time.

Using the Decreasing Time Algorithm: PKBGWCFLS

Page 10: Scheduling Theory Christina Touhey April 11, 2003

For Class to try:

Using the same information in the scheduling example, make a schedule for fixing the same apartment with two workers.

Page 11: Scheduling Theory Christina Touhey April 11, 2003

Using the same information in the scheduling example, make a schedule for fixing the same apartment with two workers.

F P P P P P P P P P P P P P P P P P P P P P P P P

L

P P P P P P P P K K K K K K K K K K K K G G G G G

B B B B B B B B

W1

W2

W1

W2

0 10 20

30 40 50

G G G S C C C C

W W W W

60

W1

W2

Page 12: Scheduling Theory Christina Touhey April 11, 2003

No efficient algorithm that is guaranteed to always produce an optimal schedule is presently known.