Independent Tasks Scheduling Idpt Tasks Optimal Schedules Reducing FinTime Spring 2015 Mathematics in Management Science Independent Tasks Tasks are independent when there are no order requirements. In this case, LPA simply says: schedule next task on next proc. Also, for project with independent tasks, DTA=CPA; this is because DTPLs are CTPLs. 3 Example 3 2 2 Suppose have six independent tasks with indicated task times. 2 Scheduling 2 procs with DTA get schedule with FinTime=7. Optimal? 3 2 3 2 2 3 2 3 2 2 NO! Easy to find schedule with FinTime=6. Optimal Finishing Time A schedule is optimal if it has the shortest possible completion time. OptFinTime is smallest possible time to finish overall project; can’t beat. Always have OptFinTime ≥ ECT ; here ECT is the length of a critical path (longest path from Start to End). Optimal Finishing Time Different PLs give different FinTimes. OptFinTime is given by some PL. Too many PLs to check every one. How to tell if a schedule is optimal? Or at least not too far away? Generally not easy to tell, but there are constraints on completion times that can help. Optimal Finishing Time No schedule will take longer than the total task time TTT=sum all task times. No schedule can complete in less time than ECT=length of a critical path. No schedule can complete in less time than total task time divided by the number of processors. Optimal Finishing Time No schedule can complete in less time than total task time divided by the number of processors. That is, always have FinTime ≥ TTT / N where TTT = total task time and N = # of processors . Example Have 150 exams to grade. Each exam takes 1 hour to grade. So, ECT=1. Only get if have 150 TAs to do grading! 50 TAs FinT=3 30 TAs FinT=5 40 TAs FinT=4 (40+40+40+30=150) Best FinT is TTT divided by # TAs where TTT=150 (rounded up ). Optimal Finishing Time Always have lower bounds FinTime ≥ ECT FinTime ≥ TTT / N where ECT = earliest completion time, TTT = total task time, N = # of processors . Optimal Finishing Time Always have lower bounds FinTime ≥ ECT FinTime ≥ TTT / N. So, if get schedule with FinTime either ECT or TTT/N, then it is optimal! Optimal Schedules A schedule is optimal if FinTime = CritTime or FinTime = TTT / N . These not necessary conditions! Example CritTime=12 TTT=25, so PL E, D, C, B, A TTT/2=[12.5]=13 hence schedule is optimal P1 P2 Reducing FinTime Suppose we try to decrease FinTime by reducing individual task times. How much effect will this have? Which task times are the most important ones to reduce? [7] Example Start CritPath SCEFE ECT=14 [5] [9] 0 [1] [6] End 0 [14] If decrease task time for E by 2, … new ECT=13 If decrease task time for C by 2, … new ECT=12