Background technology
According to Moore's Law, the speed of microprocessor and degree of monolithic integration will double for every 18 months.Semi-conductor industry is follow the rhythm of Moore's Law in the development of nearly decades always, and the frequency of microprocessor also constantly rises.Along with the dominant frequency of general processor breaks through 4GHz, it is found that the way of single lifting dominant frequency can not improve performance more effectively, but bring rising sharply of power consumption on the contrary, high-frequency road has gone to the end gradually.
So the research for computer processor starts the direction turning to multiprocessing core.Mostly early stage symmetric multiprocessor (SMP, SymmetricMulti-Processor) is to adopt the mode collecting one group of CPU on the same computer, shared drive subsystem and bus structure between them.Afterwards due to the introducing of nanometer fabrication technology, SMP starts to change chip multiprocessors (CMP, ChipMultiprocessor) into, i.e. integrated multiple process core on the same chip, defines our said polycaryon processor now.Between multi-core, direct shared buffer memory and bus structure, greatly reduce wire delay, significantly improve communication efficiency.
By process core equity whether, polycaryon processor can be divided into isomorphism multinuclear and heterogeneous polynuclear.Process nuclear phase with, status reciprocity be called isomorphism multinuclear.The polycaryon processor of now popular on the market Intel and AMD is exactly the polycaryon processor of isomorphism.Process core is different, status is not reciprocity is called heterogeneous polynuclear.The design that heterogeneous polynuclear generally adopts " primary processor+coprocessor ".The model of the Cell processor that IBM, Sony and Toshiba etc. put out jointly this isomery framework just.The structural relation of processor itself is to the area of whole chip, power consumption and performance.How the achievement of inherit and development conventional processors directly has influence on performance and the performance period of polycaryon processor.
Sometimes need to carry out data sharing with synchronous between the program of each process core execution of polycaryon processor, therefore its hardware configuration must support intercore communication.Efficient communication mechanism is the high performance important leverage of polycaryon processor.On current sheet, efficient communication mechanism has two kinds usually: based on the cache structure of shared bus, based on the interconnection structure of network-on-chip.Cache structure based on shared bus refers to that each process core has shared secondary or three grades of cache, for preserving relatively more conventional data, and is communicated by bus.The advantage of this system is that structure is simple, and communication speed is fast; Shortcoming is poor expandability.
Shared bus obviously cannot meet the needs of large scale system.Interconnection network are used for system-on-chip designs, solve the Communication between assembly on sheet, Here it is network-on-chip.Network-on-chip (-NetworkOnChip, NoC) technology is accessed with its support simultaneously, reliability is high, reusability high is considered to more desirable extensive CMP interconnection technique.Network-on-chip overcomes the shortcoming of bus structure poor expandability, is to provide a kind of feasible SOC (system on a chip) communication mechanism 1,000,000,000 transistor epoch.Network-on-chip, except connecting more IP assembly, compared with bus structure, also has the features such as high reusability.
In system-on-chip designs, reusability is an important principle of design.Reusability design can save design cost, improves the reliability of design, shortens the market periods of product.Based in the system-on-chip designs of bus, each IP assembly is reused, but communication structure cannot be reused.Each design needs to redesign communication structure.In network-on-chip, except each assembly is reusable, the Communications service on Communication structure and sheet is also reusable.When designing new system, original system is added router and new functional part just passable, former design obtains reuses, and greatly accelerates the progress of design.Simultaneously, network-on-chip also has the feature of low-power consumption, it adopts the design of Global Asynchronous, local synchronization, communication modes end to end, the assembly participating in communication is only had to be activate, avoid in bus structure the power wastage adopting broadcast mode to carry out the system that communication causes, therefore greatly reduce the power consumption of system.
In network-on-chip, provide abundant computational resource, realize the parallel of multitask, this has just needed scheduling, the management of multitask, especially maps.How will duty mapping to the processor core of network-on-chip be very important problem, and first this depend on how to divide multitask set.Carry out in the mode dividing task image traditionally, very consuming time, and owing to being np complete problem, optimum solution can only be sought with the algorithm of complexity.
Summary of the invention
The present invention is intended to overcome prior art defect, and object is to provide a kind of multitask set partitioning method based on connection features, and the method can improve the division efficiency of multitask set.
For achieving the above object, the step of the technical solution used in the present invention is:
Step 1, set up multi task model
For multitask, set up multi task model G (T, P, Q), wherein:
T is the set of task, T={t
0, t
1..., t
m.
P is p
ijset, p
ij=1 represents task t
iwith task t
jbetween there is correspondence, p
ij=0 represents task t
iwith task t
jbetween there is not correspondence.
Q is q
ijset, q
ij=1 represents task t
iwith task t
jbetween there is not correspondence, but by task t
iand the correspondence between other tasks and by task t
jand the correspondence between other tasks, task t
iwith task t
jcan be connected.
The attribute that multi task model G (T, P, Q) has is:
D (q
ij) be connected relation q
ijattribute, represent task t
iwith task t
jbetween connection required for the task quantity of process.
W
ijtask t
iattribute, w
ijexpression task t
iwith task t
jbetween the traffic, W is w
ijset.
L
itask t
iattribute, represent with task t
ithere is the quantity of the task of correspondence.
H
itask t
iattribute, represent task t
iall traffic sums.
Step 2, calculate the connection features factor θ of each task
i
Task t
iconnection features factor θ
ifor:
θ
i=L
i×lg(H
i)(1)
Then to all tasks according to connection features factor θ
isize carry out descending sort, form multitask set T '; In sequencer procedure, if multiple task has the connection features factor of formed objects, then carry out descending sort according to the sequence number size of multiple task.
Step 3, set up task t
iassociated task set
For the task t in multitask set T
i, task t
iassociated task S set
ifor with task t
ithere is the set of all tasks of correspondence or connected relation.For associated task S set
iin with task t
ithere is the task t of correspondence
j, S
i(t
j)=0; For associated task S set
iin with task t
ithere is the task t of connected relation
j, S
i(t
j)=D (q
ij).
Wherein, S
i(t
j) be task t
iwith task t
jbetween association required for the task quantity of process; If S
i(t
j)=0, represents task t
iwith task t
jbetween association required for the task quantity of process be 0; If S
i(t
j)=D (q
ij), represent task t
iwith task t
jbetween association required for the task quantity of process be D (q
ij).
Step 4, by task relation integration Si, multitask set T to be divided
According to task t
irelevance, to multitask set T according to task t
ibetween association divide, be divided into g each other without any the set V of association
1, V
2..., V
g.Concrete steps are:
Step 4.1, for task t
0, by task t
0and S set
0in all tasks join set V
1in the middle of.
Step 4.2, for not set V
1in task t
i, by task t
iand S set
iin all tasks join set V
2in the middle of.
Step 4.3, for not set V
1with set V
2in task t
j, by task t
jand S set
jin all tasks join set V
3in the middle of.
Step 4.4, when to proceed to kth step according to step 4.1, step 4.2 and step 4.3, for not at set V
1, V
2... V
k-1in task t
c, by task t
cand S set
cin all tasks join set V
kin the middle of; Until complete g step, multitask set T is divided into set V
1, V
2..., V
g.
Step 5, according to connection features factor θ
icarry out multitask set division
For the set V generated in step 4
1, V
2..., V
gfurther divide, concrete steps are:
Step 5.1, arrange converging factor I, I is 0 or natural number.
Step 5.2, for set V
1, V
2..., V
gin one set V
i, for gathering V
iin and multitask set T ' sort first task t
x, according to the sequence in multitask set T ', check task t
xwith task t in multitask set T '
ybetween connected relation; If S
x(t
y) <I, then by task t
yfrom set V
imiddle removal, sets up set V
g+1, and by task t
yadd set V
i'.
Step 5.3, to all set V
i', all operate according to step 5.1 and step 5.2, generate until no longer include new set; Wherein each when operating according to step 5.1, need converging factor I be reset.
Step 5.4, for only having a task t
iset, pass through p
ijfind the task t that corresponding mission number is minimum
jthe set at place, by task t
ithe set at place and task t
jthe set at place merges, and division completes.
Owing to adopting technique scheme, present invention utilizes the correspondence between multitask and the traffic, calculate the connection features factor, and with the connection features factor, multitask is divided, realize the quick division of multitask from new angle, improve the efficiency of division.The present invention compared with prior art, has following good effect:
(1) high efficiency.Often can support a large amount of tasks in network-on-chip, due to task One's name is legion, how carry out the division of set of tasks, thus support that mapping efficiently, reaching effective utilization of network-on-chip is the problem needing to solve.In the present invention, carry out the division of multitask with the connection features factor, decrease the complexity of division methods, improve the speed of division, therefore there is higher efficiency.
(2) practicality.In existing task division, most method of complexity that all adopts realizes, although can reach certain effect of optimization, because method is complicated, is often faced with the problem of various reality when realizing.In the present invention, decrease the dependence to condition, thus the complexity of the method that reduces when realizing, thus there is very strong practicality.
Therefore, the present invention is applicable to the division multiple task being carried out to set of tasks, takes full advantage of the connection between multiple task and correspondence, fast and effectively multiple task division can be become different set.For multiple task management, multi-task scheduling and multitask mapping etc. provide basic multitask to divide set, the efficiency improving management, scheduling and map.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described, the restriction not to its protection domain.
A kind of multitask set partitioning method based on connection features.The step of the method is as shown in Figure 1:
Step 1, set up multi task model
For multitask, set up multi task model G (T, P, Q), wherein:
T is the set of task, T={t
0, t
1..., t
m.
P is p
ijset, p
ij=1 represents task t
iwith task t
jbetween there is correspondence, p
ij=0 represents task t
iwith task t
jbetween there is not correspondence.
Q is q
ijset, q
ij=1 represents task t
iwith task t
jbetween there is not correspondence, but by task t
iand the correspondence between other tasks and by task t
jand the correspondence between other tasks, task t
iwith task t
jcan be connected.
The attribute that multi task model G (T, P, Q) has is:
D (q
ij) be connected relation q
ijattribute, represent task t
iwith task t
jbetween connection required for the task quantity of process.
W
ijtask t
iattribute, w
ijexpression task t
iwith task t
jbetween the traffic, W is w
ijset.
L
itask t
iattribute, represent with task t
ithere is the quantity of the task of correspondence.
H
itask t
iattribute, represent task t
iall traffic sums.
For the set of tasks with 11 tasks, its multi task model G (T, P, Q) is as follows:
T={t
0,t
1,t
2,t
3,t
4,t
5,t
6,t
7,t
8,t
9,t
10}。
P, Q, W as shown in Figure 2, p
ij=1 represents two task t
iand t
jbetween have line to exist, p
ij=0 represents two task t
iand t
jbetween there is no line; Two task t
iand t
jbetween line on numeral w
ij; If there is line between any two tasks these two tasks to be linked together, then these two tasks are communicated with.
L
ibe worth as shown in table 1:
The L of table 1 task
ivalue
|
t
0 |
t
1 |
t
2 |
t
3 |
t
4 |
t
5 |
t
6 |
t
7 |
t
8 |
t
9 |
t
10 |
L
i |
4 |
3 |
2 |
2 |
2 |
3 |
2 |
2 |
3 |
4 |
3 |
Hi value is as shown in table 2:
The H of table 2 task
ivalue
|
t
0 |
t
1 |
t
2 |
t
3 |
t
4 |
t
5 |
t
6 |
t
7 |
t
8 |
t
9 |
t
10 |
H
i |
900 |
630 |
500 |
430 |
430 |
780 |
560 |
420 |
650 |
670 |
410 |
Step 2, calculate the connection features factor θ of each task
i
Task t
iconnection features factor θ
i:
θ
i=L
i×lg(H
i)(1)
Then to all tasks according to connection features factor θ
isize carry out descending sort, form multitask set T '; In sequencer procedure, if two tasks have the connection features factor of formed objects, then carry out descending sort according to the sequence number size of multiple task.
For the aforementioned multitask set T={t with 11 tasks
0, t
1, t
2, t
3, t
4, t
5, t
6, t
7, t
8, t
9, t
10,
The connection features factor calculating 11 tasks according to table 1 and table 2 is as shown in table 3:
The connection features factor θ of table 3 task
i
|
t
0 |
t
1 |
t
2 |
t
3 |
t
4 |
t
5 |
t
6 |
t
7 |
t
8 |
t
9 |
t
10 |
θ
i |
11.817 |
8.398 |
5.398 |
5.267 |
5.267 |
8.676 |
5.496 |
5.246 |
8.439 |
11.304 |
7.838 |
According to connection features factor θ
isize sort after formed new set T ' be:
T’={t
0,t
9,t
5,t
8,t
1,t
10,t
6,t
2,t
3,t
4,t
7}。
Step 3, set up task t
iassociated task set
For the task t in multitask set T
i, task t
iassociated task S set
ifor with task t
ithere is the set of all tasks of correspondence or connected relation.For associated task S set
iin with task t
ithere is the task t of correspondence
j, S
i(t
j)=0; For associated task S set
iin with task t
ithere is the task t of connected relation
j, S
i(t
j)=D (q
ij).
Wherein, S
i(t
j) be task t
iwith task t
jbetween association required for the task quantity of process; If S
i(t
j)=0, represents task t
iwith task t
jbetween association required for the task quantity of process be 0; If S
i(t
j)=D (q
ij), represent task t
iwith task t
jbetween association required for the task quantity of process be D (q
ij).
For the set of tasks with 11 tasks, its multi task model G (T, P) is as follows:
T={t
0,t
1,t
2,t
3,t
4,t
5,t
6,t
7,t
8,t
9,t
10};
Then according to shown in Fig. 2, its associated task set is as shown in table 4:
The associated task set of table 4 task
Step 4, by task relation integration, multitask set to be divided
According to task t
irelevance, to multitask set T according to task t
ibetween association divide, be divided into g each other without any the set V of association
1, V
2..., V
g.Concrete steps are:
Step 4.1, for task t
0, by task t
0and S set
0in all tasks join set V
1in the middle of.
Step 4.2, for not set V
1in task t
i, by task t
iand S set
iin all tasks join set V
2in the middle of.
Step 4.3, for not set V
1with set V
2in task t
j, by task t
jand S set
jin all tasks join set V
3in the middle of.
Step 4.4, when to proceed to kth step according to step 4.1, step 4.2 and step 4.3, for not at set V
1, V
2... V
k-1in task t
c, by task t
cand S set
cin all tasks join set V
kin the middle of; Until complete g step, multitask set T is divided into set V
1, V
2..., V
g.
For the set of tasks with 11 tasks, its multi task model G (T, P) is as follows:
T={t
0,t
1,t
2,t
3,t
4,t
5,t
6,t
7,t
8,t
9,t
10}。
The set then marked off is as follows:
Step 4.1, V
1={ t
0, t
1, t
5, t
8, t
9, t
10, t
3, t
4.
Step 4.2, V
2={ t
2, t
6, t
7.
Step 5, carry out multitask set division according to the connection features factor
For the V generated in step 4
1, V
2..., V
gfurther divide, concrete steps are:
Step 5.1, arrange converging factor I, I is 0 or natural number.
Step 5.2, for set V
1, V
2..., V
gin one set V
i, for gathering V
iin and multitask set T ' sort first task t
x, according to the sequence in multitask set T ', check task t
xwith task t in multitask set T '
ybetween connected relation; If S
x(t
y) <I, then by task t
yfrom set V
imiddle removal, sets up set V
g+1, and by task t
yadd set V
i'.
Step 5.3, to all set V
i', all operate according to step 5.1 and step 5.2, generate until no longer include new set; Wherein each when operating according to step 5.1, need converging factor I be reset.
Step 5.4, for only having a task t
iset, pass through p
ijfind the task t that corresponding mission number is minimum
jthe set at place, by task t
ithe set at place and task t
jthe set at place merges, and division completes.
For the set of tasks with 11 tasks, its multi task model G (T, P) is as follows:
T={t
0,t
1,t
2,t
3,t
4,t
5,t
6,t
7,t
8,t
9,t
10}。
By step 4, the set V marked off is:
V
1={t
0,t
1,t
5,t
8,t
9,t
10,t
3,t
4}。
V
2={t
2,t
6,t
7}。
Arranging converging factor is 8, then for V
1, due to t
10, t
3, t
4in these three tasks, S
0(t
10), S
0(t
4) and S
0(t
3) be all greater than converging factor 8, then t
10, t
3, t
4be added into new set V
3.
New converging factor 5 is set again, then t
10, t
3, t
4the set V formed
3no longer adjust;
For V
2, arranging new converging factor is 5, then V
2no longer adjust;
Set after division is:
V
1={t
0,t
9,t
5,t
8,t
1}
V
2={t
2,t
6,t
7}
V
3={t
10,t
3,t
4}
This embodiment make use of correspondence between multitask and the traffic, calculates connection features factor θ
i, and with connection features factor θ
imultitask is divided, realizes the quick division of multitask from new angle, improve the efficiency of division.The present invention compared with prior art, has following good effect:
(1) high efficiency.Often can support a large amount of tasks in network-on-chip, due to task One's name is legion, how carry out the division of set of tasks, thus support that mapping efficiently, reaching effective utilization of network-on-chip is the problem needing to solve.In the present invention, with connection features factor θ
icarry out the division of multitask, decrease the complexity of division methods, improve the speed of division, therefore there is higher efficiency;
(2) practicality.In existing task division, most method of complexity that all adopts realizes, although can reach certain effect of optimization, because method is complicated, is often faced with the problem of various reality when realizing.In the present invention, decrease the dependence to condition, thus the complexity of the method that reduces when realizing, thus there is very strong practicality.
Therefore, the present invention is applicable to the division multiple task being carried out to set of tasks, takes full advantage of the connection between multiple task and correspondence, fast and effectively multiple task division can be become different set.For multiple task management, multi-task scheduling and multitask mapping etc. provide basic multitask to divide set, the efficiency improving management, scheduling and map.