CN109726001A - A kind of genetic algorithm for heterogeneous system - Google Patents

A kind of genetic algorithm for heterogeneous system Download PDF

Info

Publication number
CN109726001A
CN109726001A CN201811647674.5A CN201811647674A CN109726001A CN 109726001 A CN109726001 A CN 109726001A CN 201811647674 A CN201811647674 A CN 201811647674A CN 109726001 A CN109726001 A CN 109726001A
Authority
CN
China
Prior art keywords
individual
population
task
new
random
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811647674.5A
Other languages
Chinese (zh)
Inventor
晏子含
邓泽喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN201811647674.5A priority Critical patent/CN109726001A/en
Publication of CN109726001A publication Critical patent/CN109726001A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of genetic algorithms for heterogeneous system, comprising the following steps: S1: initialization of population, generates a population, population include it is several each and every one, and the element of Mapping Part then passes through and selectes at random, and with the same memory of data;S2: evaluation individual calculates the execution time of each individual in population;S3: whether judge to execute time the smallest individual in population lower than the minimum acceptable execution time, such as meet, jumping out algorithm terminates;It is such as unsatisfactory for, skips to S4;S4: by 2- algorithm of tournament selection method, new population is formed, is defined as the first new population;S5: intersecting the individual in new population to generate genetic recombination, and intersecting breakpoint is random generation, needs to be modified offspring individual after the completion of intersecting, and meets and limits " with the same memory of data ";After S6:S5 intersects, mutation operation is carried out to each of population individual, change point is to generate at random, needs to be modified offspring individual immediately after the completion of variation, skips to S2.

Description

