CN103744735B - The dispatching method and device of a kind of multi-core resource - Google Patents

The dispatching method and device of a kind of multi-core resource Download PDF

Info

Publication number
CN103744735B
CN103744735B CN201410009967.6A CN201410009967A CN103744735B CN 103744735 B CN103744735 B CN 103744735B CN 201410009967 A CN201410009967 A CN 201410009967A CN 103744735 B CN103744735 B CN 103744735B
Authority
CN
China
Prior art keywords
core
function
queue
flow line
line stage
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.)
Active
Application number
CN201410009967.6A
Other languages
Chinese (zh)
Other versions
CN103744735A (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.)
Ruijie Networks Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN201410009967.6A priority Critical patent/CN103744735B/en
Publication of CN103744735A publication Critical patent/CN103744735A/en
Application granted granted Critical
Publication of CN103744735B publication Critical patent/CN103744735B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiments of the invention provide a kind of dispatching method of multi-core resource and device, this method is applied in the multiple nucleus system for including a management core and multiple function cores, and this management core performs following flows:The load information sent according to the function core of each flow line stage received according to predetermined period, and each function check figure of flow line stage, it is determined that the load condition of the function core of each flow line stage;If it is determined that the load condition of any function core of any flow line stage is overload status, selects after the first function core for setting number, be added in any flow line stage from the default first ready core queue.Management core in the present invention, to dispatch nuclear resource, can improve the business processing efficiency of system according to the loading condition of correlation function core.

Description

