The invention relates to a grid
resource allocation method based on a
parallel genetic algorithm. The method comprises the following steps: firstly, the information is initialized in a main thread, such as task collection,
machine collection, an
execution time matrix E of the task, and mapping of a sub-task to the
machine, etc.; then a plurality of sub threads are generated and mapped to different processors, an initializing sub-
population is independently generated by each sub thread,
evolutionary computation is performed in parallel, the optimum individual of each generation is transferred to the main thread, the main thread performs comparison, and the optimum individual is retained; when the predetermined generation arrives, the
transfer operation between the sub-groups is performed; and the operation of the main thread and all the sub-groups cannot be finished until the termination conditions are met. The
genetic algorithm is taken as the most effective
heuristic global stochastic searching method, and the solution of the NP problem can be performed. The quality and the speed for the
algorithm for solving are improved by the
parallel genetic algorithm proposed according to the natural parallelism of the
genetic algorithm, and the method is an effective grid energy resource optimization method and favorable for improving the
service quality of the grid.