CN112346828A - Task configuration method and device based on distributed heterogeneous system and storage medium - Google Patents

Task configuration method and device based on distributed heterogeneous system and storage medium Download PDF

Info

Publication number
CN112346828A
CN112346828A CN201910720430.3A CN201910720430A CN112346828A CN 112346828 A CN112346828 A CN 112346828A CN 201910720430 A CN201910720430 A CN 201910720430A CN 112346828 A CN112346828 A CN 112346828A
Authority
CN
China
Prior art keywords
task
energy
tasks
processor
executed
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.)
Granted
Application number
CN201910720430.3A
Other languages
Chinese (zh)
Other versions
CN112346828B (en
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.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information Technology Co Ltd
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 Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201910720430.3A priority Critical patent/CN112346828B/en
Publication of CN112346828A publication Critical patent/CN112346828A/en
Application granted granted Critical
Publication of CN112346828B publication Critical patent/CN112346828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a task configuration method, a device and a storage medium based on a distributed heterogeneous system, wherein the method comprises the following steps: determining a priority order of a plurality of tasks applied to a directed acyclic graph DAG; according to the sequence of the priority from high to low, corresponding energy constraints are allocated to each task in sequence; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with the priority lower than that of the task, and the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors; further, for each task, a target processor with the earliest execution end time and a corresponding target frequency are determined from a plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task, so that the execution time of each task is saved, and the DAG application has a shorter scheduling length.

Description

Task configuration method and device based on distributed heterogeneous system and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a task configuration method and apparatus based on a distributed heterogeneous system, and a storage medium.
Background
With the increasing expansion of computer application range, Distributed Heterogeneous Systems (DHS) is becoming an effective tool for solving complex application problems. Applications in DHS may be referred to as Directed Acyclic Graph (DAG) applications. How to reduce the scheduling length of the DAG application as much as possible under the condition of limited system energy is an urgent problem to be solved.
In the prior art, a plurality of tasks are prioritized; then, energy is distributed to each task in sequence, wherein when energy is distributed to any task, the minimum energy value is pre-distributed to other tasks with the priority lower than that of the task; and then selects the appropriate processor according to the earliest execution end time of each task on the processors.
However, in the prior art, by pre-allocating the minimum energy value to the task with the lower priority, the task with the higher priority obtains too much energy, and the task with the lower priority obtains too little energy, so that the execution time of the task with the lower priority is longer, and the scheduling length of the DAG application is increased.
Disclosure of Invention
The embodiment of the application provides a task configuration method and device based on a distributed heterogeneous system and a storage medium, and solves the technical problem that the scheduling length of DAG application in the related technology is long.
In a first aspect, an embodiment of the present application provides a task configuration method based on a distributed heterogeneous system, including:
determining a priority order of a plurality of tasks applied to a directed acyclic graph DAG;
according to the sequence of the priority from high to low, corresponding energy constraints are distributed to each task in sequence; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with lower priority than the task; the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors;
for each task, determining a target processor and a corresponding target frequency from a plurality of processors of the distributed heterogeneous system according to an energy constraint corresponding to the task; wherein an execution end time of the task when executed on the target processor at the target frequency is earliest.
In one possible implementation manner, the weighted average energy corresponding to each of the other tasks is obtained according to the following steps:
determining a weighted average distribution energy of available energy according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when the other tasks are executed on all the processors, and a scheduling length ratio of the other tasks; wherein the scheduling length ratio of the other tasks is the ratio of the execution time length of the other tasks when the energy constraint value is not defined to the total execution time length of all tasks in the DAG application when the energy constraint value is not defined;
and determining the minimum value of the weighted average distribution energy of the available energy and the maximum energy value consumed by the other tasks when the other tasks are executed on all the processors as the weighted average energy corresponding to the other tasks.
In one possible implementation, the determining a weighted average allocated energy of available energy according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduling length ratio of the other tasks includes:
determining the available energy according to a difference value between a preset energy constraint value of the DAG application and a minimum energy value consumed by the DAG application;
determining a weighted average allocated energy of the available energy based on the available energy, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduled length ratio of the other tasks.
In one possible implementation, the determining a target processor and a corresponding target frequency from among the plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task includes:
respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and determining the processor with the earliest execution end time and the corresponding frequency as the target processor and the target frequency respectively.
In a possible implementation manner, the determining, according to energy constraints corresponding to the tasks, execution end times of the tasks executed at different frequencies on each processor respectively includes:
respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the execution starting time and the corresponding execution duration when the task is executed on each processor at different frequencies.
In a possible implementation manner, the determining, according to energy constraints corresponding to the tasks, execution start times of the tasks executed at different frequencies on each processor respectively includes:
and respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task, the earliest available time of the task executable on each processor and the execution ending time of each precursor task of the task.
In one possible implementation, the determining a priority order of the plurality of tasks of the DAG application includes:
and determining the priority order of the tasks according to the order of the upward ordering values of the tasks applied to the DAG.
In a second aspect, an embodiment of the present application provides a task configuration device based on a distributed heterogeneous system, including:
a first determining module to determine a priority order of a plurality of tasks of a directed acyclic graph DAG application;
the distribution module is used for sequentially distributing corresponding energy constraints to each task according to the sequence of the priority from high to low; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with lower priority than the task; the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors;
a second determining module, configured to determine, for each task, a target processor and a corresponding target frequency from multiple processors of the distributed heterogeneous system according to an energy constraint corresponding to the task; wherein an execution end time of the task when executed on the target processor at the target frequency is earliest.
In a possible implementation manner, the task configuration apparatus based on the distributed heterogeneous system further includes: a third determining module for determining a weighted average energy corresponding to each of the other tasks;
the third determining module is specifically configured to:
determining a weighted average distribution energy of available energy according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when the other tasks are executed on all the processors, and a scheduling length ratio of the other tasks; wherein the scheduling length ratio of the other tasks is the ratio of the execution time length of the other tasks when the energy constraint value is not defined to the total execution time length of all tasks in the DAG application when the energy constraint value is not defined;
and determining the minimum value of the weighted average distribution energy of the available energy and the maximum energy value consumed by the other tasks when the other tasks are executed on all the processors as the weighted average energy corresponding to the other tasks.
In a possible implementation manner, the third determining module is specifically configured to:
determining the available energy according to a difference value between a preset energy constraint value of the DAG application and a minimum energy value consumed by the DAG application;
determining a weighted average allocated energy of the available energy based on the available energy, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduled length ratio of the other tasks.
In one possible implementation manner, the second determining module includes:
the first determining unit is used for respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and the second determining unit is used for determining that the processor with the earliest execution ending time and the corresponding frequency are the target processor and the target frequency respectively.
In a possible implementation manner, the first determining unit is specifically configured to:
respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the execution starting time and the corresponding execution duration when the task is executed on each processor at different frequencies.
In a possible implementation manner, the first determining unit is specifically configured to:
and respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task, the earliest available time of the task executable on each processor and the execution ending time of each precursor task of the task.
In a possible implementation manner, the first determining module is specifically configured to:
and determining the priority order of the tasks according to the order of the upward ordering values of the tasks applied to the DAG.
In a third aspect, an embodiment of the present application provides a control apparatus, including: a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the control device is configured to implement the method according to any implementation manner of the first aspect when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a computer program or instructions are stored, wherein when the computer program or instructions are run on a computer, the method according to any implementation manner of the first aspect is executed.
According to the task configuration method, the task configuration device and the storage medium based on the distributed heterogeneous system, after the priority order of a plurality of tasks applied to the directed acyclic graph DAG is determined, corresponding energy constraints are sequentially distributed to each task according to the order of the priorities from high to low; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with the priority lower than that of the task, and the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors; further, for each task, a target processor and a corresponding target frequency are determined from the plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task, wherein the execution end time of the task when executed on the target processor at the target frequency is earliest. Therefore, in the embodiment of the application, when the energy constraint corresponding to any task is determined, the corresponding weighted average energy is pre-allocated to other tasks with the priority lower than that of the task, so that each task in the DAG application can be ensured to obtain appropriate energy, a target processor corresponding to each task and a corresponding target frequency can be respectively determined from a plurality of processors of a distributed heterogeneous system on the premise that the energy constraint corresponding to each task is met, the execution time of each task is saved, and the DAG application has a shorter scheduling length.
Drawings
FIG. 1 is a schematic diagram of a DAG application provided by an embodiment of the present application;
FIG. 2 is a scheduling diagram illustrating scheduling DAG applications using a HEFT algorithm without considering energy constraints according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a task configuration method based on a distributed heterogeneous system according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a task configuration method based on a distributed heterogeneous system according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a task configuration method based on a distributed heterogeneous system according to another embodiment of the present application;
fig. 6 is a schematic scheduling diagram of a WATP method according to an embodiment of the present application;
fig. 7 is a schematic diagram of FFT application when ρ ═ 4;
fig. 8 is a schematic diagram of GE application when ρ ═ 5;
fig. 9 is a schematic structural diagram of a task configuration device based on a distributed heterogeneous system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a control device according to an embodiment of the present application.
Detailed Description
First, an application scenario and a part of vocabulary related to the embodiments of the present application will be described.
The task configuration method, the task configuration device and the storage medium based on the distributed heterogeneous system can be applied to an application scene for distributing energy to a plurality of tasks, so that each task can obtain proper energy, and the problem that in the related art, because the energy obtained by the task with the lower priority is too little, the execution time of the task with the lower priority is longer, and the scheduling length of DAG application is longer is solved.
Of course, the task configuration method, the task configuration device and the storage medium based on the distributed heterogeneous system provided in the embodiment of the present application may also be applied to other application scenarios, and the embodiment of the present application does not limit this.
The distributed heterogeneous system according to the embodiment of the present application may include U (where U is an integer greater than 1) heterogeneous processors, which are configured to perform multiple tasks in the DAG application according to the embodiment of the present application. It should be noted that, due to the heterogeneous nature of processors, the time required for the same task to execute on different processors may be different.
In this embodiment of the present application, an execution main body for executing the task configuration method based on the distributed heterogeneous system may be a control device in the distributed heterogeneous system, or may also be a task configuration apparatus based on the distributed heterogeneous system, which is arranged in the control device (it should be noted that, in the following embodiments of the present application, the task configuration method based on the distributed heterogeneous system provided in this embodiment of the present application is described by taking the execution main body as the control device as an example). For example, the control device or the task configuration apparatus based on the distributed heterogeneous system provided by the embodiment of the present application may be implemented by software and/or hardware.
Fig. 1 is a schematic diagram of a DAG application provided in an embodiment of the present application. As shown in fig. 1, each node represents a task of DAG application, an edge between two nodes represents communication overhead between two corresponding tasks, a task corresponding to a next node of any node is a successor of the task corresponding to the any node, and a task corresponding to a previous node of the any node is a predecessor of the task corresponding to the any node. For example, task n2、n3、n4、n5、n6Is task n1Task n, task n1Is task n2、n3、n4、n5、n6The predecessor task of (1).
The scheduling length of the DAG application involved in the embodiments of the present application represents the time overhead used by the DAG application to start executing the first task to finish executing the last task.
From large distributed heterogeneous systems to small distributed heterogeneous systems, energy consumption has been one of the key factors that the systems need to consider. Under the condition of limited system energy, the scheduling length of the distributed application is reduced as much as possible to achieve the maximum performance, so that the energy is reasonably utilized. A Dynamic Voltage and Frequency Scaling (DVFS) is an energy consumption optimization technique, which minimizes the scheduling length of distributed applications by changing the Voltage and Frequency of a processor on the premise of satisfying energy consumption constraints.
For a distributed heterogeneous system (hereinafter referred to as "system") supporting DVFS, the power and frequency of the system have the following relationships:
P(f)=Ps+h(Pind+Pd)=Ps+h(Pind+Ceffm) (1)
wherein p (f) represents the system power; psRepresents the quiescent power (P when the entire system is offsEqual to 0); pindRepresenting a first dynamic power, PindIs a frequency independent power (P when the system switches to sleep modeindEqual to 0); pdRepresenting the second dynamic power, PdA frequency dependent variation; h represents whether the system is in an active state or not (h is 1 to indicate that the system is in an active state, and h is 0 to indicate that the system is in a sleep mode); cefRepresents the effective capacitance; m represents a dynamic power exponent, m being an exponent of 2 or more; wherein, CefAnd m are constants associated with the processor of the system.
Since static power is only relevant to computer hardware, static power is not considered as a major factor in this application, and dynamic power is of major concern. From the above equation (1), the second dynamic power P related to the frequency is obtained only by lowering the frequencydIt will be reduced and the system power can be reduced. However, the reduction of the frequency causes the execution time of the task to become longer, which consumes more static power consumption and dynamic power consumption independent of the frequency. Thus, the lowest effective frequency f of the processor may be determined according to the following equation (2)ee
Figure BDA0002156981710000071
Assuming that the operating frequency of the current processor is from the minimum available frequency fminTo the maximum usable frequency fmaxThen the lowest frequency f at which the processor runs tasks can be determined according to equation (3) belowlow
flow=max(fmin,fee) (3)
Thus, any practical effective frequency fhThe following inequalities must be satisfied: f. oflow≤fh≤fmax
Since processors are heterogeneous, different processors may have different power parameters, and thus, the first dynamic power vector independent of frequency may be expressed as the following equation (4), the second dynamic power vector dependent on frequency may be expressed as the following equation (5), the effective capacitance vector may be expressed as the following equation (6), the dynamic power exponent vector may be expressed as the following equation (7), and the actual effective frequency matrix may be expressed as the following equation (8):
{P1,ind,P2,ind,...,P|U|,ind} (4)
{P1,d,P2,d,...,P|U|,d} (5)
{C1,ef,C2,ef,...,C|U|,ef} (6)
{m1,m2,...,m|U|} (7)
Figure BDA0002156981710000072
where | U | represents the total number of processors in the distributed heterogeneous for executing the DAG application.
Task n in the DAG application can be determined according to the following formula (9)iAt a frequency fk,hIn processor ukEnergy consumption E (n) during run-upi,uk,fk,h):
Figure BDA0002156981710000081
Wherein i is more than or equal to 1 and less than or equal to | N |, and | N | represents the total number of tasks in DAG application; f. ofk,low≤fk,h≤fk,max;wi,kIs shown in processor ukAt the maximum frequency fk,maxPerforming task niThe time required.
Tasks in the DAG application related in the embodiment of the application can run in parallel in a series of heterogeneous processor sets U supporting the DVFS technology, and the application solves the problem that when the preset energy constraint value of the DAG application is assumed to be Egiven(G) How to do the energy of the task and the processor allocation to get the minimum schedule length. Wherein, the scheduling length of the DAG application can be expressed as:
SL(G)=AFT(nexit) (10)
AFT(nexit) Representing an egress task nexitActual Finish Time (AFT), egress task nexitRefers to the last executed task in the DAG application. Assuming that the communication energy consumption between tasks is neglected and only the energy consumption of the processor during the task execution is considered, the energy consumption of the DAG application can be expressed as the following formula (11):
Figure BDA0002156981710000082
in summary, assume that the preset energy constraint value of DAG application is Egiven(G) The problem of how to perform the energy of the task and the processor allocation to obtain the minimum scheduling length can be expressed as:
and (3) minimizing: sl (g) ═ AFT (n)exit),
Satisfies the following conditions:
Figure BDA0002156981710000083
in the case of processor parameter determination, task n may be determined according to the following equation (13)iMinimum energy value E consumed when executing on all processorsmin(ni) And task n can be determined according to the following equation (14)iMaximum amount of energy E consumed when executing on all processorsmax(ni):
Figure BDA0002156981710000084
Figure BDA0002156981710000085
Further, the minimum energy value E consumed by the DAG application can also be determined according to the following formula (15)min(G) And the maximum energy value E consumed by the DAG application can be determined according to the following equation (16)max(G):
Figure BDA0002156981710000091
Figure BDA0002156981710000092
In addition, E isgiven(G) Should satisfy Egiven(G)∈[Emin(G),Emax(G)](ii) a If E isgiven(G) Less than Emin(G) If so, the energy cannot meet the requirement of DAG application scheduling; if E isgiven(G) Greater than Emax(G) Then the energy can always meet the maximum requirements for DAG application scheduling, in other words, there is no so-called energy constraint problem.
Available energy Δ E referred to in the embodiments of the present applicationae(G) Refers to a preset energy constraint value E for DAG applicationsgiven(G) Minimum energy value E consumed by DAG applicationmin(G) The difference between them.
The scheduling length ratio of any task referred to in the embodiment of the present application refers to a ratio of an execution time length of the task when the energy constraint value is not defined when the DAG application is scheduled by using the HEFT algorithm to a total execution time length of all tasks in the DAG application when the energy constraint value is not defined. Exemplarily, task niSchedule length ratio of (MSR) (n)i) Can be determined according to the following equation (17):
Figure BDA0002156981710000093
wherein, AFT (n)i) Representing a task niActual execution end time; AST (n)i) Representing a task niThe actual execution start time.
Of course, task niSchedule length ratio of (MSR) (n)i) Other variations of the above equation (17) or equivalent equations may also be used.
Fig. 2 is a scheduling diagram illustrating that a HEFT algorithm is used to schedule DAG applications when energy constraints are not considered in the embodiment of the present application. As shown in fig. 2, the lines between tasks represent communication overhead; the starting point of each task along the time axis being the execution start time and the ending point of each task along the time axis being the execution end time, e.g. task n1The execution start time of (2) is 0 and the execution end time is 9. It should be noted that there is no communication overhead between two tasks located on the same processor.
With reference to fig. 2, the execution duration of each task without the energy constraint value is calculated, and the scheduling length ratio of each task is obtained according to the above equation (17).
According to the task configuration method, device and storage medium based on the distributed heterogeneous system, when the energy constraint corresponding to any task is determined, the weighted average energy corresponding to other tasks with the priority lower than that of the task is pre-distributed, so that each task in the DAG application can be guaranteed to obtain proper energy, the target processor with the earliest execution ending time of each task and the corresponding target frequency can be respectively determined from the multiple processors of the distributed heterogeneous system on the premise that the energy constraint corresponding to each task is met, the execution time of each task is saved, and the problem that the execution time of the tasks with the lower priorities is longer due to the fact that the energy obtained by the tasks with the lower priorities in the related art is too little, and the scheduling length of the DAG application is longer is solved.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a schematic flowchart of a task configuration method based on a distributed heterogeneous system according to an embodiment of the present application. As shown in fig. 3, the method of the embodiment of the present application may include:
step S301, determining the priority order of a plurality of tasks applied to the directed acyclic graph DAG.
In this step, the control device may determine the priority order of the plurality of tasks applied to the DAG according to a task priority ordering method in the HEFT algorithm, so that each task applied to the DAG may be sequentially assigned with a corresponding energy constraint in the following order from high to low in priority.
Alternatively, the control device may determine the priority order of the plurality of tasks according to an order of the ascending ordering values of the plurality of tasks of the DAG application. For example, table 1 is an illustration table of the ascending order values of a plurality of tasks in the DAG application provided in this embodiment, and as shown in table 1, the control device may order { n } the ascending order values of the plurality of tasks in the DAG application from large to small1,n3,n4,n2,n5,n6,n9,n7,n8,n10Determining a priority order n of the plurality of tasks from high to low1,n3,n4,n2,n5,n6,n9,n7,n8,n10}。
Table 1 a schematic table of an upward ordering value of a plurality of tasks in a DAG application provided in an embodiment of the present application
Figure BDA0002156981710000101
Alternatively, the sort-up value for each task may be based on an average execution duration of the task across all processors, the sort-up value for each successor to the task, and so onAnd the communication overhead between each subsequent task and the task. Note that the last successor task in the DAG application (e.g., task n in FIG. 1)10) The upward ranking value of (a) may be a preset ranking value (e.g., 0 or other preset ranking value).
Exemplarily, task niRank ofu(ni) Can be determined according to the following equation (18):
Figure BDA0002156981710000102
wherein the content of the first and second substances,
Figure BDA0002156981710000103
representing a task niAverage execution time duration across all processors; succ (n)i) Representing a task niThe successor task set of (2); n islRepresenting a task niThe subsequent task of (2); c. Ci,lRepresenting a task niAnd task nlThe overhead of communication between; ranku(nl) Representing a task nlThe upper rank value of (1).
In an exemplary manner, the first and second electrodes are,
Figure BDA0002156981710000104
can be determined according to the following equation (19):
Figure BDA0002156981710000105
of course,
Figure BDA0002156981710000111
it may also be determined according to other variations of the above equation (19) or an equivalent equation.
Of course, ranku(ni) But may be determined according to other variations of the above equation (18) or equivalent equations.
Step S302, according to the sequence of the priority from high to low, corresponding energy constraints are sequentially distributed for each task; wherein the energy constraint corresponding to each task is obtained by pre-allocating corresponding weighted average energy according to other tasks with lower priority than the task.
Available energy Δ E referred to in the embodiments of the present applicationae(G) Refers to a preset energy constraint value E for DAG applicationsgiven(G) Minimum energy value E consumed by DAG applicationmin(G) The difference between them.
The scheduling length ratio of any task referred to in the embodiments of the present application refers to a ratio of an execution duration of the task when the energy constraint value is not defined when the DAG application is scheduled by using the HEFT algorithm to a total execution duration of all tasks in the DAG application when the energy constraint value is not defined, for example, refer to the above equation (17).
In the embodiment of the present application, the weighted average energy corresponding to each other task is based on the minimum energy value consumed by the other task when the other task is executed on all processors, and further considers the available energy Δ Eae(G) And the scheduling length ratio of the other tasks, therefore, the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all the processors, and the task with lower priority can be ensured to obtain proper energy.
In this step, the control device may sequentially allocate corresponding energy constraints to each task in the DAG application according to the order of the priority from high to low, so that the energy constraints of the DAG application may be converted into the energy constraints of each task.
Optionally, the energy constraint corresponding to each task is obtained by pre-allocating corresponding weighted average energy according to other tasks with lower priority than the task. For example, when the control device determines the energy constraint corresponding to any task, the control device may determine the energy constraint corresponding to the task according to a preset energy constraint value applied by the DAG, the energy consumption corresponding to all tasks (assigned energy constraints) having a higher priority than the task, and the weighted average energy pre-assigned to other tasks having a lower priority than the task. Therefore, when the energy constraint corresponding to any task is determined, the corresponding weighted average energy is pre-allocated to other tasks with the priority lower than that of the task, so that each task in the DAG application can be ensured to obtain the appropriate energy.
For example, assume that the DAG application includes N tasks, which are N in order of priority from high to lows(1),ns(2),...,ns(|N|)N tasks are classified into three categories: set of tasks that have been allocated energy ns(1),ns(2),...,ns(j-1)J, task n to which energy is currently to be allocateds(j)And task set n of unallocated energys(j+1),ns(j+2),...,ns(|N|)}, task n may be determined according to equation (20) belows(j)Corresponding energy constraint Egiven(ns(j)):
Figure BDA0002156981710000121
Wherein E isgiven(G) A preset energy constraint value representing a DAG application; n iss(x)Indicating that a task of the set of tasks has allocated energy; e (n)s(x),uk,fk,h) Representing a task ns(x)At a frequency fk,hIn processor ukEnergy consumption at run-up; n iss(y)A task in the set of tasks representing unallocated energy; epre(ns(y)) Representing a task ns(y)The corresponding weighted average energy.
Of course, task n may also be determined according to other variations of the above equation (20) or equivalent equationss(j)Corresponding energy constraints.
Step S303, for each task, determining a target processor and a corresponding target frequency from a plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task.
In this step, for each task, the control device may determine, according to the earliest execution end time of the task, a target processor and a corresponding target frequency from the multiple processors of the distributed heterogeneous system on the premise that an energy constraint corresponding to the task is satisfied, where the execution end time of the task when executed at the target frequency on the target processor is earliest.
In the embodiment of the application, after the priority order of a plurality of tasks applied to the directed acyclic graph DAG is determined, corresponding energy constraints are sequentially allocated to each task according to the sequence from high priority to low priority; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with the priority lower than that of the task, and the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors; further, for each task, a target processor and a corresponding target frequency are determined from the plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task, wherein the execution end time of the task when executed on the target processor at the target frequency is earliest. Therefore, in the embodiment of the application, when the energy constraint corresponding to any task is determined, the corresponding weighted average energy is pre-allocated to other tasks with the priority lower than that of the task, so that each task in the DAG application can be ensured to obtain appropriate energy, a target processor corresponding to each task and a corresponding target frequency can be respectively determined from a plurality of processors of a distributed heterogeneous system on the premise that the energy constraint corresponding to each task is met, the execution time of each task is saved, and the DAG application has a shorter scheduling length.
Fig. 4 is a flowchart illustrating a task configuration method based on a distributed heterogeneous system according to another embodiment of the present application. On the basis of the above embodiments, the embodiments of the present application describe an implementation manner of obtaining the weighted average energy corresponding to each of the other tasks. As shown in fig. 4, the embodiment of the present application may include:
step S401, determining a weighted average distribution energy of the available energy according to the preset energy constraint value of the DAG application, the minimum energy value consumed by the other tasks when executed on all the processors, and the scheduling length ratio of the other tasks.
In the embodiment of the present application, the scheduling length ratio of the other task may be a ratio of an execution time length of the other task when the energy constraint value is not defined to a total execution time length of all tasks in the DAG application when the energy constraint value is not defined, for example, refer to the above equation (17).
In the embodiment of the present application, the minimum energy consumed by the other tasks executed on all processors may be determined by referring to the above equation (13).
Alternatively, the control device may apply the preset energy constraint value E according to the DAGgiven(G) Minimum energy value E consumed by DAG applicationmin(G) The difference between them, the available energy Delta E is determinedae(G) (ii) a Further, the control device may be dependent on the available energy Δ Eae(G) The minimum amount of energy consumed by the other tasks when executed on all processors, and the scheduled length ratio of the other tasks, determine a weighted average of the available energy allocated energy.
Illustratively, assume that the other task in this embodiment is task niThe control device being dependent on the available energy Δ Eae(G) The minimum energy value E consumed by the other task when it is executed on all processorsmin(ni) And the scheduling length ratio of the other tasks MSR (n)i) The weighted average distributed energy E of the available energy can be determined using the following equation (21)aa(ni):
Eaa(ni)=Emin(ni)+ΔEae(G)×MSR(ni) (21)
Of course, the control device depends on the available energy Δ Eae(G) The minimum energy value E consumed by the other task when it is executed on all processorsmin(ni) And the scheduling length ratio of the other tasks MSR (n)i) Other variations of the above equation (21) or equivalent equations may also be used to determine the weighted average distributed energy of the available energy.
Step S402, determining the minimum value of the weighted average distribution energy of the available energy and the maximum energy value consumed by the other tasks when the other tasks are executed on all the processors as the weighted average energy corresponding to the other tasks.
In this step, the control device may distribute the energy E to the weighted average of the available energy in consideration of the upper limit of the energy consumed by the taskaa(ni) With the maximum amount of energy E consumed by the other task when it is executed on all processorsmax(ni) The minimum value in (1) is used as the weighted average energy E corresponding to the other taskpre(ni) That is, the weighted average energy E corresponding to the other task can be determined according to the following formula (22)pre(ni):
Epre(ni)=min{Eaa(ni),Emax(ni)} (22)
Of course, the weighted average energy for the other tasks may also be determined according to other variations of the above equation (22) or an equivalent equation.
In the embodiment of the present application, when determining the energy constraint corresponding to any task, by pre-allocating corresponding weighted average energy to other tasks having priorities lower than that of the task, specifically, the weighted average energy corresponding to the other tasks may be determined according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when executed on all processors, a scheduling length ratio of the other tasks, and a maximum energy value consumed by the other tasks when executed on all processors, so that it may be ensured that each task in the DAG application can obtain appropriate energy.
Fig. 5 is a flowchart illustrating a task configuration method based on a distributed heterogeneous system according to another embodiment of the present application. On the basis of the foregoing embodiments, the present application introduces an implementation manner of determining the target processor corresponding to each task and the corresponding target frequency in step S303. As shown in fig. 5, the embodiment of the present application may include:
step S501, determining the execution end time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task.
In this step, the control device determines the execution end time of the task when the task is executed at different frequencies on each processor of the distributed heterogeneous system on the premise of satisfying the energy constraint corresponding to the task.
First, the control device may determine the execution start time of the task when the task is executed at different frequencies on each processor according to the energy constraint corresponding to the task. Alternatively, the control device may determine the execution start time of the task executed at different frequencies on each processor according to the energy constraint corresponding to the task, the earliest available time for the task to be executed on each processor, and the execution end time of each previous task of the task.
For example, the control device may respectively determine the execution start time of the task when the task is executed at different frequencies on each processor according to the following formula (23) according to the earliest available time for the task to be executed on each processor and the execution end time of each previous task of the task, on the premise that the energy constraint corresponding to the task is satisfied:
Figure BDA0002156981710000141
wherein n isentryRepresenting an ingress task, ingress task n, in a DAG applicationentryRefers to the first executed task in the DAG application; EST (n)i,uk,fk,h) Representing a task niIn processor ukAt a frequency fk,hAn execution start time when executing; avail [ k ]]Representation processor ukThe earliest time available at which the upper task can be executed; pred (n)i) Representing a task niA set of predecessor tasks; n iszRepresenting a task niThe predecessor task of (1); AFT (n)z) Representing a task nzThe execution end time of (1); c. Cz,iRepresenting a task nzAnd niOverhead of communication between, and when task nzAnd task niWhen allocated to the same processor cz,iEqual to 0.
Of course, other variations of the above equation (23) or equivalent equations may be used to determine the execution start time of each processor when the task is executed at different frequencies according to the earliest available time for the task to be executed on each processor and the execution end time of each task preceding the task.
For example, the control device may determine, based on the earliest available time for the task to be executed on the processor 1 and the execution end times of the tasks preceding the task, the execution start times of the tasks executed at different frequencies on the processor 1 by using the above formula (23), and determine, based on the earliest available time for the task to be executed on the processor 2 and the execution end times of the tasks preceding the task, the execution start times of the tasks executed at different frequencies on the processor 2 by using the above formula (23), on the premise that the energy constraint corresponding to the task is satisfied.
Secondly, the control device respectively determines the execution ending time of the task executed at different frequencies on each processor according to the execution starting time and the corresponding execution duration of the task executed at different frequencies on each processor.
For example, the control device may determine the execution end time of the task executed at different frequencies on each processor according to the execution start time and the corresponding execution time length of the task executed at different frequencies on each processor by using the following formula (24):
EFT(ni,uk,fk,h)=EST(ni,uk,fk,h)+wi,k,h (24)
wherein EFT (n)i,uk,fk,h) Representing a task niIn processor ukAt a frequency fk,hAn execution end time when executed; w is ai,k,hIs represented in task niProcessor ukAt a frequency fk,hThe length of execution time when executed.
Of course, according to the execution start time and the corresponding execution time length when the task is executed at different frequencies on each processor, the execution end time when the task is executed at different frequencies on each processor can be determined by using other modified or equivalent formulas of the above formula (24).
For example, the control device may determine the execution end time of the task executed at the different frequency on the processor 1 by using the above formula (24) according to the execution start time and the corresponding execution time length of the task executed at the different frequency on the processor 1, and determine the execution end time of the task executed at the different frequency on the processor 2 by using the above formula (24) according to the execution start time and the corresponding execution time length of the task executed at the different frequency on the processor 2.
Step S502, determining the processor with the earliest execution end time and the corresponding frequency as the target processor and the target frequency, respectively.
In this step, the control device may determine, from the execution end times of the tasks executed at different frequencies on each processor determined in step S501, a processor with the earliest execution end time and a corresponding frequency as a target processor and a target frequency corresponding to the task.
In the embodiment of the application, the execution end time of the task when executed at different frequencies on each processor is respectively determined according to the energy constraint corresponding to the task, and then the processor with the earliest execution end time and the corresponding frequency are respectively determined as the target processor and the target frequency. Therefore, the target processor corresponding to each task and the corresponding target frequency are respectively determined from the multiple processors of the distributed heterogeneous system on the premise of meeting the energy constraint corresponding to each task, and therefore the execution time of each task is saved.
On the basis of the foregoing embodiment, the following section of the embodiment of the present application takes DAG application shown in fig. 1 as an example, and performs a simulation experiment on the task configuration method based on the distributed heterogeneous system provided by the foregoing embodiment of the present application. It should be noted that the Task configuration method based on the distributed heterogeneous system may also be referred to as a Weighted Average Task pre-allocation algorithm (WATP).
Assuming that the energy consumption parameters and the frequency range of the processors of the distributed heterogeneous system are shown in table 2, the frequency precision is 0.01.
Table 2 shows the power consumption parameters and the frequency ranges of the processors of the distributed heterogeneous system according to the embodiment of the present application
Figure BDA0002156981710000161
The minimum energy value E consumed by the DAG application can be determined according to the above equations (13) - (16)min(G) And a maximum energy value Emax(G) Then assume a preset energy constraint value E for the DAG applicationgiven(G) Is 0.5 XEmax(G)。
Table 3 is a scheduling result of the WATP method provided in the embodiment of the present application, table 4 is a comparison table of the scheduling results of the WATP method and the MSLECC method provided in the related art, and fig. 6 is a schematic scheduling diagram of the WATP method provided in the embodiment of the present application. As shown in fig. 6, the lines between tasks represent communication overhead; the starting point of each task along the time axis being the execution start time and the ending point of each task along the time axis being the execution end time, e.g. task n1Is 0 and the execution end time is 11. It should be noted that there is no communication overhead between two tasks located on the same processor.
As shown in table 3 and table 4, energy consumption e (g) of DAG application in the WATP method provided in the embodiment of the present application can satisfy the energy consumption constraint, and the scheduling length sl (g) of DAG application is 83.4632, which is much shorter than the scheduling length of MSLECC.
Table 3 shows the scheduling result of the WATP method provided in the embodiment of the present application
Figure BDA0002156981710000162
Figure BDA0002156981710000171
Table 4 is a comparison table of scheduling results of the WATP method and the MSLECC method provided by the related art
Figure BDA0002156981710000172
On the basis of the above embodiments, the energy consumption e (g) of DAG application and the scheduling length sl (g) of DAG application in the WATP method provided by the present application are verified as performance indicators and compared with the method of het and MSLECC.
Assuming that the specific setting of the energy consumption parameters of the processors of the distributed heterogeneous system can be as follows: w is more than or equal to 10msi,k≤100ms,10ms≤ci,jNot more than 100ms, and not less than 0.03 and not more than Pk,ind≦ 0.07, all frequencies are discrete with an accuracy of 0.01GHz, the number of processors is 32, and their parameters may be randomly generated. The proposed algorithm was validated using two typical parallel applications, Fast Fourier Transform (FFT) application and Gaussian Elimination (GE).
Fig. 7 is a schematic diagram of FFT application when ρ is 4, and fig. 8 is a schematic diagram of GE application when ρ is 5, where ρ is the matrix size of the application. As shown in fig. 7, the number of tasks in the FFT graph is | N | ═ 2 × ρ -1) + ρ × log2ρ where ρ is 2yAnd y is an integer. Since the FFT application has ρ egress tasks, one egress task having an execution time of 0 can be set as a task directly succeeding the original egress task. As shown in fig. 8, the number of tasks in the GE diagram is | N | (ρ |)2+ ρ -2)/2, for which a similar setup as for the FFT plot is adopted.
1. Varying energy consumption constraints
First, the algorithm is applied to the two different models under the condition of changing the preset energy constraint value for comparison.
(1) FFT application
Assuming that the number of tasks is set to ρ 64 (i.e., | N | > 511), the energy constraint value E is presetgiven(G) Range of (1) from 0.5EH(G) To 0.9 XEH(G) In which EH(G) Is the energy consumption produced by the HEFT process.
TABLE 5 comparison table of FFT applied scheduling results under different energy consumption constraints
Figure BDA0002156981710000181
(2) GE applications
Assuming that the number of tasks is set to ρ ═ 32 (i.e., | N | ═ 527), the energy constraint value E is presetgiven(G) Also ranges from 0.5 × EH(G) To 0.9 XEH(G)。
TABLE 6 comparison table of scheduling results of GE applications under different energy consumption constraints
Figure BDA0002156981710000182
As shown in tables 5 and 6, although the scheduling results of the mselecc method and the WATP method satisfy the energy consumption limit in all cases, the scheduling length of the WATP method is close to the result of the beat method, and the WATP method achieves better scheduling performance than the msecc method, and particularly, the WATP method achieves a shorter time length than the mselecc method when the given energy consumption is small.
2. Different number of tasks
Second, the algorithm is applied to the FFT application and the GE application with different numbers of tasks for comparison.
(1) FFT application
Assuming that the size of the FFT application ranges from p 16 to p 256, which means that the number of tasks ranges from 95 to 2559, the energy constraint value E is presetgiven(G) Is set to 0.5 × EH(G)。
TABLE 7 comparison table of FFT applied scheduling results under different task numbers
Figure BDA0002156981710000183
(2) GE applications
Assuming that the size of the GE application ranges from ρ ═ 13 to ρ ═ 71, which means that the number of tasks ranges from 90 to 2555, the energy constraint value E is presetgiven(G) Is set to 0.5 × EH(G)。
TABLE 8 comparison table of scheduling results of GE applications under different task numbers
Figure BDA0002156981710000191
Tables 7 and 8 show the scheduling results of the MSLECC method and the WATP method applied to FFT applications and GE applications having different numbers of tasks. As shown in tables 7 and 8, although both the MSLECC method and the WATP method satisfy the energy consumption constraint, the WATP method has always a shorter scheduling time than the MSLECC method, closer to the HEFT result. Therefore, the WATP method provided by the embodiment can be applied to applications of different scales, and has good scheduling performance.
Fig. 9 is a schematic structural diagram of a task configuration device based on a distributed heterogeneous system according to an embodiment of the present application. As shown in fig. 9, a task configuration device 90 based on a distributed heterogeneous system according to an embodiment of the present application may include: a first determining module 901, an assigning module 902 and a second determining module 903.
The first determining module 901 is configured to determine a priority order of a plurality of tasks applied to the directed acyclic graph DAG;
an allocating module 902, configured to allocate, according to a sequence from high to low in priority, corresponding energy constraints to each task in turn; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with lower priority than the task; the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors;
a second determining module 903, configured to determine, for each task, a target processor and a corresponding target frequency from multiple processors of the distributed heterogeneous system according to an energy constraint corresponding to the task; wherein an execution end time of the task when executed on the target processor at the target frequency is earliest.
In a possible implementation manner, the task configuration apparatus 90 based on a distributed heterogeneous system further includes: a third determining module for determining a weighted average energy corresponding to each of the other tasks;
the third determining module is specifically configured to:
determining a weighted average distribution energy of available energy according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when the other tasks are executed on all the processors, and a scheduling length ratio of the other tasks; wherein the scheduling length ratio of the other tasks is the ratio of the execution time length of the other tasks when the energy constraint value is not defined to the total execution time length of all tasks in the DAG application when the energy constraint value is not defined;
and determining the minimum value of the weighted average distribution energy of the available energy and the maximum energy value consumed by the other tasks when the other tasks are executed on all the processors as the weighted average energy corresponding to the other tasks.
In a possible implementation manner, the third determining module is specifically configured to:
determining the available energy according to a difference value between a preset energy constraint value of the DAG application and a minimum energy value consumed by the DAG application;
determining a weighted average allocated energy of the available energy based on the available energy, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduled length ratio of the other tasks.
In a possible implementation manner, the second determining module 903 includes:
the first determining unit is used for respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and the second determining unit is used for determining that the processor with the earliest execution ending time and the corresponding frequency are the target processor and the target frequency respectively.
In a possible implementation manner, the first determining unit is specifically configured to:
respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the execution starting time and the corresponding execution duration when the task is executed on each processor at different frequencies.
In a possible implementation manner, the first determining unit is specifically configured to:
and respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task, the earliest available time of the task executable on each processor and the execution ending time of each precursor task of the task.
In a possible implementation manner, the first determining module 901 is specifically configured to:
and determining the priority order of the tasks according to the order of the upward ordering values of the tasks applied to the DAG.
The task configuration device based on the distributed heterogeneous system provided in the embodiment of the present application may be used to execute the technical solution of the embodiment of the task configuration method based on the distributed heterogeneous system, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of a control device according to an embodiment of the present application. As shown in fig. 10, the control device 100 provided in the embodiment of the present application may include: a memory 1001, a processor 1002, and a computer program 1003 stored on the memory 1001 and executable on the processor 1002; when the processor 1002 executes the computer program 1003, the control device is configured to implement the technical solution of the embodiment of the task configuration method based on the distributed heterogeneous system according to the present application, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present application further provides a readable storage medium, where a computer program or an instruction is stored, and when the computer program or the instruction runs on a computer, the technical solution of the embodiment of the task configuration method based on the distributed heterogeneous system is executed, which implements similar principles and technical effects, and is not described herein again.
It should be understood by those of ordinary skill in the art that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of the processes should be determined by their functions and inherent logic, and should not limit the implementation process of the embodiments of the present application.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A task configuration method based on a distributed heterogeneous system is characterized by comprising the following steps:
determining a priority order of a plurality of tasks applied to a directed acyclic graph DAG;
according to the sequence of the priority from high to low, corresponding energy constraints are distributed to each task in sequence; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with lower priority than the task; the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors;
for each task, determining a target processor and a corresponding target frequency from a plurality of processors of the distributed heterogeneous system according to an energy constraint corresponding to the task; wherein an execution end time of the task when executed on the target processor at the target frequency is earliest.
2. The method of claim 1, wherein the weighted average energy for each of the other tasks is obtained according to the following steps:
determining a weighted average distribution energy of available energy according to a preset energy constraint value of the DAG application, a minimum energy value consumed by the other tasks when the other tasks are executed on all the processors, and a scheduling length ratio of the other tasks; wherein the scheduling length ratio of the other tasks is the ratio of the execution time length of the other tasks when the energy constraint value is not defined to the total execution time length of all tasks in the DAG application when the energy constraint value is not defined;
and determining the minimum value of the weighted average distribution energy of the available energy and the maximum energy value consumed by the other tasks when the other tasks are executed on all the processors as the weighted average energy corresponding to the other tasks.
3. The method as in claim 2, wherein determining a weighted average allocated energy of available energy based on a preset energy constraint value for the DAG application, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduled length ratio of the other tasks comprises:
determining the available energy according to a difference value between a preset energy constraint value of the DAG application and a minimum energy value consumed by the DAG application;
determining a weighted average allocated energy of the available energy based on the available energy, a minimum energy value consumed by the other tasks when executed on all processors, and a scheduled length ratio of the other tasks.
4. The method according to any one of claims 1-3, wherein determining a target processor and a corresponding target frequency from among a plurality of processors of the distributed heterogeneous system according to the energy constraint corresponding to the task comprises:
respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and determining the processor with the earliest execution end time and the corresponding frequency as the target processor and the target frequency respectively.
5. The method of claim 4, wherein the determining the execution end time of the task when the task is executed at different frequencies on each processor according to the energy constraint corresponding to the task comprises:
respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task;
and respectively determining the execution ending time of the task when the task is executed on each processor at different frequencies according to the execution starting time and the corresponding execution duration when the task is executed on each processor at different frequencies.
6. The method of claim 5, wherein the determining the execution start time of the task when the task is executed at different frequencies on each processor according to the energy constraint corresponding to the task comprises:
and respectively determining the execution starting time of the task when the task is executed on each processor at different frequencies according to the energy constraint corresponding to the task, the earliest available time of the task executable on each processor and the execution ending time of each precursor task of the task.
7. The method of any of claims 1-3, wherein determining the priority order of the plurality of tasks for the DAG application comprises:
and determining the priority order of the tasks according to the order of the upward ordering values of the tasks applied to the DAG.
8. A task configuration apparatus based on a distributed heterogeneous system, comprising:
a first determining module to determine a priority order of a plurality of tasks of a directed acyclic graph DAG application;
the distribution module is used for sequentially distributing corresponding energy constraints to each task according to the sequence of the priority from high to low; the energy constraint corresponding to each task is obtained by pre-distributing corresponding weighted average energy to other tasks with lower priority than the task; the weighted average energy corresponding to each other task is larger than the minimum energy value consumed by the other tasks when the other tasks are executed on all processors;
a second determining module, configured to determine, for each task, a target processor and a corresponding target frequency from multiple processors of the distributed heterogeneous system according to an energy constraint corresponding to the task; wherein an execution end time of the task when executed on the target processor at the target frequency is earliest.
9. A control apparatus, characterized by comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1-7 when executing the computer program.
10. A readable storage medium having stored thereon a computer program or instructions, characterized in that the method of any of claims 1-7 is performed when the computer program or instructions are run on a computer.
CN201910720430.3A 2019-08-06 2019-08-06 Task configuration method, device and storage medium based on distributed heterogeneous system Active CN112346828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910720430.3A CN112346828B (en) 2019-08-06 2019-08-06 Task configuration method, device and storage medium based on distributed heterogeneous system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910720430.3A CN112346828B (en) 2019-08-06 2019-08-06 Task configuration method, device and storage medium based on distributed heterogeneous system