The dispatching method and device of a kind of multi-core resource
Technical field
The present invention relates to the dispatching method and device of communication technical field, more particularly to a kind of multi-core resource.
Background technology
With the intensification of social informatization degree, people are more and more stronger to the dependence of internet, are connected on network Computer node is also in the growth of level numerical expression.The data exchange node that network equipment etc. is interconnected as computer, its data forwarding Performance determines the quality of whole network.The sharp increase of number and the appearance of various bandwidth applications, dominant frequency are connected with user The limited monokaryon system of lifting is increasingly difficult to meet the performance requirement of high-speed data forwarding, and multiple nucleus system by its it is relatively low into This expandability and parallel computation characteristic, is gradually used widely in network communication field.
So-called multiple nucleus system, refer on a hardware chip integrated multiple core processors (Core-CPU, referred to as Core system), typically shared drive formula structure.That is, multiple nucleus system possesses relatively independent multiple process cores, can To be performed in parallel the handling process such as being forwarded message, and then improve the overall throughput of multiple nucleus system.
Specifically, when handling message forwarding process using multiple nucleus system, in order to improve process performance, generally using flowing water Ray mode is handled, and entirely will be divided into multiple flow line stages by message repeating process, such as message receive the stage, two layers Up processing stage, routing forwarding stage, two layers of downlink processing stage and message transmission phase.So, for each streamline Nuclear resource used in stage, is allocated typically by following two ways at present:
First way, fixed allocation nuclear resource, that is, according to the actual demand of the related service of multiple nucleus system, is set in advance The nuclear resource of each flow line stage, use ratio is set in advance, for example, including Core0~Core7 multinuclear for one System is said, it is assumed that according to practical business demand, it is necessary to by the nuclear resource of each flow line stage according to 1:1:3:1:1 ratio is entered Row distribution, for example, be specifically allocated as follows:Core0 is set as management core, and CORE1 is responsible for message and receives the stage, and CORE2 is responsible for two layers Up processing stage, CORE3, CORE4 and CORE5 are collectively responsible for the routing forwarding stage, and CORE6 is responsible for two layers of downlink processing rank Section, CORE7 is responsible for message transmission phase, so, and the flow line stage that these follow-up verifications are each distributed is carried out at related service Reason;
The second way, distributes nuclear resource unitedly, i.e., select a core as management core in multiple nucleus system, other cores are made For function core, task queue is responsible for by management core, each flow line stage can be carried out priority division by the management core, be made The priority of corresponding processing stage in the backward in same streamline is obtained higher, to avoid because hardware resource is not enough and needs handle The idle work that the packet loss that the previous processed stage has performed is made so that the correspondence same treatment stage is excellent in different streamlines First level is identical, follow-up the indicating some flow line stage in function core active request task queue of the task, and in functional core When asking inter-related task, task queue is locked, waits this function core to ask the receiving other function cores again of the task please Ask.
As can be seen that if using first way in the mode for distributing resource from above two, each process cores Only one flow line stage is only involved in, so in each streamline or unbalanced same streamline center resource allocation, Just occur that a part of core is extremely busy, another part core is but very idle, easily causes system bottleneck, causes at the business of multiple nucleus system Reason is less efficient;If using the second way, in the case of there is a plurality of streamline in task queue, if some Core is handling a part of streamline, and task queue is in locking state, and other function cores need to wait the long period to perform Another part streamline, causes the business processing efficiency of multiple nucleus system still relatively low.
The content of the invention
The embodiments of the invention provide a kind of dispatching method of multi-core resource and device, to solve existing multi-core resource The method of salary distribution causes the problem of business processing of multiple nucleus system is less efficient.
Based on above mentioned problem, a kind of dispatching method of multi-core resource provided in an embodiment of the present invention, this method is applied to bag In the multiple nucleus system for including a management core and multiple function cores, this method includes:
The load that the management core is sent according to the function core of each flow line stage received according to predetermined period is believed Breath, and each flow line stage function check figure, determine the load condition of the function core of each flow line stage;
If it is determined that the load condition of any function core of any flow line stage is overload status, from default the Selection first is set after the function core of number in one ready core queue, is added in any flow line stage, described first Ready core queue be itself sent according to the function core of any flow line stage load information, any streamline rank The function check figure of the map program of any flow line stage is not loaded in the function check figure of section and default spare core queue, Loaded to including the function core of the map program the default second ready core queue be updated after obtain.
A kind of dispatching device of multi-core resource provided in an embodiment of the present invention, described device is located in multiple nucleus system, and institute Stating multiple nucleus system also includes multiple function cores, and the device includes:
Receiving module, for receiving the load information that the function core of each flow line stage is sent according to predetermined period;
Determining module, for the load information received according to the receiving module, and each flow line stage Function check figure, determines the load condition of the function core of each flow line stage;
Selecting module, the load condition of any function core for determining any flow line stage in the determining module For overload status, the first function core for setting number, the first ready core are selected from the default first ready core queue Queue is load information, the work(of any flow line stage itself sent according to the function core of any flow line stage The function check figure of the map program of any flow line stage can not be loaded in check figure and default spare core queue, to including What the default second ready core queue for having the function core for having loaded the map program was obtained after being updated;
Add module, for the function core for selecting the selecting module, is added in any flow line stage.
The beneficial effect of the embodiment of the present invention includes:
The dispatching method and device of a kind of multi-core resource provided in an embodiment of the present invention, this method are applied to include one In the multiple nucleus system of management core and multiple function cores, this management core performs following flows:According to each streamline rank received The load information that the function core of section is sent according to predetermined period, and each function check figure of flow line stage, it is determined that each flowing water The load condition of the function core in line stage;If it is determined that the load condition of any function core of any flow line stage is super negative Load state, selects after the first function core for setting number from the default first ready core queue, is added to any streamline rank Duan Zhong.In embodiments of the present invention, management core can report related load according to the function nuclear periodicity of each flow line stage Information, and each flow line stage function check figure, to determine the function core loading condition of each flow line stage, so, It is that its scheduling has loaded the function core of related map program in the case of determining function core heavier loads, substantially increases and be The business processing efficiency of system.
Brief description of the drawings
Fig. 1 is the flow chart of the dispatching method of multi-core resource provided in an embodiment of the present invention;
Fig. 2 is the flow of the load condition for the function core that management core provided in an embodiment of the present invention determines each flow line stage Figure;
Fig. 3 is the flow chart that management core provided in an embodiment of the present invention is updated to spare core queue;
Fig. 4 is the structural representation of the dispatching device of multi-core resource provided in an embodiment of the present invention.
Embodiment
With reference to Figure of description, dispatching method and device to a kind of multi-core resource provided in an embodiment of the present invention Embodiment is illustrated.
A kind of dispatching method of multi-core resource provided in an embodiment of the present invention, this method is applied to include a management core In the multiple nucleus system of multiple function cores, as shown in figure 1, this method specifically includes following steps:
S11:The load that management core is sent according to the function core of each flow line stage received according to predetermined period is believed Breath, and each function check figure of flow line stage, it is determined that the load condition of the function core of each flow line stage;
S12:If it is determined that the load condition of any function core of any flow line stage is overload status, from default The first ready core queue in selection first set number function core after, be added in any flow line stage.
In embodiments of the present invention, for management core, following flows be can also carry out:Determining any streamline rank The load condition of any function core of section is low-load state, then stops the operation of any function core of any flow line stage Afterwards, it is added in the first ready core queue.
That is, when the function core load of some flow line stage is relatively light, management core can stop the function core On the inter-related task that is currently running, it is without any processing to its existing load, be simply set to resting state, be added to In first ready core queue, now, the coherent video program loaded on the function core is not unloaded, to cause the work( Can core be temporarily in a dormant state, to be further continued for being operated when follow-up nuclear resource is nervous.
Specifically, in above-mentioned steps S11, predetermined period can be according to the actual motion feelings of the function core of each flow line stage Condition determines that for example predetermined period is 60 seconds, it is of course also possible to be other numerical value.
Further, in above-mentioned steps S11, for each flow line stage, it is responsible for this flow line stage Function core may have multiple, it is also possible to only one, then, in the case where the function core of each flow line stage is multiple, Management core can specifically determine the load condition (as shown in Figure 2) of the function core of each flow line stage by following step:
S21:According to the nuclear resource utilization rate and function check figure of each flow line stage, the core of each flow line stage is calculated Resource redundancy angle value;
Herein, the nuclear resource utilization rate of above-mentioned each flow line stage, is the CPU of the function core of each flow line stage Average occupancy, the CPU usage of each function core is that the network flow statistic that respective basis is monitored goes out;
S22:Judge whether each nuclear resource redundancy angle value calculated is not less than the first given threshold respectively;If so, holding Row step S23;Otherwise, step S24 is performed;
S23:Judge whether the average occupancies of CPU of the function core of each flow line stage are not more than the first setting percentage Than;If so, performing step S25;Otherwise, step S24 is performed;
S24:Judge the CPU highests occupancy of function core of each flow line stage whether not less than the second setting percentage Than;If so, performing step S26;Otherwise, step S27 is performed;
S25:The load condition of the minimum function core of CPU usage in corresponding function core is defined as low-load state;
S26:The load condition of corresponding function core is defined as overload status;
S27:The load condition of corresponding function core is defined as normal load state.
It should be noted that for when the function core of each flow line stage is only one, management core determines corresponding function The flow of the load condition of core is similar with above-mentioned flow, different, is calculating the nuclear resource redundancy angle value of the function core When, the nuclear resource utilization rate of use is the CPU usage of the function core.
Preferably, in above-mentioned steps S21, management core can specifically utilize following formula D=R × (1-C), and calculating obtains every The nuclear resource redundancy angle value of individual flow line stage, wherein, D is the nuclear resource redundancy angle value of each flow line stage, and R is each stream The function check figure of last pipeline stages, C is the nuclear resource utilization rate of each flow line stage.
It should be noted that above-mentioned nuclear resource redundancy angle value, the function core actually for characterizing flow line stage The overall parameter using redundancy condition, its value is higher, just represent corresponding flow line stage function core overall redundancy compared with Many, still, this low-load function core being not meant on this flow line stage is more, is primarily due to public by above-mentioned calculating The limitation of formula, i.e., in the case where the function core of this flow line stage is more, what the C in above-mentioned formula was represented is these function cores The average occupancies of CPU, so, although the nuclear resource redundancy angle value calculated is higher, but averagely arrive each function core it Afterwards, possible some function cores are still in the higher state of load.
Herein, the nuclear resource redundancy angle value of each flow line stage why is calculated, primarily to by each The degree of redundancy of the function core of flow line stage, does entry evaluation, so as to root come the load of the function core to each flow line stage According to entry evaluation result and follow-up related decision condition, the actual loading shape of the function core of each flow line stage is accurately determined out State, the related scheduling of nuclear resource, Jin Erti are completed to realize according to the actual loading situation of the function core of each flow line stage The business processing efficiency of high system.
Preferably, in above-mentioned steps S22, above-mentioned first given threshold can be according to the reality of the function core of each flow line stage Border running situation is determined, for example, above-mentioned first given threshold is set as 1.5, it is of course also possible to be set as other numerical value.
Preferably, in above-mentioned steps S23, above-mentioned first setting percentage is to determine low-load function core for characterizing Parameter, can still be determined according to the practical operation situation of the function core of each flow line stage, for example, the first setting percentage can be set It is set to 80%, it is of course also possible to be set as other numerical value.
Preferably, in above-mentioned steps S24, above-mentioned second setting percentage is to determine overburden function core for characterizing Parameter, can still be determined according to the practical operation situation of the function core of each flow line stage, in this case, and above-mentioned second sets Determine percentage and be typically larger than above-mentioned first setting percentage, for example, the second setting percentage may be set to 95%, it is of course also possible to It is set as other numerical value.
Specifically, in above-mentioned steps S12, above-mentioned first ready core queue, actually management core is according to any flowing water Do not add in load information, the function check figure of any flow line stage and default spare core queue that the function core in line stage is sent The function check figure of the map program of any flow line stage is carried, default the of the function core of map program has been loaded to including What two ready core queues were obtained after being updated.
That is, in embodiments of the present invention, management core is in order to realizing the function according to each flow line stage The related load situation of core, is scheduled to the function core of each flow line stage, to improve the business processing efficiency of system, Management core side has been pre-configured with the ready core queue and spare core queue of each flow line stage, and each ready core queue is by The queue of the function core composition of corresponding map program was loaded, each spare core queue is the work(by not loading corresponding map program The queue of energy core composition, so, the related load that this follow-up management core is reported in the function core for receiving each flow line stage After information, the nuclear resource in ready core queue can be estimated according to above-mentioned parameter information, and carried out according to assessment result Corresponding adjustment, so, can in the case of the heavier loads of some function core so as to the follow-up scheduling for carrying out related nuclear resource The function core in ready core queue is directly waken up, related loading is carried out without the function core to not any map program, more enters Improve to one step the efficiency of system processing business.
Further, for management core, the first ready core queue can be specifically obtained by following flows:Utilize formula D=R × (1-C), calculates the nuclear resource redundancy angle value for taking office pipeline stage, and judge whether it is not more than the second setting Threshold value;When being judged as YES, the function check figure of function check figure, any flow line stage in spare core queue and second set Determine number, spare core queue is updated;When being judged as NO, according to the nuclear resource utilization rate of any flow line stage, standby With the function check figure in core queue, the function check figure of any flow line stage and the second setting number, spare core queue is carried out Update;According to the function check figure in the spare core queue after renewal, first is obtained just after being updated to the second ready core queue Thread core queue.
It should be noted that management core mainly uses above-mentioned nuclear resource redundancy angle value to the function core in spare core queue Just successive step is carried out, so that the follow-up function core with ready core queue is compared, and is further adjusted according to comparative result Function core in ready core queue, and then preferably adjust the function core of some flow line stage so that can be with efficient place Reason business, based on such a situation, usual second given threshold is smaller than the first given threshold, for example, the second given threshold is set as 0.5, it is of course also possible to be set as other numerical value.
Further, in embodiments of the present invention, as shown in figure 3, management core can be especially by following step realization pair The renewal of spare core queue:
S31:Management core judges whether the nuclear resource redundancy angle value of any flow line stage is not more than the second given threshold;If It is to perform step S32, otherwise, performs step S33;
S32:Judge the function check figure in spare core queue whether not less than the 3rd setting number;If so, performing step S34, otherwise, performs step S35;
S33:Judge the nuclear resource utilization rate of any flow line stage whether not less than the 3rd setting percentage;If so, holding Row step S32;Otherwise, step S34 is performed;
S34:Judge whether the function check figure of any flow line stage and function check figure sum in spare core queue are little Number is set in second;If so, performing step S36, otherwise, step S37 is performed;
S35:The function core of the 4th setting number is added into spare core queue;
S36:Function core is added into spare core queue, so that the function check figure and second in the spare core queue after addition Set number identical, and regard the spare core queue after addition as the spare core queue after renewal;
S37:It regard spare core queue as the spare core queue after renewal;
S38:Judge the function check figure and the function check figure sum in the spare core queue after addition of any flow line stage Whether second setting number is not more than;If so, performing step S39;Otherwise, step S37 is performed;
S39:Addition function core is into spare core queue again, so that the function core in the spare core queue after addition again Number with second setting number it is identical, and using again add after spare core queue as after renewal spare core queue add after Spare core queue is used as the spare core queue after renewal.
It should be noted that in embodiments of the present invention, for management core, why needing execution above-mentioned a series of The step of, primarily to can be by the degree of redundancy of the function core of any of the above-described flow line stage, tentatively to standby queue In function core be adjusted, so, subsequently can be further according to the function check figure in standby queue, in the second ready queue Function core be adjusted, during heavier loads to cause the function core of follow-up any of the above-described flow line stage, related ready team The nuclear resource for having abundance in row can be scheduled, so as to improve the business processing efficiency of system.
Further, after management core has performed above-mentioned a series of step, that is, the spare core queue after being updated Afterwards, the first ready core queue can be obtained especially by following flows:By the function check figure in the spare core queue after renewal with Function check figure in second ready core queue is compared, when the function check figure for comparing both is identical, by the second ready core Queue is used as the first ready core queue;Compare the former function check figure be more than the latter function check figure when, from spare core team Selection the 5th sets the function core of number in row, and the function core selected is carried out after the loading of map program, is added to the In two ready core queues, and it regard the second ready core queue after addition as the first ready core queue;Comparing the former work( When energy check figure is less than the function check figure of the latter, the 6th function core for setting number is selected from the second ready core queue, and to choosing The function core selected out carries out the unloading of map program, and regard the second ready core queue after unloading as the first ready core queue. So, the function check figure that management core can be in spare core queue, it is appropriate that the function check figure in the second ready core queue is carried out Adjustment, so as to the follow-up scheduling for carrying out nuclear resource.
It should be noted that in embodiments of the present invention, above-mentioned first setting number, the second setting number, the 3rd setting Number, the 4th setting number, the 5th setting number, the 6th setting number and the 3rd setting percentage can be according to each streamline ranks The practical operation situation of the function core of section determines that these foregoing setting numbers can be set as identical numerical value, can also set For different numerical value;Such as the 3rd setting percentage still may be set to 80%, it is of course also possible to be other numerical value.
The dispatching method of above-mentioned multi-core resource is described in detail with reference to specific embodiment:
Assuming that management core is handling IP messages, function core 1, the and of function core 2 that message receives flow line stage are received The CPU usage that function core 3 is sent, respectively 75%, 80% and 96%;Assuming that the function check figure in spare core queue is 2, the One sets number as 3, and second sets number as 6, and the 3rd sets number as 1, and the 5th sets number as 2, and second just Function check figure in thread core queue is 3, and the first given threshold is 1.5, and the second given threshold is 0.5, the second setting percentage For 95%, the 3rd sets percentage as 80%.
So, management core can first calculate this message and receive flowing water after the CPU usage that this 3 cores are sent is received The nuclear resource redundancy value (i.e. 0.48) in line stage, it is seen then that this nuclear resource redundancy value is less than 0.5, then the CPU of 3 function cores is put down Equal occupancy (i.e. 83.7%) is compared with 80%, show that 83.7% is greater than 80%, then compare the function in spare core queue Check figure and the 3rd setting number, show that the function check figure (i.e. 2) in spare core queue is greater than the 3rd setting number (i.e. 1) , now, then by the function check figure in spare core queue and the function check figure sum (i.e. 5) in reception processing stage, with second Setting number (i.e. 6) is compared, draw function check figure in spare core queue and the function check figure in reception processing stage it With less than the second setting number, in this case, added into spare core queue in One function core, i.e. spare core queue Function core is currently 6.
Afterwards, then by this 6 function cores it is compared, draws with the function check figure (i.e. 3) in the second ready core queue The function check figure in spare core queue after renewal is greater than the function check figure in the second ready core queue, at this moment, from 6 work( 2 function cores can be selected in check figure, the loading that message receives the map program of flow line stage is carried out to it, be then added to the In two ready core queues, now, the first ready core queue is the second ready core queue (i.e. current first ready core after updating There are 6 function cores in queue).
Next, being again compared nuclear resource redundancy angle value (i.e. 0.48) with the first given threshold (i.e. 1.5), core is drawn Resource redundancy angle value is less than the first given threshold, determines whether that highest CPU usage (i.e. 96%) is in this 3 function cores It is no to be more than the second setting percentage (i.e. 95%), show that function core 3 is in overload status, at this moment, from the first ready core queue Selection 3 is added to message and receives flow line stage, that is, this 3 function cores selected is waken up, according to function nuclear state Judge, nuclear resource is dispatched in time, improve the treatment effeciency that message receives flow line stage.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of dispatching device of multi-core resource, due to the dress The principle for putting solved problem is similar to the dispatching method of foregoing multi-core resource, therefore the implementation of the device may refer to foregoing side The implementation of method, repeats part and repeats no more.
A kind of dispatching device of multi-core resource provided in an embodiment of the present invention, the device is located in multiple nucleus system, and multinuclear System also includes multiple function cores, as shown in figure 4, the device is specifically included:
Receiving module 41, for receiving the load information that the function core of each flow line stage is sent according to predetermined period;
Determining module 42, for the load information received according to receiving module 41, and each function of flow line stage Check figure, it is determined that the load condition of the function core of each flow line stage;
Selecting module 43, the load condition of any function core for determining any flow line stage in determining module 42 For overload status, the first function core for setting number is selected from the default first ready core queue;
Herein, the above-mentioned first ready core queue is that the load that device is sent according to the function core of any flow line stage is believed The map program of any flow line stage is not loaded in breath, the function check figure of any flow line stage and default spare core queue Function check figure, loaded to including the function core of map program the default second ready core queue be updated after obtain 's;
Add module 44, for the function core for selecting selecting module 43, is added in any flow line stage.
Preferably, said apparatus, in addition to stopping modular 45,
Above-mentioned stopping modular 45, the load of any function core for determining any flow line stage in determining module 42 When state is low-load state, stop the operation of any function core of any flow line stage;
Above-mentioned add module 44, is additionally operable to stop in stopping modular 45 operation of any function core of any flow line stage Afterwards, it is added in the first ready core queue.
Preferably, above-mentioned determining module 42, specifically for the nuclear resource utilization rate and function according to each flow line stage Check figure, calculates the nuclear resource redundancy angle value of each flow line stage of correspondence;In each nuclear resource redundancy for judging to calculate When value is not less than the first given threshold, it is determined that the function core of each flow line stage is multiple, and corresponding function core is judged Whether the average occupancies of CPU are not more than the first setting percentage, when being judged as YES, by CPU usage in corresponding function core The load condition of minimum function core is defined as low-load state;It is being judged as NO, and in the function core of each flow line stage Exist CPU usage not less than second setting percentage function core when, the load condition of corresponding function core is defined as surpassing Load condition;When each nuclear resource redundancy angle value for judging to calculate is less than the first given threshold, in each streamline rank The function core of section for one and corresponding CPU usage not less than the second setting percentage when, by the load of corresponding function core State is defined as overload status;It is multiple and there is CPU usage not less than second in the function core of each flow line stage When setting the function core of percentage, the load condition of corresponding function core is defined as overload status;
Herein, the nuclear resource utilization rate of above-mentioned each flow line stage is only one for the function core of each flow line stage When individual, the CPU usage of corresponding function core, or when being that the function core of each flow line stage is multiple, corresponding function core The average occupancies of CPU.
Preferably, above-mentioned determining module 42, specifically for by following formula D=R × (1-C), calculating obtains each flowing water The nuclear resource redundancy angle value in line stage, wherein, D is the nuclear resource redundancy angle value of each flow line stage, and R is each streamline rank The function check figure of section, C is the nuclear resource utilization rate of each flow line stage.
Preferably, said apparatus, in addition to:
Update module 46, for judging whether the nuclear resource redundancy angle value of any flow line stage is not more than the second setting threshold Value;When being judged as YES, the function check figure of function check figure, any flow line stage in spare core queue and the second setting Number, is updated to spare core queue;When being judged as NO, according to the nuclear resource utilization rate of any flow line stage, standby The function check figure of function check figure, any flow line stage in core queue and the second setting number, are carried out more to spare core queue Newly;And the function check figure in the spare core queue after renewal, the second ready core queue is updated, first is obtained just Thread core queue.Herein, above-mentioned second given threshold is less than the first given threshold.
Preferably, above-mentioned update module 46, specifically for performing following assigned operations:Judge the function in spare core queue Whether check figure is not less than the 3rd setting number;If so, judge the function check figure of any flow line stage with spare core queue Whether function check figure sum is not more than the second setting number, when being judged as YES, and adds function core into spare core queue, so that The function check figure in spare core queue after addition is identical with the second setting number, and using the spare core queue after addition as more Spare core queue after new;When being judged as NO, spare core queue is regard as the spare core queue after renewal;Otherwise, addition the The function core of four setting numbers is and standby after judging the function check figure of any flow line stage and adding into spare core queue Whether function check figure sum in core queue is not more than the second setting number, when being judged as YES, and function core is added again to standby With in core queue, so that the function check figure in the spare core queue after addition is identical with the second setting number again;It is being judged as When no, spare core queue is regard as the spare core queue after renewal;Judge any flow line stage nuclear resource utilization rate whether Not less than the 3rd setting percentage, and when being judged as YES, perform assigned operation;When being judged as NO, any streamline is judged Whether the function check figure in stage is not more than the second setting number with the function check figure sum in spare core queue, is being judged as YES When, function core is added into spare core queue, so that function check figure and the second setting number in the spare core queue after addition It is identical, and it regard the spare core queue after addition as the spare core queue after renewal;When being judged as NO, spare core queue is made For the spare core queue after renewal;Function check figure in the spare core queue after updating is compared, with the second ready core queue In function check figure it is identical when, regard the second ready core queue as the first ready core queue;Comparing the spare core after updating Function check figure in queue, during more than function check figure in the second ready core queue, selects the 4th to set from spare core queue The function core of number, and the function core selected is carried out after the loading of map program, it is added in the second ready core queue, and It regard the second ready core queue after addition as the first ready core queue;And in the spare core queue after updating is compared Function check figure, during less than function check figure in the second ready core queue, selects the 5th to set number from the second ready core queue Function core, and carry out the unloading of map program to the function core selected, and using the second ready core queue after unloading as First ready core queue.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (12)

1. a kind of dispatching method of multi-core resource, it is characterised in that this method is applied to include a management core and multiple work( In the multiple nucleus system of energy core, this method includes:
The load information that the management core is sent according to the function core of each flow line stage received according to predetermined period, and The function check figure of each flow line stage, determines the load condition of the function core of each flow line stage;
If it is determined that the load condition of any function core of any flow line stage is overload status, from default first just Selection first is set after the function core of number in thread core queue, is added in any flow line stage, described first is ready Core queue is load information, any flow line stage itself sent according to the function core of any flow line stage The function check figure of the map program of any flow line stage is not loaded in function check figure and default spare core queue, to bag Include the function core for having loaded the map program the default second ready core queue be updated after obtain.
2. the method as described in claim 1, it is characterised in that also include:
If the management core determines that the load condition of any function core of any flow line stage is low-load state, stop Only after the operation of any function core of any flow line stage, it is added in the described first ready core queue.
3. method as claimed in claim 1 or 2, it is characterised in that the management core is determined described each by following manner The load condition of the function core of flow line stage:
According to the nuclear resource utilization rate and function check figure of each flow line stage, correspondence each flow line stage is calculated Nuclear resource redundancy angle value, the nuclear resource utilization rate of each flow line stage is the function core of each flow line stage At only one, the CPU usage of corresponding function core, or when being that the function core of each flow line stage is multiple, it is right Answer the average occupancies of CPU of function core;
Judge whether each nuclear resource redundancy angle value calculated is not less than the first given threshold respectively;
If so, the function core for determining each flow line stage is multiple, and judge that the CPU of corresponding function core averagely takes Whether rate is not more than the first setting percentage, when being judged as YES, by the function core that CPU usage in corresponding function core is minimum Load condition be defined as low-load state;It is being judged as NO, and is there is CPU in the function core of each flow line stage and is accounting for When setting the function core of percentage not less than second with rate, the load condition of corresponding function core is defined as overload status;
Otherwise, set in the function core of each flow line stage for one and corresponding CPU usage not less than described second When determining percentage, the load condition of corresponding function core is defined as overload status;In the work(of each flow line stage Can core for it is multiple and exist CPU usage not less than described second setting percentage function core when, by corresponding function core Load condition is defined as overload status.
4. method as claimed in claim 3, it is characterised in that the management core is by formula D=R × (1-C), and calculating is obtained The nuclear resource redundancy angle value of each flow line stage, wherein, D is the nuclear resource redundancy of each flow line stage Value, R is the function check figure of each flow line stage, and C is the nuclear resource utilization rate of each flow line stage.
5. method as claimed in claim 4, it is characterised in that it is ready that the management core obtains described first by following manner Core queue:
The management core judges whether the nuclear resource redundancy angle value of any flow line stage is not more than the second given threshold, institute The second given threshold is stated less than first given threshold;
If so, the function check figure, the function check figure of any flow line stage and second in the spare core queue are set Determine number, the spare core queue is updated;
Otherwise, it is function check figure in the nuclear resource utilization rate of any flow line stage, the spare core queue, described The function check figure of any flow line stage and the second setting number, are updated to the spare core queue;
According to the function check figure in the spare core queue after renewal, the described second ready core queue is updated, obtains described First ready core queue.
6. method as claimed in claim 5, it is characterised in that function core of the management core in the spare core queue The function check figure of several, described any flow line stage and the second setting number, are updated, specific bag to the spare core queue Include:
The management core performs following assigned operations:
Judge the function check figure in the spare core queue whether not less than the 3rd setting number;
If so, judging whether are the function check figure of any flow line stage and the function check figure sum in the spare core queue No more than described second setting number, when being judged as YES, addition function core is into the spare core queue, so that after addition Function check figure in spare core queue is identical with the described second setting number, and using the spare core queue after addition as after renewal Spare core queue;When being judged as NO, the spare core queue is regard as the spare core queue after renewal;
Otherwise, the function core of the setting of addition the 4th number is into the spare core queue, and judges any flow line stage Function check figure with addition after spare core queue in function check figure sum whether be not more than it is described second setting number, sentencing When breaking to be, function core is added again into the spare core queue, so that the function in the spare core queue after adding again Check figure is identical with the described second setting number, and regard the spare core queue after adding again as the spare core queue after renewal; When being judged as NO, the spare core queue is regard as the spare core queue after renewal;
Function core of the management core in the nuclear resource utilization rate of any flow line stage, the spare core queue The function check figure of several, described any flow line stage and the second setting numerical value, are updated to the spare core queue, have Body includes:
Whether the management core judges the nuclear resource utilization rate of any flow line stage not less than the 3rd setting percentage, and When being judged as YES, the assigned operation is performed;
When being judged as NO, the function check figure and the function check figure in the spare core queue of any flow line stage are judged Whether sum is not more than the second setting number, when being judged as YES, and adds function core into the spare core queue, so that The function check figure in spare core queue after addition is identical with the described second setting number, and the spare core queue after addition is made For the spare core queue after renewal;When being judged as NO, the spare core queue is regard as the spare core queue after renewal;
Function check figure of the management core in the spare core queue after renewal, is carried out more to the described second ready core queue Newly, the described first ready core queue is obtained, is specifically included:
If comparing the function check figure in the spare core queue after the renewal, with the function in the described second ready core queue Check figure is identical, then regard the described second ready core queue as the described first ready core queue;
If comparing the function check figure in the spare core queue after the renewal, more than the work(in the described second ready core queue Energy check figure, then selection the 5th sets the function core of number from the spare core queue, and carries out institute to the function core selected After the loading for stating map program, be added in the described second ready core queue, and using the second ready core queue after addition as The first ready core queue;
If comparing the function check figure in the spare core queue after the renewal, less than the work(in the described second ready core queue Energy check figure, then selection the 6th sets the function core of number from the described second ready core queue, and the function core selected is entered The unloading of the row map program, regard the second ready core queue after unloading as the described first ready core queue.
7. a kind of dispatching device of multi-core resource, it is characterised in that described device is located in multiple nucleus system, and the multiple nucleus system Also include multiple function cores, the device includes:
Receiving module, for receiving the load information that the function core of each flow line stage is sent according to predetermined period;
Determining module, the function for the load information received according to the receiving module, and each flow line stage Check figure, determines the load condition of the function core of each flow line stage;
Selecting module, for determining that the load condition of any function core of any flow line stage is super in the determining module Load condition, selects the first function core for setting number, the first ready core queue from the default first ready core queue Load information, the work(of any flow line stage sent for described device according to the function core of any flow line stage The function check figure of the map program of any flow line stage can not be loaded in check figure and default spare core queue, to including What the default second ready core queue for having the function core for having loaded the map program was obtained after being updated;
Add module, for the function core for selecting the selecting module, is added in any flow line stage.
8. device as claimed in claim 7, it is characterised in that described device, in addition to stopping modular,
The stopping modular, the load condition of any function core for determining any flow line stage in the determining module During for low-load state, stop the operation of any function core of any flow line stage;
The add module, is additionally operable to stop in the stopping modular operation of any function core of any flow line stage Afterwards, it is added in the described first ready core queue.
9. device as claimed in claim 7 or 8, it is characterised in that the determining module, specifically for according to each stream The nuclear resource utilization rate and function check figure of last pipeline stages, calculate the nuclear resource redundancy angle value of correspondence each flow line stage; When each nuclear resource redundancy angle value for judging to calculate is not less than the first given threshold, each flow line stage is determined Function core to be multiple, and judge whether the average occupancies of CPU of corresponding function core are not more than the first setting percentage, sentencing When breaking to be, the load condition of the minimum function core of CPU usage in corresponding function core is defined as low-load state;Sentencing It is no to break, and there is function of the CPU usage not less than the second setting percentage in the function core of each flow line stage During core, the load condition of corresponding function core is defined as overload status;In each nuclear resource redundancy for judging to calculate When angle value is less than the first given threshold, each flow line stage function core for one and corresponding CPU usage not During less than the described second setting percentage, the load condition of corresponding function core is defined as overload status;Described each The function core of flow line stage for it is multiple and exist CPU usage not less than described second setting percentage function core when, will The load condition of corresponding function core is defined as overload status, and the nuclear resource utilization rate of each flow line stage is described When the function core of each flow line stage is only one, the CPU usage of corresponding function core, or be each streamline rank When the function core of section is multiple, the average occupancies of CPU of corresponding function core.
10. device as claimed in claim 9, it is characterised in that the determining module, specifically for passing through formula D=R × (1- C), the nuclear resource redundancy angle value for obtaining each flow line stage is calculated, wherein, D is the core of each flow line stage Resource redundancy angle value, R is the function check figure of each flow line stage, and C makes for the nuclear resource of each flow line stage With rate.
11. device as claimed in claim 10, it is characterised in that described device, in addition to:
Update module, for judging whether the nuclear resource redundancy angle value of any flow line stage is not more than the second setting threshold Value;When being judged as YES, function check figure, the function check figure of any flow line stage in the spare core queue and Second setting number, is updated to the spare core queue;When being judged as NO, according to the core of any flow line stage Resource utilization, the function check figure in the spare core queue, the function check figure of any flow line stage and described second Number is set, the spare core queue is updated;And the function check figure in the spare core queue after renewal, to institute State the second ready core queue to be updated, obtain the described first ready core queue, second given threshold is less than described first Given threshold.
12. device as claimed in claim 11, it is characterised in that the update module, specifically for performing following specified behaviour Make:Judge the function check figure in the spare core queue whether not less than the 3rd setting number;If so, judging any flowing water Whether the function check figure in line stage is not more than the second setting number with the function check figure sum in the spare core queue, When being judged as YES, addition function core into the spare core queue so that addition after spare core queue in function check figure with The second setting number is identical, and regard the spare core queue after addition as the spare core queue after renewal;It is being judged as NO When, it regard the spare core queue as the spare core queue after renewal;Otherwise, addition the 4th sets the function core of number described in In spare core queue, and judge the function check figure and the function core in the spare core queue after addition of any flow line stage Whether number sum is not more than the second setting number, when being judged as YES, and function core is added again to the spare core queue In, so that the function check figure in the spare core queue after addition is identical with the described second setting number again;When being judged as NO, It regard the spare core queue as the spare core queue after renewal;Judging the nuclear resource utilization rate of any flow line stage is It is no to be not less than the 3rd setting percentage, and when being judged as YES, perform the assigned operation;When being judged as NO, judge described The function check figure of any flow line stage is set with whether the function check figure sum in the spare core queue is not more than described second Determine number, when being judged as YES, add function core into the spare core queue, so that the work(in the spare core queue after addition Energy check figure is identical with the described second setting number, and regard the spare core queue after addition as the spare core queue after renewal; When being judged as NO, the spare core queue is regard as the spare core queue after renewal;Spare core after the renewal is compared Function check figure in queue, when identical with the function check figure in the described second ready core queue, by the described second ready core queue It is used as the described first ready core queue;Function check figure in the spare core queue after comparing the renewal, more than described During function check figure in two ready core queues, the 5th function core for setting number is selected from the spare core queue, and to choosing The function core selected out is carried out after the loading of the map program, is added in the described second ready core queue, and by after addition Second ready core queue is used as the described first ready core queue;And the work(in the spare core queue after comparing the renewal Can check figure, during less than function check figure in the described second ready core queue, select the 6th to set from the described second ready core queue Determine the function core of number, and the unloading of the map program is carried out to the function core selected, and second after unloading is ready Core queue is used as the described first ready core queue.
CN201410009967.6A 2014-01-09 2014-01-09 The dispatching method and device of a kind of multi-core resource Active CN103744735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410009967.6A CN103744735B (en) 2014-01-09 2014-01-09 The dispatching method and device of a kind of multi-core resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410009967.6A CN103744735B (en) 2014-01-09 2014-01-09 The dispatching method and device of a kind of multi-core resource

Publications (2)

Publication Number Publication Date
CN103744735A CN103744735A (en) 2014-04-23
CN103744735B true CN103744735B (en) 2017-07-25

Family

ID=50501755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410009967.6A Active CN103744735B (en) 2014-01-09 2014-01-09 The dispatching method and device of a kind of multi-core resource

Country Status (1)

Country Link
CN (1) CN103744735B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656780B (en) * 2017-02-28 2020-07-28 中国联合网络通信集团有限公司 Data configuration method and device of virtual gateway
CN108259374B (en) * 2017-08-24 2019-07-09 新华三信息安全技术有限公司 A kind of multi-core processor and message processing method
CN107423454B (en) * 2017-09-22 2021-01-12 苏州浪潮智能科技有限公司 Method, device and equipment for processing file lock in distributed file system
CN109165045A (en) * 2018-08-09 2019-01-08 网宿科技股份有限公司 A kind of method and apparatus for the hardware configuration adjusting server
CN114546926B (en) * 2020-11-24 2023-08-08 北京灵汐科技有限公司 Core cluster synchronization, control method, data processing method, core, device and medium
CN114610578B (en) * 2022-03-17 2023-12-29 飞腾信息技术有限公司 Resource state management method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101495A (en) * 1994-11-16 2000-08-08 Hitachi, Ltd. Method of executing partition operations in a parallel database system
CN101146089A (en) * 2007-08-22 2008-03-19 杭州华三通信技术有限公司 Method for configuring core resources in multi-core system, multi-core system and management core
CN101788920A (en) * 2010-02-05 2010-07-28 北京航空航天大学 CPU virtualization method based on processor partitioning technology
CN102662761A (en) * 2012-03-27 2012-09-12 福建星网锐捷网络有限公司 Method and device for scheduling memory pool in multi-core central processing unit system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013178592A (en) * 2010-05-06 2013-09-09 Hitachi Ltd Operation management device and operation management method of information processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101495A (en) * 1994-11-16 2000-08-08 Hitachi, Ltd. Method of executing partition operations in a parallel database system
CN101146089A (en) * 2007-08-22 2008-03-19 杭州华三通信技术有限公司 Method for configuring core resources in multi-core system, multi-core system and management core
CN101788920A (en) * 2010-02-05 2010-07-28 北京航空航天大学 CPU virtualization method based on processor partitioning technology
CN102662761A (en) * 2012-03-27 2012-09-12 福建星网锐捷网络有限公司 Method and device for scheduling memory pool in multi-core central processing unit system

Also Published As

Publication number Publication date
CN103744735A (en) 2014-04-23

Similar Documents

Publication Publication Date Title
CN103744735B (en) The dispatching method and device of a kind of multi-core resource
CN105718317B (en) A kind of method for scheduling task and device
Yuan et al. CAWSAC: Cost-aware workload scheduling and admission control for distributed cloud data centers
US20160170469A1 (en) Power balancing to increase workload density and improve energy efficiency
CN103699447B (en) Cloud computing-based transcoding and distribution system for video conference
CN108345501A (en) A kind of distributed resource scheduling method and system
CN104901989B (en) A kind of Site Service offer system and method
CN103931262B (en) A kind of data dispatching method and equipment
CN102262567A (en) Virtual machine scheduling decision system, platform and method
CN102611735A (en) Load balancing method and system of application services
WO2023011157A1 (en) Service processing method and apparatus, server, storage medium, and computer program product
CN103401947A (en) Method and device for allocating tasks to multiple servers
CN104426694B (en) A kind of method and apparatus of adjustment resources of virtual machine
CN107343112B (en) Intelligent telephone traffic distribution method based on call center seat layering
El Khoury et al. Energy-aware placement and scheduling of network traffic flows with deadlines on virtual network functions
CN110187960A (en) A kind of distributed resource scheduling method and device
CN113641417B (en) Vehicle security task unloading method based on branch-and-bound method
CN108737268B (en) Software-defined industrial Internet of things resource scheduling method
CN102185726B (en) Method for improving business resource management capability in information grid system
CN108984286A (en) A kind of resource regulating method and system of cloud computing platform
CN109597378A (en) A kind of resource-constrained hybrid task energy consumption cognitive method
CN108282526A (en) Server dynamic allocation method and system between double clusters
CN116302578B (en) QoS (quality of service) constraint stream application delay ensuring method and system
CN109933433B (en) GPU resource scheduling system and scheduling method thereof
CN113822485B (en) Power distribution network scheduling task optimization method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee after: RUIJIE NETWORKS Co.,Ltd.

Address before: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee before: Beijing Star-Net Ruijie Networks Co.,Ltd.

CP01 Change in the name or title of a patent holder