A kind of genetic algorithm for heterogeneous system
Technical field
The invention belongs to information system scheduling fields, more particularly, to a kind of genetic algorithm for heterogeneous system.
Background technique
In modern high performance computing system, heterogeneous system is a kind of very common system.For example, the Milky Way No. 2 and the Milky Way 3 It is all the multicomputer system of isomery.The application program executed on heterogeneous system in terms of execution time of processing scheme often There is certain time limit.Also, with the arrival of big data era, various countries are continuously increased the performance requirement of high-performance calculation, People need more to quickly finish task, therefore, propose that an execution time shorter scheme becomes on heterogeneous system One research hotspot, such research often have high commercial value and learning value.
On heterogeneous system, for identical task, the execution time on nonidentical processor is often different, for same One processor, accesses different memories and obtains the time consumed by data and also tend to difference, therefore, how by different tasks Be assigned on different processors, how to be assigned to different data on different memories, how to arrange task execution behavior/ Data access behavior executes sequence, so that total execution time most short central issue for just becoming research.Here, will The problem definition is task schedule and data assignment problem (heterogeneous data allocation on heterogeneous system and task scheduling(HDATS))。
In relevant research, for the task schedule and data distribution schemes optimization on heterogeneous system, so that always Execution time shortest problem be a NP-complete problem.So common scheme is to be opened up using first by task mostly It flutters figure and generates topological sequences, then carry out task schedule and data distribution with greedy algorithm, such algorithm is due to the calculation using greed Method thought, obtained scheme often apart from optimal solution farther out, dispatching effect is bad.
Summary of the invention
To solve existing technological deficiency, the invention discloses a kind of genetic algorithms for heterogeneous system.The present invention exists Task schedule and data on heterogeneous system are distributed above this problem, find a task schedule and data using genetic algorithm The scheme of distribution generates scheduling result more better than greedy algorithm so that the execution time of task is shorter.
In order to solve the above technical problems, technical scheme is as follows:
A kind of genetic algorithm for heterogeneous system, comprising the following steps:
S1: initialization of population generates a population, the population include it is several each and every one, and the member of Mapping Part It is plain then by selecting at random, and with the same memory of data, the same data are expressed as follows with memory:
For the Tn in Sequence Part, pass through Tn pairs in Pn and the Sequence Part of Mapping Part It answers;For the access memory operation of the topological diagram of the heterogeneous system in Sequence Part, pass through Mapping Part's The access internal memory operation of the topological diagram of the n memory and heterogeneous system in Sequence Part of the topological diagram of heterogeneous system is grasped It corresponds to;
S2: evaluation individual calculates the execution time of each individual in population;
S3: whether judge to execute time the smallest individual in population lower than the minimum acceptable execution time, such as meet, jump out Algorithm terminates;It is such as unsatisfactory for, skips to S4;
S4: by 2- algorithm of tournament selection method, new population is formed, is defined as the first new population;
S5: intersecting the individual in new population to generate genetic recombination, and intersecting breakpoint is random generation, intersects and completes After need to be modified offspring individual, meet " with the same memory of data " limit;
After S6:S5 intersects, mutation operation is carried out to each of population individual, change point is to generate at random, is being made a variation Cheng Houxu is modified offspring individual immediately, complies with and limits " with the same memory of data ", skips to S2.
In a preferred solution, the S2 includes the following contents:
S2.1: the content for enabling array LT is individual Sequence Part, i.e. LT is the execution sequence of task;
S2.2: RT content of defining arrays is the earliest ready moment of each processor of heterogeneous system, by its element whole It is initialized as the earliest ready moment that 0, RT [pj] is processor Pj;Array ST content is each task Starting Executing Time, ST [ti] is the Starting Executing Time of task Ti;Array FT content is each task execution end time, and FT [ti] is holding for task Ti The row end time;
S2.3: defining the execution used time that weight [ti] is task ti, and the weight [ti] is asked by following formula It takes:
Weight [ti]=Size [ti]/speedx
Wherein, the Size [ti] is task size, and the speedx is corresponding processor processing speed;
S2.4: defining the ready time that DAT [ti] is task, and value is before task ti is all on heterogeneous system topological diagram After FT maximum value;
S2.5: successively by the task that Ti value is in LT, ST [ti]=max { RT [pj], DAT are then executed respectively (ti) }, FT [ti]=ST [ti]+weight [ti], RT [pj]=three sentences of FT [ti], until ti takes all tasks of LT Until, the pj is the corresponding processor of ti;Wherein, max is maximizing function;
S.2.6: the maximum value of element in access group FT, this is the execution time of the required individual.
In a preferred solution, the S4 includes following below scheme:
S4.1: two individuals are randomly choosed from the population of S1;
S4.2: compare two selected in S4.1 the individual execution time;
S4.3: execution time shorter individual is picked out, the individual as the first new population;
S4.4: if the individual amount of the first new population is as original seed group, terminate to execute;Otherwise, S4.1 is returned.
In a preferred solution, the S5 includes following below scheme:
S5.1: to the in S4 first new population, it is updated to original seed group;
S5.2: two individuals are selected at random from original seed group;
S5.3: two individuals selected for S5.2 randomly choose a position as friendship in Mapping Part Sequence of two positions before crosspoint is exchanged, generates two new individuals by crunode;
S5.4: being modified the individual of filial generation, and the internal storage access for accessing same data operates, in Mapping The corresponding memory of Part need to be configured to same memory, meet and limit " with the same memory of data ";
S5.5: new population is added in new individual, is defined as the second new population;
S5.5: if the individual amount of the second new population is extended to as original seed group, terminate to execute, otherwise, return S5.2。
In a preferred solution, the S6 includes following below scheme:
S6.1: the population new to second obtained by S5, random selection account for the individual of the y of sum;The y is default Value;
S6.2: to the individual of S6.1, a position is randomly choosed in its Mapping Part as change point, by its value Random variation be and another values different before;
S6.3: being modified S6.2 individual, and the internal storage access for accessing same data operates, in Mapping The corresponding memory of Part need to be randomly provided into same memory;Execute S2.
In a preferred solution, the y is 0.06.
Compared with prior art, the beneficial effect of technical solution of the present invention is:
Task schedule of the present invention on heterogeneous system and data are distributed above this problem, find one using genetic algorithm The scheme of a task schedule and data distribution generates scheduling knot more better than greedy algorithm so that the execution time of task is shorter Fruit.
Detailed description of the invention
Fig. 1 is the flow chart of the present embodiment.
Specific embodiment
The attached figures are only used for illustrative purposes and cannot be understood as limitating the patent;
In order to better illustrate this embodiment, the certain components of attached drawing have omission, zoom in or out, and do not represent actual product Size;
To those skilled in the art, it is to be understood that certain known features and its explanation, which may be omitted, in attached drawing 's.
The following further describes the technical solution of the present invention with reference to the accompanying drawings and examples.
As shown in Figure 1, a kind of genetic algorithm for heterogeneous system, comprising the following steps:
S1: initialization of population generates a population, the population include it is several each and every one, and the member of Mapping Part It is plain then by selecting at random, and with the same memory of data, the same data are expressed as follows with memory:
For the Tn in Sequence Part, pass through Tn pairs in Pn and the Sequence Part of Mapping Part It answers;For the access memory operation of the topological diagram of the heterogeneous system in Sequence Part, pass through Mapping Part's The access internal memory operation of the topological diagram of the n memory and heterogeneous system in Sequence Part of the topological diagram of heterogeneous system is grasped It corresponds to;
S2: evaluation individual calculates the execution time of each individual in population;
S2.1: the content for enabling array LT is individual Sequence Part, i.e. LT is the execution sequence of task;
S2.2: RT content of defining arrays is the earliest ready moment of each processor of heterogeneous system, by its element whole It is initialized as the earliest ready moment that 0, RT [pj] is processor Pj;Array ST content is each task Starting Executing Time, ST [ti] is the Starting Executing Time of task Ti;Array FT content is each task execution end time, and FT [ti] is holding for task Ti The row end time;
S2.3: defining the execution used time that weight [ti] is task ti, and the weight [ti] is asked by following formula It takes:
Weight [ti]=Size [ti]/speedx
Wherein, the Size [ti] is task size, and the speedx is corresponding processor processing speed;
S2.4: defining the ready time that DAT [ti] is task, and value is before task ti is all on heterogeneous system topological diagram After FT maximum value;
S2.5: successively by the task that Ti value is in LT, ST [ti]=max { RT [pj], DAT are then executed respectively (ti) }, FT [ti]=ST [ti]+weight [ti], RT [pj]=three sentences of FT [ti], until ti takes all tasks of LT Until, the pj is the corresponding processor of ti;Wherein, max is maximizing function;
S.2.6: the maximum value of element in access group FT, this is the execution time of the required individual;
S3: whether judge to execute time the smallest individual in population lower than the minimum acceptable execution time, such as meet, jump out Algorithm terminates;It is such as unsatisfactory for, skips to S4;
S4: by 2- algorithm of tournament selection method, new population is formed, is defined as the first new population;
S4.1: two individuals are randomly choosed from the population of S1;
S4.2: compare two selected in S4.1 the individual execution time;
S4.3: execution time shorter individual is picked out, the individual as the first new population;
S4.4: if the individual amount of the first new population is as original seed group, terminate to execute;Otherwise, S4.1 is returned;
S5: intersecting the individual in new population to generate genetic recombination, and intersecting breakpoint is random generation, intersects and completes After need to be modified offspring individual, meet " with the same memory of data " limit;
S5.1: to the in S4 first new population, it is updated to original seed group;
S5.2: two individuals are selected at random from original seed group;
S5.3: two individuals selected for S5.2 randomly choose a position as friendship in Mapping Part Sequence of two positions before crosspoint is exchanged, generates two new individuals by crunode;
S5.4: being modified the individual of filial generation, and the internal storage access for accessing same data operates, in Mapping The corresponding memory of Part need to be configured to same memory, meet and limit " with the same memory of data ";
S5.5: new population is added in new individual, is defined as the second new population;
S5.5: if the individual amount of the second new population is extended to as original seed group, terminate to execute, otherwise, return S5.2;
After S6:S5 intersects, mutation operation is carried out to each of population individual, change point is to generate at random, is being made a variation Cheng Houxu is modified offspring individual immediately, complies with and limits " with the same memory of data ", skips to S2;
S6.1: the population new to second obtained by S5, random selection account for the individual of the y of sum;The y is default Value;
S6.2: to the individual of S6.1, a position is randomly choosed in its Mapping Part as change point, by its value Random variation be and another values different before;
S6.3: being modified S6.2 individual, and the internal storage access for accessing same data operates, in Mapping The corresponding memory of Part need to be randomly provided into same memory;Execute S2.
The terms describing the positional relationship in the drawings are only for illustration, should not be understood as the limitation to this patent;It is aobvious So, the above embodiment of the present invention be only to clearly illustrate example of the present invention, and not be to reality of the invention Apply the restriction of mode.For those of ordinary skill in the art, it can also make on the basis of the above description other Various forms of variations or variation.There is no necessity and possibility to exhaust all the enbodiments.It is all in spirit of the invention With any modifications, equivalent replacements, and improvements made within principle etc., the protection scope of the claims in the present invention should be included in Within.

