Specific embodiment
Come that the present invention will be described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that do not conflicting
In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
Fig. 1 show the flow for more data processing equipment collaboration working methods that preferred embodiment according to the present invention provides
Figure.As shown in Figure 1, more data processing equipment collaboration working methods that presently preferred embodiments of the present invention provides include step 101-
105。
In step 101, multiple data processing equipments handle its one or more corresponding task respectively.
For example, 4 data processing equipments (GPU) handle its corresponding task respectively, and the corresponding task of each GPU is such as
Shown in table 1.
Table 1
Wherein, data processing equipment refers to video card.
It, will be according to the preferential of task if the timeslice of the first data processing equipment is more than the first preset value in step 102
Grade determines task to be migrated.
For example, the first preset value of the timeslice of each data processing equipment is set to 8, by the preferential fraction of task
For:The first estate, the second grade and the tertiary gradient.Wherein, the first estate is higher than the second grade in priority, and the second grade is higher than
The tertiary gradient, the corresponding priority of each task are as shown in table 2.
Table 2
Task names |
Task grade |
A |
The first estate |
B |
The tertiary gradient |
C |
The first estate |
D |
Second grade |
E |
The first estate |
F |
The first estate |
G |
Second grade |
H |
The tertiary gradient |
I |
The first estate |
J |
The first estate |
K |
The tertiary gradient |
L |
Second grade |
First preset value of the timeslice of content and each data processing equipment based on table 1 and 2 is 8, the first data
The sum of timeslice of existing task is more than 8 in processing equipment GPU1, and the priority of task A and task C is the first estate, task B
Priority for the tertiary gradient, since the first estate is higher than the tertiary gradient in priority, accordingly, it is determined that be migrated for task B.
In step 103, first data processing equipment is according in the task to be migrated and other data processing equipments
The degree of correlation of task, to determine the second data processing equipment that the task immigration to be migrated arrives;
Other described data processing equipments are the data processing equipment that the task to be migrated has not visited.
For example, task to be migrated is task B, and the corresponding data processing equipments of task B access for GPU1 namely task B
Data processing equipment GPU1 is crossed, thus GPU2, GPU3 and GPU4 are referred to as other data processing equipments.
In this present embodiment, if onrelevant between the processing procedure of task, the degree of correlation is 0 between task.
For example, task A is antivirus, and task C is acquisition, onrelevant between task A and task C, the degree of correlation 0.
In this present embodiment, the degree of correlation directly obtained between the task of objective result and the task of processing target result is
1;Wherein, the task (to be selectable) of the processing target result is inessential task.
For example, task D+ tasks H=objective results, task L are verification objective result, and task L is selectable non-
Necessary task, thus the degree of correlation is 1 between task L and task D, the degree of correlation is 1 between task L and task H.
In this present embodiment, it is 2 to directly obtain the degree of correlation between the task of same objective result.
For example, task D+ tasks H=objective results can directly obtain objective result by task D and task H, because
And the degree of correlation is 2 between task D and task H.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated obtains the highest task of the degree of correlation by comparing, using its corresponding data processing equipment as
Two data processing equipments.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,0 in task B to be migrated and GPU2;Task B to be migrated
0,1,1,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
It can draw, the degree of correlation of task E is 2 in task B to be migrated and GPU2, and the degree of correlation is most compared with other tasks
It is high.Therefore the second data processing equipment that task B to be migrated is moved to is GPU2, and task B is moved to GPU2.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated obtains the highest task of the degree of correlation by comparing, if the highest task of the degree of correlation be present in it is multiple
In data processing equipment, then task to be migrated random selection is moved into one of data processing equipment, and as the
Two data processing equipments.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,0 in task B to be migrated and GPU2;Task B to be migrated
0,2,0,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
It can draw, the degree of correlation of task E and with the degree of correlation of task H in GPU3 all be in task B and GPU2 to be migrated
2, therefore, GPU2 is as the second data processing equipment for random selection, and task B is moved to GPU2.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated obtains the highest task of the degree of correlation by comparing, if the highest task of the degree of correlation be present in it is multiple
In data processing equipment, then using the sum of timeslice in data processing equipment it is minimum as the second data processing equipment, will wait to move
Task immigration is moved to the second data processing equipment.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,0 in task B to be migrated and GPU2;Task B to be migrated
0,2,0,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
It can draw, the degree of correlation of task E and with the degree of correlation of task H in GPU3 all be in task B and GPU2 to be migrated
2, and the sum of timeslice in GPU2 and GPU3 is respectively 6 and 7, it is determined that the smaller GPU2 of the sum of timeslice is as to be migrated
The second data processing equipment of business B, GPU2 is moved to by task B.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated calculates the sum of degree of correlation of task in each data processing equipment, obtain by comparing the degree of correlation it
With highest data processing equipment, as the second data processing equipment.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,0 in task B to be migrated and GPU2;Task B to be migrated
0,2,0,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
It can draw, the sum of degree of correlation of task is respectively 2,3 and 1, wherein the sum of degree of correlation in GPU2, GPU3 and GPU4
Highest is GPU3, thus task B is moved to GPU3.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated calculates the sum of degree of correlation of task in each data processing equipment, obtain by comparing the degree of correlation it
With highest data processing equipment, if it is equal with the sum of the degree of correlation of task to be migrated task in multiple data processing equipments occur
Situation, then task to be migrated random selection is moved into one of data processing equipment, and as the second data at
Manage equipment.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,2 in task B to be migrated and GPU2;Task B to be migrated
0,2,1,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
Can draw, the sum of degree of correlation of the task in GPU2, GPU3 and GPU4 and task B to be migrated be respectively 4,4 and
1, highest the sum of degree of correlation is GPU2 and GPU3.Therefore, GPU2 is randomly choosed as the second data processing equipment, by task B
Move to GPU2.
In this present embodiment, according to the degree of correlation of task in the task to be migrated and other data processing equipments, determine
The task immigration to be migrated to the process of the second data processing equipment be:Obtain in other data processing equipments each task with
The degree of correlation of task to be migrated calculates the sum of degree of correlation of task in each data processing equipment, obtain by comparing the degree of correlation it
With highest data processing equipment, if it is equal with the sum of the degree of correlation of task to be migrated task in multiple data processing equipments occur
Situation, then using the sum of timeslice in data processing equipment it is minimum as the second data processing equipment, task to be migrated is moved
Move on to the second data processing equipment.
For example, the degree of correlation of task D, E, F are followed successively by 0,2,2 in task B to be migrated and GPU2;Task B to be migrated
0,2,1,1 is followed successively by with the degree of correlation of task G, H, I, J in GPU3;In task B to be migrated and GPU4 the degree of correlation of task K, L according to
Secondary is 0,1.
Can draw, the sum of degree of correlation of the task in GPU2, GPU3 and GPU4 and task B to be migrated be respectively 4,4 and
1, highest the sum of degree of correlation is GPU2 and GPU3, and the sum of timeslice in GPU2 and GPU3 is respectively 6 and 7, then by the time
The smaller GPU2 of the sum of piece is determined as the second data processing equipment, and task B is moved to GPU2.
In step 104, if the task immigration to be migrated to after second data processing equipment, at second data
The timeslice for managing equipment is more than the first preset value, according to task in the task to be migrated and the data processing equipment having not visited
The degree of correlation to determine the 3rd data processing equipment moved to, and the task immigration to be migrated is set to the 3rd data processing
It is standby;
For example, the first preset value of data processing equipment timeslice is 8, task D in task B to be migrated and GPU2,
E, the degree of correlation of F is followed successively by 0,2,0;The degree of correlation of task G, H, I, J are followed successively by 0,0,0,0 in task B to be migrated and GPU3;It treats
The degree of correlation of task K, L is followed successively by 0,1 in migration task B and GPU4.
It " is set according to what a preferred embodiment in step 103 was described to according to the task to be migrated with other data processings
The degree of correlation of standby middle task, determine the task immigration to be migrated to the process of the second data processing equipment be:Obtain other
The degree of correlation of each task and task to be migrated, obtains the highest task of the degree of correlation by comparing in data processing equipment, its is right
The data processing equipment answered is as the second data processing equipment." can draw, task B is moved into the second data processing equipment
After GPU2, the timeslice of GPU2 is 11, more than preset value 8;In addition to task E, the highest degree of correlation is task L, is determined
GPU4 is the 3rd data processing equipment, and the timeslice of GPU4 is 7 at this time, less than preset value 8, then task B is moved to GPU4.
According to another preferred embodiment in step 103 be described to " according to the task to be migrated and other data processings
The degree of correlation of task in equipment, determine the task immigration to be migrated to the process of the second data processing equipment be:Obtain it
The degree of correlation of each task and task to be migrated in his data processing equipment, calculate task in each data processing equipment the degree of correlation it
With the highest data processing equipment of the sum of degree of correlation is obtained by comparing, as the second data processing equipment." can obtain
Go out, after task B is moved to the second data processing equipment GPU2, the timeslice of GPU2 is 11, more than preset value 8;Except GPU2 with
Outside, it is GPU4 that the sum of degree of correlation is highest, determines GPU4 as the 3rd data processing equipment, the timeslice of GPU4 is 7 at this time, is less than
Task B is then moved to GPU4 by preset value 8.
In step 105, if the migration number of the task to be migrated is more than or equal to the second preset value, wait to move by described
Task immigration is moved to the minimum data processing equipment of timeslice.
For example, the first preset value of data processing equipment timeslice is 8, and the second preset value for migrating number is 2, is treated
The degree of correlation of task D, E, F are followed successively by 0,2,1 in migration task B and GPU2;Task G, H, I, J in task B to be migrated and GPU3
The degree of correlation be followed successively by 0,1,0,0;The degree of correlation of task K, L is followed successively by 0,0 in task B to be migrated and GPU4.
It " is set according to what a preferred embodiment in step 103 was described to according to the task to be migrated with other data processings
The degree of correlation of standby middle task, determine the task immigration to be migrated to the process of the second data processing equipment be:Obtain other
The degree of correlation of each task and task to be migrated, obtains the highest task of the degree of correlation by comparing in data processing equipment, its is right
The data processing equipment answered is as the second data processing equipment.”.It can draw, task B is moved into the second data processing equipment
GPU2, the timeslice of GPU2 is 11 at this time, more than preset value 8;Task B is then moved into the 3rd data processing equipment GPU3, this
When GPU3 timeslice for 12, more than preset value 8, migrate number at this time and be equal to the second preset value 2, then continue to migrate task B
The GPU4 minimum to timeslice.
According to another preferred embodiment in step 103 be described to " according to the task to be migrated and other data processings
The degree of correlation of task in equipment, determine the task immigration to be migrated to the process of the second data processing equipment be:Obtain it
The degree of correlation of each task and task to be migrated in his data processing equipment, calculate task in each data processing equipment the degree of correlation it
With the highest data processing equipment of the sum of degree of correlation is obtained by comparing, as the second data processing equipment.”.It can obtain
Go out, task B is migrated into the second data processing equipment GPU2, the timeslice of GPU2 is 11 at this time, more than preset value 8;Then by task B
The 3rd data processing equipment GPU3 is moved to, the timeslice of GPU3 is 12 at this time, more than preset value 8, migrates number at this time and is equal to
Second preset value 2 then continues task B moving to the minimum GPU4 of timeslice.
Fig. 2 show the signal for more data processing equipment cooperative operation systems that preferred embodiment according to the present invention provides
Figure.As shown in Fig. 2, more data processing equipment cooperative operation systems that presently preferred embodiments of the present invention provides, including controller and
Multiple data processing equipments;The multiple data processing equipment is connected respectively with controller, the multiple data processing equipment it
Between be connected with each other;The data processing equipment is used to handle its one or more corresponding task;It is additionally operable to when the first data processing
When the timeslice of equipment is more than the first preset value, task to be migrated is determined according to the priority of task, and task to be migrated is sent out
It is sent to controller;The controller is used to receive the task to be migrated that first data processing equipment is sent, and according to institute
The degree of correlation of task to be migrated and task in other data processing equipments is stated, determines the second number that the task immigration to be migrated arrives
According to processing equipment, and by the task immigration to be migrated to the second data processing equipment.
More data processing equipment cooperative operation systems that presently preferred embodiments of the present invention provides, the task immigration to be migrated
To after the second data processing equipment, if the timeslice of second data processing equipment is more than the first preset value, second number
It is used to the task to be migrated being sent to controller according to processing equipment;The controller is for the second data processing equipment of reception
The task to be migrated sent, and according to the degree of correlation of task in the task to be migrated and the data processing equipment having not visited
Determine the 3rd data processing equipment moved to, and by the task immigration to be migrated to the 3rd data processing equipment.
In addition, the specific operation process on above system is with described in the above method, therefore repeated no more in this.
Compared to prior art, the more data processing equipment collaboration working methods and system provided according to the present invention are realized
Rational load sharing between multiple data processing equipments.
In addition, pass through following scheme:If the task immigration to be migrated is to after second data processing equipment, described
The timeslice of two data processing equipments is more than the first preset value, is set according to the task to be migrated with the data processing having not visited
The degree of correlation of standby middle task counts the task immigration to be migrated to the 3rd to determine the 3rd data processing equipment moved to
According to processing equipment, realize the multiple migration of task to be migrated, realize task immigration target to be migrated accuracy, rationally
Property.
In addition, pass through following scheme:It, will if the migration number of the task to be migrated is more than or equal to the second preset value
The task immigration to be migrated has saved system resource to the minimum data processing equipment of timeslice.The foregoing is merely this hairs
Bright preferred embodiment, is not intended to limit the invention, and for those skilled in the art, the present invention can have respectively
Kind change and variation.Within the spirit and principles of the invention, any modifications, equivalent replacements and improvements are made should all wrap
Containing within protection scope of the present invention.