Successfully reported this slideshow.
1Observations on DAG Schedulingand Dynamic-Load-Balancingusing Genetic AlgorithmRahul JainIDD Part VRoll No.- 07020007IT-B...
2Outline Introduction Thesis Objective Directed Acyclic Graph Basic Genetic Algorithm Proposed Algorithm for DAG-Sche...
3Introduction1. Heterogeneous Computing SystemHeterogeneous computing systems refer to electronic systems that use avariet...
4Thesis Objective This thesis comprises the study of two research projects: DAGScheduling using Genetic Algorithm in Part...
5Directed Acyclic Graph A process or an application can be broken down into a set of tasks we represent these tasks in t...
6Directed Acyclic GraphTask No. P1 P2 P31 14 16 92 13 19 183 11 13 194 13 8 175 12 13 106 13 16 97 7 15 118 5 11 149 18 12...
7DAG-SchedulingBasic Assumptions Any processor can execute the task and communicate with othermachines at the same time....
8DAG-Scheduling1.Task selection and Schedule phase Task Selection phaseTask are selected according to their height in DAG...
9DAG-Scheduling2. Scheduling Encoding (Chromosome) A string is a candidate solution for the problem. String consists ofse...
10DAG-Scheduling3. Initialzation Population of size POP_SIZE has been initialized.4.Fitness Function The GA requires a f...
11DAG-Scheduling5.Roulette-Wheel Selection Roulette-wheel selection is used for selecting potentially useful solutionsfor...
12DAG-Scheduling6.Crossover New chromosome is generated with this operator. A parent chromosome is selected by roulette-...
13DAG-Scheduling7. Mutation A mutation operation is designed to reduce the idle time of aprocessor waiting for the data f...
14DAG-Scheduling8. Termination Conditions Condition 1: If we find an Individual which has Makespan less thenthe specified...
15DAG-Scheduling9. Pseudo codeBegininitialize P(k); {create an initial population of size POP_SIZE}evaluate P(k); {evaluat...
16Dynamic Load Balancing1. Basic Definitions Load Calculations: sum of processes execution times allocated tothat process...
17Dynamic Load Balancing2. Basic Assumptions Each processor can only execute one process at each moment. Tasks are non-p...
18Dynamic Load Balancing3. Sliding Window Technique How many task should selected at a time from the pool of task, this i...
19Dynamic Load Balancing4. Scheduling Encoding (Chromosome) This is a 2D matrix of size[no. of processors x size of slidi...
20Dynamic Load Balancing6. Fitness Function Fitness function attaches a value to each chromosome in thepopulation, which ...
21Dynamic Load Balancing8. Cycle Crossover Single point crossover can’t be used in this GA as it may cause sometasks to b...
22Dynamic Load Balancing9. Random Swap Mutation Random mutation technique is used to apply mutation on newlygenerated chi...
23Dynamic Load Balancing10. Termination Condition The variable gen stores the count, how many generations the GAshould ru...
24Dynamic Load Balancing12. Pseudo CodeBeginRepeatsave the tasks into sliding window;initialize P(k); {create an initial p...
25Experimental results and Discussion1.Dynamic Load Balancing1. Test Parameters The measurement of performance of propose...
26Experimental results and Discussion1.Dynamic Load Balancing2. Changing the population size The population sizes ranged ...
27Experimental results and Discussion1.Dynamic Load Balancing3. Changing the No. of Generation Cycles The number of gener...
28Experimental results and Discussion1.Dynamic Load Balancing4. Changing the No. Processors The no. of processors was cha...
29Experimental results and Discussion1.Dynamic Load Balancing5. Changing the No. Tasks The number of tasks was varied fro...
30Experimental results and Discussion1.Dynamic Load Balancing6. Changing the Sliding Window The sliding window size was c...
31Experimental results and Discussion2.DAG-Scheduling1. Test Parameters The measurement of performance for DAG scheduling...
32Experimental results and Discussion2.DAG-Scheduling2. Changing the no. of Generation cycles The no. of generations was ...
33Experimental results and Discussion2.DAG-Scheduling3. Changing the no. of Tasks The no. of tasks was varied from 10 to ...
34Conclusion The result generated by the proposed dynamic load-balancingmechanism using Genetic Algorithm was extremely g...
35References1) AlbertY.Zomaya, Senior Member, IEEE, Chris Ward, and Ben Macey, “Genetic Scheduling for Parallel Processor ...
36Questions Thank you. Questions?
Upcoming SlideShare
Loading in …5
×

Observations on dag scheduling and dynamic load-balancing using genetic algorithm

839 views

Published on

My Dissertation work. Load Balancing in Homogeneous and heterogeneous environment using Genetic Algorithm.

Published in: Education, Technology, Business
  • Be the first to comment

  • Be the first to like this

Observations on dag scheduling and dynamic load-balancing using genetic algorithm

  1. 1. 1Observations on DAG Schedulingand Dynamic-Load-Balancingusing Genetic AlgorithmRahul JainIDD Part VRoll No.- 07020007IT-BHU,Varanasi
  2. 2. 2Outline Introduction Thesis Objective Directed Acyclic Graph Basic Genetic Algorithm Proposed Algorithm for DAG-Scheduling Proposed Algorithm for DLB Experimental Results and Discussion Conclusion References
  3. 3. 3Introduction1. Heterogeneous Computing SystemHeterogeneous computing systems refer to electronic systems that use avariety of different types of computational units.2. Task SchedulingThe multiprocessor scheduling problem is to allocate the tasks of a parallelprogram to processors in a way that minimizes its completion time andoptimizes the performance.3. Load BalancingThe technique of distributing load among processors in order to avoid overloading
  4. 4. 4Thesis Objective This thesis comprises the study of two research projects: DAGScheduling using Genetic Algorithm in Part I and Dynamic LoadBalancing using Genetic Algorithm in Part II. Part I: The objective of part-I is to design an algorithm to schedulethe DAG tasks on Heterogeneous processors in such a way thatminimize the total completion time (Makespan). Part II: This part is based on designing an algorithm for schedulingthe load among the processor in such a way that none of the processoris overloaded. Comparison of various metrics is to be done for DAG-Scheduling andDynamic Load Balancing.
  5. 5. 5Directed Acyclic Graph A process or an application can be broken down into a set of tasks we represent these tasks in the form of a directed acyclic graph(DAG) A parallel program with n tasks can be represented by a 4-tuple (T, E,D, [Ai])1) T = {tl, t2, . . , tn} is the set of tasks.2) E the edges, represents the communication between tasks3) D is an n x n matrix, where the element dij of D is the data volumewhich ti should transmit into tj.4) Ai, 1 <= i <= n, is a vector [eil, ei2, . . . , eiu,], where eiu, is the executiontime of ti on pu.
  6. 6. 6Directed Acyclic GraphTask No. P1 P2 P31 14 16 92 13 19 183 11 13 194 13 8 175 12 13 106 13 16 97 7 15 118 5 11 149 18 12 2010 21 7 16
  7. 7. 7DAG-SchedulingBasic Assumptions Any processor can execute the task and communicate with othermachines at the same time. Each processor can only execute one process at each moment. Graph is fully connected. Once a processor has started task execution it continues withoutinterruption, and after completing the execution it immediately sendsthe output data to children tasks in parallel. Intra-processor communication cost is negligible compared to theinter-processor communication cost.
  8. 8. 8DAG-Scheduling1.Task selection and Schedule phase Task Selection phaseTask are selected according to their height in DAG Calculation of task’s start and finish timeWhere , PAT(ti , pu) = processor availableDAT(ti , tk , pu) = data avaulableET(ti , pu) = execution time of ti on pu.
  9. 9. 9DAG-Scheduling2. Scheduling Encoding (Chromosome) A string is a candidate solution for the problem. String consists ofseveral lists. Each list is associated with a processor. Lets for any application of 10 tasks the generated schedule is:• 1th Processor : t3 t4 t8• 2th Processor : t5 t7 t9• 3th Processor : t0 t1 t2 t6 Then the chromosome can be represented as matrix of size[No. ofTask x No. of Processors]P1 P2 P3t3 t5 t0t4 t7 t1t8 t9 t2
  10. 10. 10DAG-Scheduling3. Initialzation Population of size POP_SIZE has been initialized.4.Fitness Function The GA requires a fitness function that assigns a score to eachchromosome in the population. The fitness function in a GA is the objective function that is to beoptimized. In the proposed algorithm Fitness function returns the time when alltasks in a DAG complete their executions. A fitness function f of astring x is defined as follows:
  11. 11. 11DAG-Scheduling5.Roulette-Wheel Selection Roulette-wheel selection is used for selecting potentially useful solutionsfor recombination ( Crossover ). Probability of being selected of any chromosome is: Sum of Fitness = 8. Rand ( 8 ) = 3 Chromosome3 is the parent.5 1.5 4 2
  12. 12. 12DAG-Scheduling6.Crossover New chromosome is generated with this operator. A parent chromosome is selected by roulette-wheel operator and thentwo processors are selected from this chromosome. Apply single point crossover on these selected processor list.Figure: Modified Single Point Crossover
  13. 13. 13DAG-Scheduling7. Mutation A mutation operation is designed to reduce the idle time of aprocessor waiting for the data from other processors. Data Dominating Parent (DDP) task of task ti be the task whichtransmits the largest volume of data to ti. That is, Example of Mutation :Figure : Mutation.
  14. 14. 14DAG-Scheduling8. Termination Conditions Condition 1: If we find an Individual which has Makespan less thenthe specified minimum, then GA stops evolving. Condition 2: Variable gen stores the number, how many generationsthe GA should run. User input the variable every time he runs theprogram. When the generation count crosses the gen, the GA stopsevolving.
  15. 15. 15DAG-Scheduling9. Pseudo codeBegininitialize P(k); {create an initial population of size POP_SIZE}evaluate P(k); {evaluates the fitness of all the chromosomes}RepeatFor i=1 to POPSIZE doSelect a chromosome a as parent from population;Child 1 <= Crossover( parent);Child 2 <= Mutation ( Child 1 );Add (new temporary population, Child 1, Child 2);End For;Make (new pop, new temp pop, old pop );Population = new population;While (not termination condition);Select Best chromosome in population as solution andreturn it;End
  16. 16. 16Dynamic Load Balancing1. Basic Definitions Load Calculations: sum of processes execution times allocated tothat processor. Maxspan : maximal finishing time of all processes.max span(T ) = max(Load ( pi ) )∀ 1 ≤ i ≤ Number of Processors Processor Utilization : Ratio of Load(Pi) to maxspan.
  17. 17. 17Dynamic Load Balancing2. Basic Assumptions Each processor can only execute one process at each moment. Tasks are non-preemptive. Tasks are totally independent i.e. there is no data transfer take placeamong tasks and there are no precedence relations. Heterogeneity of processors is defined by a multiplying factor x. If 1thprocessor’s speed is P1 then the ithprocessor’s speed can be calculatedasPi = (1+ (i-1)*x) p1
  18. 18. 18Dynamic Load Balancing3. Sliding Window Technique How many task should selected at a time from the pool of task, this isdecided by size of sliding window. Size is inputted by user. The number of task in a chromosome isequal to size of sliding window. Sliding window contains task ID .Example: Sliding window of size 101 2 3 4 5 6 7 8 9 10
  19. 19. 19Dynamic Load Balancing4. Scheduling Encoding (Chromosome) This is a 2D matrix of size[no. of processors x size of slidingwindow].Figure: Chromosome Representation5. Initialization Population of size POP_SIZE is initialized by randomly assigningtasks to processors.P1 P2 P33 5 04 7 18 9 26
  20. 20. 20Dynamic Load Balancing6. Fitness Function Fitness function attaches a value to each chromosome in thepopulation, which indicates the quality of the schedule.7. Roulette-wheel selection Roulette wheel selection is used which I have described in DAG-Scheduling Section.
  21. 21. 21Dynamic Load Balancing8. Cycle Crossover Single point crossover can’t be used in this GA as it may cause sometasks to be assigned more than once while some are not assigned. A new crossover operator is designed called cycle crossover. Here Iam showing you how does it works.A 8 6 4 10 9 7 1 5 3 2B 10 2 9 5 6 9 8 7 4 1A` 8 - - - - - - - - -B` 10 - - - - - - - - -A` 8 6 - 10 9 7 1 5 - 2B` 10 2 - 5 6 9 8 7 - 1A` 8 6 3 10 9 7 1 5 4 2B` 10 2 4 5 6 9 8 7 3 1
  22. 22. 22Dynamic Load Balancing9. Random Swap Mutation Random mutation technique is used to apply mutation on newlygenerated child. Two processor is selected randomly from the processor list. Makesure must be different. Then two random task selected from each processor and swapped.mutationP1 P2 P33 5 04 7 18 9 26P1 P2 P33 5 04 7 81 9 26
  23. 23. 23Dynamic Load Balancing10. Termination Condition The variable gen stores the count, how many generations the GAshould run. When the generation count crosses the gen ,the GA stop evaluating.11.Task allocation and updating the window When termination condition met, fittest chromosome is assigned tofinal schedule. Now window is filled up again by sliding along the subsequent taskswaiting in the task pool.
  24. 24. 24Dynamic Load Balancing12. Pseudo CodeBeginRepeatsave the tasks into sliding window;initialize P(k); {create an initial population of size POP_SIZE}evaluate P(k); {evaluates the fitness of all the chromosomes}RepeatFor i=1 to POPSIZE doSelect two chromosome as parent from population;Child 1, Child2 <= Crossover( parent1,parent2);Child 3 <= Mutation ( Child 1 );child4 <= Mutation (Child2)Add (new temp pop, Child 1, Child 2,Child3,Child4);End For;Make (new pop, new temp pop, old pop );Population = new population;While (not termination condition);Assign the Best chromosome in population to final schedule;While(Task pool has more tasks)End
  25. 25. 25Experimental results and Discussion1.Dynamic Load Balancing1. Test Parameters The measurement of performance of proposed algorithm was basedon two metrics: total completion time (Makespan) and averageprocessor utilization. The calculation of these metrics depends onthe following parameters: Defaultvalues• Population Size ( POP_SIZE ) 100• Sliding window size ( sizeSlidingWindow ) 10• No. of Generations ( gen ) 100• No. of Processors ( no_of_Proc ) 10
  26. 26. 26Experimental results and Discussion1.Dynamic Load Balancing2. Changing the population size The population sizes ranged from 20 to 200. It was observed that increasing in the population does not increasethe performance after certain limit. You after 120 the completiontime is approximately constant Increasing the population size had a positive effect on the processorutilization
  27. 27. 27Experimental results and Discussion1.Dynamic Load Balancing3. Changing the No. of Generation Cycles The number of generation cycles was changed from 1 to 500. As the no. of Generation cycle was increased, performance of theschedule also increased. The total completion time was significantlyreduced as the number of generations was increased from 1 to 50. Increasing the population size had a positive effect on the processorutilization
  28. 28. 28Experimental results and Discussion1.Dynamic Load Balancing4. Changing the No. Processors The no. of processors was changed from 2 to 20. As the no. of processors were increased for the same number oftasks, Completion time decreased because now the system has morenumber of processing elements. When the no. of processors was increased, avg. processor utilizationdecreased.
  29. 29. 29Experimental results and Discussion1.Dynamic Load Balancing5. Changing the No. Tasks The number of tasks was varied from 10 to 1000. As we increases the no. of tasks, the time taken to completion timealso increases. When no. of tasks is large, avg. utilization is more then 96%.
  30. 30. 30Experimental results and Discussion1.Dynamic Load Balancing6. Changing the Sliding Window The sliding window size was changed from 2 to 50 the effect on completion time and avg. Processors utilization isgiven below:
  31. 31. 31Experimental results and Discussion2.DAG-Scheduling1. Test Parameters The measurement of performance for DAG scheduling algorithmwas done by speedup . The speedup value for a given graph is computed by dividing thesequential execution by the parallel execution time. Speedup for the proposed DAG scheduling algorithm depends onthe following parameters.• No. of Generations
  32. 32. 32Experimental results and Discussion2.DAG-Scheduling2. Changing the no. of Generation cycles The no. of generations was varied from 1 to 1000. As the no. of Generation cycle was increased, performance of theschedule also increased. After 250 Generations, it is observed that running the GA does notseem to improve performance much.
  33. 33. 33Experimental results and Discussion2.DAG-Scheduling3. Changing the no. of Tasks The no. of tasks was varied from 10 to 60.
  34. 34. 34Conclusion The result generated by the proposed dynamic load-balancingmechanism using Genetic Algorithm was extremely good when thenumber of tasks is large. The avg. Processor Utilization by proposed algorithm was foundmore then 97-98%. The complete genetic algorithm for DAG scheduling wasimplemented and tested on the various input task graphs in aheterogeneous system. Proposed DAG- Scheduling algorithm gives best speedup when thegeneration cycle is more then 250.
  35. 35. 35References1) AlbertY.Zomaya, Senior Member, IEEE, Chris Ward, and Ben Macey, “Genetic Scheduling for Parallel Processor Systems: ComparativeStudies and Performance Issues” VOL.10, NO.8, AUGUST 19992) Andrew J. Page , Thomas M. Keane, Thomas J. Naughton, "Multi-heuristic dynamic task allocation using genetic algorithms in aheterogeneous distributed system" Journal of Parallel and Distributed Computing Volume 70, Issue 7, July 2010, Pages 758–766.3) Yuan, Yuan , Xue, Huifeng “Modified Genetic Algorithm for Task Scheduling in Multiprocessor Systems” Jisuanji Celiang yu Kongzhi/Computer Measurement & Control (China). Vol. 13, no. 5, pp. 488-490. May 20054) Y.K. Kwok and I. Ahmad, “Dynamic Critical-Path Scheduling: An Effective Technique for Allocating Task Graphs to Multiprocessors”,IEEE Trans. Parallel and Distributed Systems, Vol. 7, No. 5, pp. 506-521, May 1996.5) A.T. Haghighat, K. Faez, M. Dehghan, A. Mowlaei, & Y. Ghahremani, “GA-based heuristic algorithms for bandwidth- delay-constrainedleast-cost multicast routing”, International Journal of Computer Communications 27, 2004, 111–127.6) D.E. Goldberg, “Genetic Algorithms in Search, Optimization, and Machine Learning. Reading, Mass” Addison-Wesley, 1989.7) Albert Y. Zomaya, Senior Member, IEEE, and Yee-Hwei “Observations on using genetic algorithms for dynamic load-balancing ” IEEETransactions On Parallel And Distributed Systems, Vol. 12, No. 9, September 20018) H.C. Lin and C.S. Raghavendra, “A Dynamic Load-Balancing Policy with a Central Job Dispatcher (LBC)” IEEE Trans. Software Eng.,vol. 18, no. 2, pp. 148-158, Feb. 1992.9) M. Munetomo, Y. Takai, and Y. Sato, “A Genetic Approach to Dynamic Load-Balancing in a Distributed Computing System” Proc. FirstIntl Conf. Evolutionary Computation, IEEE World Congress Computational Intelligence, vol. 1, pp. 418-421, 1994.
  36. 36. 36Questions Thank you. Questions?

×