Claims (6)

1. a kind of genetic algorithm for heterogeneous system, which comprises the following steps:
S1: initialization of population generates a population, the population include it is several each and every one, and the element of Mapping Part is then By selecting at random, and with the same memory of data, the same data are expressed as follows with memory:
It is corresponding by the Tn in Pn and the Sequence Part of Mapping Part for the Tn in Sequence Part;It is right The access memory operation of the topological diagram of heterogeneous system in Sequence Part, passes through the isomery of Mapping Part The access memory operation pair of the topological diagram of the n memory and heterogeneous system in Sequence Part of the topological diagram of system It answers;
S2: evaluation individual calculates the execution time of each individual in population;
S3: whether judge to execute time the smallest individual in population lower than the minimum acceptable execution time, such as meet, jump out algorithm Terminate;It is such as unsatisfactory for, skips to S4;
S4: by 2- algorithm of tournament selection method, new population is formed, is defined as the first new population;
S5: intersecting the individual in new population to generate genetic recombination, and intersecting breakpoint is random generation, needs after the completion of intersecting Offspring individual is modified, meets and is limited " with the same memory of data ";
After S6:S5 intersects, mutation operation is carried out to each of population individual, change point is to generate at random, after the completion of variation Offspring individual need to be modified immediately, comply with and limited " with the same memory of data ", skip to S2.
2. genetic algorithm according to claim 1, which is characterized in that the S2 includes the following contents:
S2.1: the content for enabling array LT is individual Sequence Part, i.e. LT is the execution sequence of task;
S2.2: RT content of defining arrays is the earliest ready moment of each processor of heterogeneous system, its element is all initial Turn to the earliest ready moment that 0, RT [pj] is processor Pj;Array ST content is each task Starting Executing Time, and ST [ti] is The Starting Executing Time of task Ti;Array FT content is each task execution end time, and FT [ti] is that the execution of task Ti terminates Time;
S2.3: defining the execution used time that weight [ti] is task ti, and the weight [ti] is sought by following formula:
Weight [ti]=Size [ti]/speedx
Wherein, the Size [ti] is task size, and the speedx is corresponding processor processing speed;
S2.4: define DAT [ti] be task ready time, value be task ti on heterogeneous system topological diagram it is all before after The maximum value of FT;
S2.5: successively by the task that Ti value is in LT, ST [ti]=max { RT [pj], DAT (ti) } then is executed respectively, FT [ti]=ST [ti]+weight [ti], RT [pj]=three sentences of FT [ti], until ti takes all tasks of LT, institute The pj stated is the corresponding processor of ti;Wherein, max is maximizing function;
S.2.6: the maximum value of element in access group FT, this is the execution time of the required individual.
3. genetic algorithm according to claim 1 or 2, which is characterized in that the S4 includes following below scheme:
S4.1: two individuals are randomly choosed from the population of S1;
S4.2: compare two selected in S4.1 the individual execution time;
S4.3: execution time shorter individual is picked out, the individual as the first new population;
S4.4: if the individual amount of the first new population is as original seed group, terminate to execute;Otherwise, S4.1 is returned.
4. genetic algorithm according to claim 3, which is characterized in that the S5 includes following below scheme:
S5.1: to the in S4 first new population, it is updated to original seed group;
S5.2: two individuals are selected at random from original seed group;
S5.3: two individuals selected for S5.2 randomly choose a position as crosspoint in Mapping Part, Sequence of two positions before crosspoint is exchanged, two new individuals are generated;
S5.4: being modified the individual of filial generation, and the internal storage access for accessing same data operates, in Mapping Part Corresponding memory need to be configured to same memory, meet and limit " with the same memory of data ";
S5.5: new population is added in new individual, is defined as the second new population;
S5.5: if the individual amount of the second new population is extended to as original seed group, terminate to execute, otherwise, return to S5.2.
5. genetic algorithm according to claim 1,2 or 4, which is characterized in that the S6 includes following below scheme:
S6.1: the population new to second obtained by S5, random selection account for the individual of the y of sum;The y is preset value;
S6.2: to the individual of S6.1, one position of random selection is random by its value as change point in its Mapping Part Variation be and another values different before;
S6.3: being modified S6.2 individual, and the internal storage access for accessing same data operates, in Mapping Part couple The memory answered need to be randomly provided into same memory;Execute S2.
6. genetic algorithm according to claim 5, which is characterized in that the y is 0.06.
CN201811647674.5A 2018-12-29 2018-12-29 A kind of genetic algorithm for heterogeneous system Pending CN109726001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811647674.5A CN109726001A (en) 2018-12-29 2018-12-29 A kind of genetic algorithm for heterogeneous system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811647674.5A CN109726001A (en) 2018-12-29 2018-12-29 A kind of genetic algorithm for heterogeneous system