Publications (2)

Publication Number Publication Date
CN112346828A true CN112346828A (en) 2021-02-09
CN112346828B CN112346828B (en) 2024-04-05

Family

ID=74366424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910720430.3A Active CN112346828B (en) 2019-08-06 2019-08-06 Task configuration method, device and storage medium based on distributed heterogeneous system

Country Status (1)

Country Link
CN (1) CN112346828B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205420A (en) * 2021-12-14 2022-03-18 深圳Tcl新技术有限公司 Task scheduling method and device, storage medium and electronic equipment
CN114884830A (en) * 2022-07-11 2022-08-09 成都众享天地网络科技有限公司 Distributed parallel simulation deduction system based on wide area network
CN116880994A (en) * 2023-09-07 2023-10-13 之江实验室 Multiprocessor task scheduling method, device and equipment based on dynamic DAG

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110239017A1 (en) * 2008-10-03 2011-09-29 The University Of Sydney Scheduling an application for performance on a heterogeneous computing system
CN102866912A (en) * 2012-10-16 2013-01-09 首都师范大学 Single-instruction-set heterogeneous multi-core system static task scheduling method
CN103262467A (en) * 2010-12-17 2013-08-21 思科技术公司 Increased communication opportunities with low-contact nodes in a computer network
US20130219046A1 (en) * 2012-02-21 2013-08-22 Cisco Technology, Inc. Dynamic application-aware routing topologies
US20160020967A1 (en) * 2014-07-21 2016-01-21 Cisco Technology, Inc. Synchronized routing updates for tsch networks
KR101655030B1 (en) * 2015-05-21 2016-09-07 성균관대학교산학협력단 Dynamic voltage frequency scaling method using slack-distribution based on task-characteristics, execution program thereof method and recorded medium of the program
CN108647084A (en) * 2018-05-08 2018-10-12 武汉轻工大学 Efficiency cloud method for scheduling task
CN108737462A (en) * 2017-04-17 2018-11-02 华东师范大学 A kind of cloud computation data center method for scheduling task based on graph theory
CN109298918A (en) * 2018-07-10 2019-02-01 东南大学 A kind of parallel task energy-saving scheduling method based on linear programming

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110239017A1 (en) * 2008-10-03 2011-09-29 The University Of Sydney Scheduling an application for performance on a heterogeneous computing system
CN103262467A (en) * 2010-12-17 2013-08-21 思科技术公司 Increased communication opportunities with low-contact nodes in a computer network
US20130219046A1 (en) * 2012-02-21 2013-08-22 Cisco Technology, Inc. Dynamic application-aware routing topologies
CN102866912A (en) * 2012-10-16 2013-01-09 首都师范大学 Single-instruction-set heterogeneous multi-core system static task scheduling method
US20160020967A1 (en) * 2014-07-21 2016-01-21 Cisco Technology, Inc. Synchronized routing updates for tsch networks
KR101655030B1 (en) * 2015-05-21 2016-09-07 성균관대학교산학협력단 Dynamic voltage frequency scaling method using slack-distribution based on task-characteristics, execution program thereof method and recorded medium of the program
CN108737462A (en) * 2017-04-17 2018-11-02 华东师范大学 A kind of cloud computation data center method for scheduling task based on graph theory
CN108647084A (en) * 2018-05-08 2018-10-12 武汉轻工大学 Efficiency cloud method for scheduling task
CN109298918A (en) * 2018-07-10 2019-02-01 东南大学 A kind of parallel task energy-saving scheduling method based on linear programming

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
蒋军强;林亚平;谢国琪;张世文;: "时间约束的异构分布式系统工作流能耗优化算法", 计算机研究与发展, no. 07 *
谢国琪;李仁发;刘琳;杨帆;: "异构分布式系统DAG可靠性模型与容错算法", 计算机学报, no. 10 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205420A (en) * 2021-12-14 2022-03-18 深圳Tcl新技术有限公司 Task scheduling method and device, storage medium and electronic equipment
CN114884830A (en) * 2022-07-11 2022-08-09 成都众享天地网络科技有限公司 Distributed parallel simulation deduction system based on wide area network
CN116880994A (en) * 2023-09-07 2023-10-13 之江实验室 Multiprocessor task scheduling method, device and equipment based on dynamic DAG
CN116880994B (en) * 2023-09-07 2023-12-12 之江实验室 Multiprocessor task scheduling method, device and equipment based on dynamic DAG