Publications (1)

Publication Number Publication Date
CN109726001A true CN109726001A (en) 2019-05-07

Family

ID=66299571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811647674.5A Pending CN109726001A (en) 2018-12-29 2018-12-29 A kind of genetic algorithm for heterogeneous system

Country Status (1)

Country Link
CN (1) CN109726001A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220780A (en) * 2017-06-16 2017-09-29 佛山科学技术学院 Heterogeneous task Perform sequence optimization method in mass-rent system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424959B1 (en) * 1999-06-17 2002-07-23 John R. Koza Method and apparatus for automatic synthesis, placement and routing of complex structures
US20080222061A1 (en) * 2007-03-10 2008-09-11 Hendra Soetjahja Adaptive Multivariate Model Construction
CN103605793A (en) * 2013-12-04 2014-02-26 西安电子科技大学 Heterogeneous social network community detection method based on genetic algorithm
CN104751388A (en) * 2015-03-01 2015-07-01 江西科技学院 Genetic algorithm based college course arranging method
CN108881432A (en) * 2018-06-15 2018-11-23 广东省城乡规划设计研究院 Cloud computing cluster load dispatching method based on GA algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424959B1 (en) * 1999-06-17 2002-07-23 John R. Koza Method and apparatus for automatic synthesis, placement and routing of complex structures
US20080222061A1 (en) * 2007-03-10 2008-09-11 Hendra Soetjahja Adaptive Multivariate Model Construction
CN103605793A (en) * 2013-12-04 2014-02-26 西安电子科技大学 Heterogeneous social network community detection method based on genetic algorithm
CN104751388A (en) * 2015-03-01 2015-07-01 江西科技学院 Genetic algorithm based college course arranging method
CN108881432A (en) * 2018-06-15 2018-11-23 广东省城乡规划设计研究院 Cloud computing cluster load dispatching method based on GA algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐雨明 等: "异构***中DAG任务调度的双螺旋结构遗传算法", 《计算机研究与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220780A (en) * 2017-06-16 2017-09-29 佛山科学技术学院 Heterogeneous task Perform sequence optimization method in mass-rent system
CN107220780B (en) * 2017-06-16 2020-07-28 佛山科学技术学院 Heterogeneous task execution sequence optimization method in crowdsourcing system

Similar Documents

Publication Publication Date Title
CN110837410B (en) Task scheduling method and device, electronic equipment and computer readable storage medium
Bao et al. Online job scheduling in distributed machine learning clusters
Dai et al. Multi-robot dynamic task allocation for exploration and destruction
Pickardt et al. Generating dispatching rules for semiconductor manufacturing to minimize weighted tardiness
Zheng et al. A critical chains based distributed multi-project scheduling approach
Bhatele et al. Identifying the culprits behind network congestion
CN108984301A (en) Self-adaptive cloud resource allocation method and device
Yao et al. New scheduling algorithms for improving performance and resource utilization in hadoop YARN clusters
Zhang et al. A multi-agent learning approach to online distributed resource allocation
CN109005130A (en) network resource allocation scheduling method and device
CN109976901A (en) A kind of resource regulating method, device, server and readable storage medium storing program for executing
CN108717460A (en) A kind of method and device reached common understanding in block chain
Abdullah et al. Integrated MOPSO algorithms for task scheduling in cloud computing
CN115689069B (en) Power grid dispatching control method and system based on artificial intelligence
CN111143036A (en) Virtual machine resource scheduling method based on reinforcement learning
Zimmer et al. A multi-faceted approach to job placement for improved performance on extreme-scale systems
CN109726001A (en) A kind of genetic algorithm for heterogeneous system
Ren et al. Cielo: An evolutionary game theoretic framework for virtual machine placement in clouds
Iverson et al. Hierarchical, competitive scheduling of multiple dags in a dynamic heterogeneous environment
Montes de Oca et al. Towards incremental social learning in optimization and multiagent systems
Tomaszek et al. On performance improvement of the soma swarm based algorithm and its complex network duality
CN116880968A (en) Job scheduling method and scheduling system
Germs et al. Admission policies for the customized stochastic lot scheduling problem with strict due-dates
CN114816755A (en) Scheduling method, scheduling device, processing core, electronic device and readable medium
CN113641471A (en) Soft load scheduling method, device, equipment and medium based on genetic algorithm model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20230929