Also Published As

Publication number Publication date
CN112346828B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN112346828A (en) Task configuration method and device based on distributed heterogeneous system and storage medium
CN110321222B (en) Decision tree prediction-based data parallel operation resource allocation method
Wolf et al. Flex: A slot allocation scheduling optimizer for mapreduce workloads
US20200257972A1 (en) Method and apparatus for determining memory requirement in a network
US8607240B2 (en) Integration of dissimilar job types into an earliest deadline first (EDF) schedule
US8924754B2 (en) Quality of service targets in multicore processors
Lam et al. Speed scaling functions for flow time scheduling based on active job count
CN114787830A (en) Machine learning workload orchestration in heterogeneous clusters
CN109298920B (en) Mixed key task scheduling method based on quasi-partition thought
Down et al. The N-network model with upgrades
Moulik et al. Energy aware frame based fair scheduling
He et al. Tians scheduling: Using partial processing in best-effort applications
CN108762899B (en) Cloud task rescheduling method and device
King et al. Stretch and compress based re-scheduling techniques for minimizing the execution times of DAGs on multi-core processors under energy constraints
CN112817722A (en) Time-sharing scheduling method based on priority, terminal and storage medium
CN112817741A (en) DNN task control method for edge calculation
CN104731662B (en) A kind of resource allocation methods of variable concurrent job
de Queiroz et al. A flexible algorithm to offload DAG applications for edge computing
JP2005092780A (en) Real time processor system and control method
CN113407313B (en) Resource demand-aware multi-queue scheduling method, system and server
Cohen et al. Energy-aware multi-organization scheduling problem
Mayank et al. Non-preemptive multiprocessor scheduling for periodic real-time tasks
US20230401091A1 (en) Method and terminal for performing scheduling
KR102563374B1 (en) Method and system for scheduling distributed deep learning task in shared gpu clusters
EP4300305A1 (en) Methods and systems for energy-efficient scheduling of periodic tasks on a group of processing devices

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
GR01 Patent grant
GR01 Patent grant