CN103546390B - A kind of fixed length bag Weighted Fair Queuing dispatching method and device - Google Patents

A kind of fixed length bag Weighted Fair Queuing dispatching method and device Download PDF

Info

Publication number
CN103546390B
CN103546390B CN201210246793.6A CN201210246793A CN103546390B CN 103546390 B CN103546390 B CN 103546390B CN 201210246793 A CN201210246793 A CN 201210246793A CN 103546390 B CN103546390 B CN 103546390B
Authority
CN
China
Prior art keywords
count value
chained list
current count
scheduling
low order
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
CN201210246793.6A
Other languages
Chinese (zh)
Other versions
CN103546390A (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.)
Sanechips Technology Co Ltd
Original Assignee
ZTE Corp
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp, Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical ZTE Corp
Priority to CN201210246793.6A priority Critical patent/CN103546390B/en
Publication of CN103546390A publication Critical patent/CN103546390A/en
Application granted granted Critical
Publication of CN103546390B publication Critical patent/CN103546390B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of fixed length bag Weighted Fair Queuing dispatching method and devices, in this method, after the task scheduling for completing scheduling chained list is inscribed in the current count of counter, it calculates respectively in each non-empty scheduling chained list and is more than count value dispatch nearest apart from current count value on current count moment direction, using recently one of current count value described in distance in the count value to be dispatched calculated as next count value.This programme employs a kind of lowest difference away from the counter accumulation algorithm in the former patent of algorithm replacement, overcomes the problems, such as that counter accumulation algorithm iterations is excessive, counter accumulation algorithm is made to adapt to the scheduling requirement of high speed.

Description

A kind of fixed length bag Weighted Fair Queuing dispatching method and device
Technical field
Queue scheduling technology more particularly to a kind of fixed length bag Weighted Fair Queuing the present invention relates to data communication class chip Weighted Fair Queuing(Weighted Fair Queuing, abbreviation WFQ)Dispatching method and device.
Background technology
Data communication class chip will unavoidably be related to traffic management, and the core of traffic management is queue scheduling technology. WFQ dispatching techniques are RR, are the best one kind of performance and a kind of comparatively ideal scheduling in the various dispatching algorithms such as WRR, DWRR Algorithm, but implementation complexity is high, and the performance that reach higher is relatively difficult.
While the bandwidth of data communication class chip gradually steps up, scheduling mode is gradually to based on representing fixed word joint number The development of mandate dispatch direction, the scheduling mode of mandate is basic similar with the scheduling mode of fixed length bag.It is mentioned herein also main It is the WFQ dispatching algorithms based on fixed length bag or mandate.
A kind of WFQ dispatching algorithms are mentioned in the patent for being WO03084283A2 in international publication number, the following is the patent Realization method:
Because the bandwidth allocation of the scheduling of fixed length bag or mandate is actually the distribution of dispatcher meeting, it is therefore desirable to be used tricks Device is counted to calculate and control the distribution of dispatcher meeting.If the assignment accuracy minimum of bandwidth can reach 1/16, correspondingly need Want the distribution for the counter controls dispatcher meeting that a count range is 0-15.In order to ensure that dispatcher can equably carry out Distribution, can provide the corresponding dispatcher of each weighting levels, enable the flow of respective weights between equably Every obtaining dispatcher meeting, it is specified that as follows:
For 1:The WFQ schedulers of 4K, the minimal weight that can be set be 1/4096, it is necessary to bit number be 12 bits, Each corresponds to 1/2,1/4,1/8 respectively ... 1/4096, and being that each weight ratio is special sets 1 scheduling chained list, and scheduling chained list is by treating The flow compositions of dispatcher meeting are provided, totally 12 scheduling chained lists;One 12 digit counter, 12 scheduling chained lists and counter are set Correspondence it is as shown in table 1:
Table 1
Counter cnt Dispatch chained list Respective weights
000000000000 It is not used
xxxxxxxxxxx1 Q(0) 1/2
xxxxxxxxxx10 Q(1) 1/4
xxxxxxxxx100 Q(2) 1/8
xxxxxxxx1000 Q(3) 1/16
xxxxxxx10000 Q(4) 1/32
xxxxxx100000 Q(5) 1/64
xxxxx1000000 Q(6) 1/128
xxxx10000000 Q(7) 1/256
xxx100000000 Q(8) 1/512
xx1000000000 Q(9) 1/1024
x10000000000 Q(10) 1/2048
100000000000 Q(11) 1/4096
Chained list Q is dispatched as can be seen from Table 1(0)The counter moment of half is occupied, represents 1/2 weight, Q(1) It occupies for 1/4 counter moment, represents 1/4 weight, and so on.For ease of citing, with 1:The WFQ schedulers of 16 precision Exemplified by, counter count range mutually should be 0-15, scheduling chained list Q(0)Dispatcher can correspond to count the moment be xxx1, Q(1)It is right That answer is xx10, Q(2)Corresponding is x100, Q(3)Corresponding is 1000.Such as Fig. 1, if the weight of a flow only there are one Weight position, then the flow can only be present in the weight position it is corresponding one scheduling chained list in, the weight of a flow is if there is more A weight position, then the flow should be moved at the different counter moment it is each scheduling chained list in, it is each scheduling chained list in The dispatcher meeting of respective weights can be obtained, its weight can will be met by obtaining total dispatcher.
As shown in Figure 1, the horizontal line in Fig. 1 represents dispatcher meeting, by above correspondence, each scheduling chained list all obtains The dispatcher meeting of corresponding proportion was obtained, the flow in scheduling chained list also just obtains the dispatcher meeting of corresponding proportion.It is multiple Flow may have identical weight bit simultaneously, and if WFQ schedulers have 2 flow, the weight of flow_0 is 1/2+1/ 16 can be expressed as " 1001 ", and the weight of flow_1 can be expressed as " 1010 " for 1/2+1/8(It should be noted that for not The characteristics of dispatcher meeting can be wasted, the weight of WFQ is opposite weight, and nisi weight, dispatcher can be in all connections It is allocated between the flow of the scheduler, the ratio of distribution is the weight relative value of each flow, so the power of each flow The sum of weight may be greater than 1)Then flow_0 and flow_1 has 1/2 weight, is required for being lined up in Q0, then exists The same counting moment will have 2 flow to wait dispatcher meeting, i.e., to provide 2 dispatcher meetings, counter at the counting moment It could add up.As shown in Fig. 2, solid line represents flow_0 scheduling instances in Fig. 2, dotted line represents flow_1 scheduling instances, due to Weights of the flow_0 and flow_1 without 1/4 so Q1 is sky, only has flow_1 in Q2, there was only flow_0 in Q3, and Existing flow_0 has flow_1 again in Q0, therefore 2 dispatcher meetings of granting are needed at the counter moment of Q0, it is therefore desirable to Flow_0 and flow_1 are lined up in Q0, and if there is n flow has 1/2 weight, then Q0 is made of n flow, because This needs to be managed this n flow in scheduling chained list by way of chained list.
One scheduling chained list can correspond to multiple counter moment, and the flow in a scheduling chained list is divided into two parts, A part be should be issued at the current count moment dispatcher can flow, another part is etc. to stay in next counting moment quilt Provide dispatcher can flow, therefore scheduling chained list is divided into movable chained list and inactive chained list, in movable chained list be exactly ought The preceding moment should be issued dispatcher can flow, in inactive chained list is exactly to be issued dispatcher meeting at next counting moment Flow.Chained list is in series by the Token for representing flow.One and only one Token of each flow, Token, which are included, to be directed toward The pointer of next Token, when taking turns to some scheduling chained list service, the inactive chained list of the scheduling chained list becomes activity chain Table, the owner pointer of scheduling chained list from movable chained list obtain No. flow that first Token is represented, dispatcher can be issued to this Then flow calculates the counter that the flow should be serviced next time according to the weighted value of present counter value and the flow Moment, and determine which scheduling chained list the Token of the flow should be moved to according to the counter moment, then should Token is moved to this inactive chained list afterbody of new scheduling chained list, while updates the inactive chained list protocercal tail portion of the scheduling chained list The pointer of Token, as shown in Figure 3.
The Token of a flow is represented to move between each scheduling chained list, and counter moment can will be corresponding to it Scheduling chained list activity chained list in all Token all service one time, counted after the business of the movable chained list bedding and clothing of the scheduling chained list The value of number device just adds up(1 may be added, it is also possible to add 2 etc.), therefore counted at one in Xun Huan, high weight dispatches chained list Due to correspondence more counter moment, chained list can be dispatched than low weight and more serviced, Token, which often enters, once dispatches chain Table can finally be issued a dispatcher meeting, and the corresponding flow weights of Token are higher, will be more moved to Gao Quan Queue again so as to obtain more dispatcher meetings, realizes the distribution of bandwidth ratio.
Scheduling chained list is linked by Token, but the actual only needs of scheduling chained list stored in the scheduler preserve head and the tail Pointer, and each Token is put on each flow, as shown in figure 4, therefore no matter scheduling chained list have how long, be stored in Scheduling chained list on scheduler all only has head and the tail pointer.Also mean that scheduling chained list can be with endless, scheduler actually can be with Connect unlimited port.The movement of Token only needs the tail pointer of the purpose that will be moved to scheduling chained list to be directed toward the Token, As shown in Figure 4.
In WFQ schedulers, the scheduling chained list only currently serviced has movable chained list and inactive chained list simultaneously, He only has inactive chained list by not serviced scheduling chained list, the flow bedding and clothing in the movable chained list of the scheduling chained list currently serviced After being engaged in, counter adds up, and next scheduling chained list serviced, selected scheduling chained list are picked out according to the value of counter Inactive chained list is switched into movable chained list, the empty chain table originally put in activity chain epitope becomes inactive chained list, new afterwards to turn The Token for moving on to the scheduling chained list will be placed in the afterbody of inactive chained list, as shown in Figure 5.
Token moving algorithms:
The Token for representing a flow is moved between each scheduling chained list, so as to obtain the dispatcher meeting of corresponding proportion, when Token is serviced then, and the flow corresponding to it will be issued a dispatcher meeting, and then scheduler is according to the WFQ of the flow Weight calculation goes out the counter moment that should be in by service flow next times, and finds corresponding tune according to the counter moment Chained list is spent, which is put into the inactive chained list afterbody of the scheduling chained list.
, it is necessary to 4 digit counters, all count values and scheduling chained list by taking minimum precision is 1/16 WFQ schedulers as an example Correspondence it is as shown in table 2.
Table 2
Count value Dispatch chained list
0000 It is not used
0001 Q(0)
0010 Q(1)
0011 Q(0)
0100 Q(2)
0101 Q(0)
0110 Q(1)
0111 Q(0)
1000 Q(3)
1001 Q(0)
1010 Q(1)
1011 Q(0)
1100 Q(2)
1101 Q(0)
1110 Q(1)
1111 Q(0)
From Table 2, it can be seen that the Q (0) of weight 1/2 in count value at intervals of 2, the Q (1) of weight 1/4 is being counted In value at intervals of 4, and so on, and the counter moment occupied by the scheduling chained list of low level-one weight be always located in it is high by one The centre position at the contiguous counter moment occupied by grade weight scheduling chained list, according to this feature, can obtain following algorithm To calculate the next counter positions of Token:
1:Find out the WFQ weight weight limits position of the corresponding flow of the Token:
j=N-1-max{k,for all K’s where Wk=1};
Weight as flow includes is expressed as " 0101 " for 1/4+1/16, then j=1, as the weight of flow is expressed as 1/2 " 1000 ", then j=0.
2:The step value that counter adds up is obtained according to weight limit position:
I=0001<< j,
When i.e. weight limit is 1/2, step value 1, when weight limit is 1/4, step value 2, weight limit 1/8 When, step value 4, and so on.
3:Nonce counter is worth to new Counter Value plus stepping:
D=(Scurrent+I) mod (2N),
Scurrent is current count value, and I is step value, and N is counter bits number, if counter occurs to overflow after adding up Go out then remainder.
4:Find out the minimum non-zero position of D:
P=min (t, for all T ' s where Dt=1),
I.e. if D=xxx1, p=0, if D=xx10, p=1, and so on.If the weighted value of the flow corresponding to p Wp is 1, then Token is put into Q (p), if the weighted value Wp of the flow corresponding to p is 0, Token is put into Q (j) In.
This algorithm is simply understood that:Since the counter moment residing for all low weight scheduling chained lists is inevitable In highest weighting(The effective weight of highest of one flow)The centre position at chained list corresponding counter moment is dispatched, so only It needs to add up according to the step value of highest weighting, if the corresponding scheduling chained list of the count value after cumulative meets the flow's Weight, then show the counter moment need provide dispatcher meeting, otherwise the counter moment need not provide dispatcher meeting, that The counter moment nearest from this counter moment is exactly the counter moment corresponding to highest weighting scheduling chained list.
By taking weight 0101 as an example, as shown in table 3 at the time of which should be issued dispatcher meeting
Table 3
Count value Whether dispatcher meeting should be provided Corresponding scheduling chained list
0000
0001
0010 It is Q(1)
0011
0100
0101
0110 It is Q(1)
0111
1000 It is Q(3)
1001
1010 It is Q(1)
1011
1100
1101
1110 It is Q(1)
1111
Flow is serviced when counter is 0010, it is now desired to, can from table 3 at the time of determining that it is serviced next time To find out being at 0110 moment.J=1 is obtained when being expressed as " 0101 " according to weight, obtains step value I=0001<<1 is 2, So it is 0 that the least significant non-zero position p of new count value D=0100, D, which is weight Wp1/8 corresponding to 2, p, so can only should Token is put into the corresponding scheduling chained list Q (1) of highest weighting 1/4, and Q (1) will provide the flow when counter is equal to 0110 Dispatcher meeting.
Flow is issued dispatcher meeting when counter counts are to 0110, is then similarly calculated, due to highest weighting It is always 1/4, so step value is also 2 always, obtains the least significant non-zero position p of new count value D=1000, D corresponding to 3, p Weight Wp1/16 for 1, therefore 1000 this moment should be serviced, and 1000 to count moment corresponding scheduling chained list be Q (3), therefore by the Token it is put into Q (3), which will be serviced when counter reaches 1000.The class according to this of calculating below It pushes away.
Token adds in scheduler algorithms:
It, it is necessary to will when queue becomes the token bucket of non-empty or the reshaper corresponding to it from space-variant into non-empty from dummy status Its corresponding Token is put into scheduling chained list, the algorithm of addition Token to scheduling chained list and the complete phase of algorithm of mobile Token Together, be all to be calculated according to the value of nonce counter and the weighted value of queue, determine it should scheduling chained list.
Counter accumulation algorithm:
After the activity queue of current scheduling chained list is serviced and is finished, counter added up to obtain one it is new Count value, next scheduling chained list is serviced according to this new count value.
1:One weight limit scheduling chained list of selection in all non-emptys dispatch chained list and current scheduling chained list;
2:Step value according to the weight limit scheduling chained list selected carries out the cumulative of count value and (is calculated with reference to Token movements The step 2) of method.
3:If the count value after cumulative can be dispatched with non-empty, chained list is corresponding, and the count value after adding up is New count Value.It is corresponding that if the count value after cumulative could not dispatch chained list with non-empty, the corresponding scheduling chained list of count value after cumulative Weight limit scheduling chained list is selected between non-empty queue, repeats step 1 and 2, until finding a new count value and non- Empty queue corresponds to, shown in Fig. 6.
Fig. 6 current count values are 1, and Q0 is sky after Q0 has been serviced, and other non-empty queues only have Q11, and The corresponding count values of Q11 should be 2048, and in this example, first time iteration count value jumps to Q1, but Q1 is sky, and using Q1 as base Plinth, second of iteration jump to Q2, have so jumped to Q11 by 11 iteration.
A count value can finally be found certainly using this iterative manner and correspond to non-empty queue, but the iteration time needed Number is uncertain, at most needs 11 iteration, can cause the overlong time of scheduling.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of fixed length bag Weighted Fair Queuing dispatching method and devices, overcome The problem of counter accumulation algorithm iterations is excessive.
In order to solve the above technical problem, the present invention provides a kind of fixed length bag Weighted Fair Queuing dispatching method, including: After the task scheduling for completing scheduling chained list is inscribed in the current count of counter, calculate be more than in each non-empty scheduling chained list respectively The to be dispatched count value nearest apart from current count value, the count value to be dispatched that will be calculated on current count moment direction A middle conduct next count value nearest apart from the current count value.
Further, the above method can also have the characteristics that:
It calculates to be more than on current count moment direction in each non-empty scheduling chained list and treat apart from current count value is nearest The method of scheduling count value specifically includes:
It determines that X low order of the corresponding standard count value of the non-empty scheduling chained list is known as BV, determines current count X low order of value is known as CV;
When BV is more than CV, using X low order forms in the Y of current count value high invalid bits and the BV value as Be more than in this non-empty scheduling chained list the current count moment described in distance on the current count value direction it is nearest treat that scheduling counts Value;When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bits is added into the Y after 1 high invalid bits and described In BV the value of X low order composition dispatched as this non-empty be more than in chained list on the current count value direction described in distance when It is preceding to count the count value to be dispatched of moment recently.
Further, the above method can also have the characteristics that:
The X with it is described Y's and for standard count value total bit.
Further, the above method can also have the characteristics that:
When BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bits, current count value Digit adds 1, wherein high invalid bit number is Y+1.
Further, the above method can also have the characteristics that:
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2 is 1, except this 1 low order Outside position be high invalid bit;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/4 is 2, except this 2 low orders Outside position be high invalid bit;
And so on;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2048 is 11, low is had except this 11 It is high invalid bit to imitate the position outside position.
In order to solve the above-mentioned technical problem, the present invention also provides a kind of fixed length bag Weighted Fair Queuing dispatching device, institutes Stating device includes:Count value management module, computing module;
The computing module is worked as calculating in each non-empty scheduling chained list more than distance on current count moment direction The nearest count value to be dispatched of preceding count value;
The count value management module, for inscribing the task scheduling for completing scheduling chained list in the current count of counter Afterwards, the computing module is triggered, current count value described in distance is most in the count value to be dispatched that the computing module is calculated A near next count value of conduct.
Further, above device can also have the characteristics that:
The computing module, X specifically for determining the corresponding standard count value of the non-empty scheduling chained list are low effective Position is known as BV, determines that X low order of current count value is known as CV;It, will be Y of current count value high invalid when BV is more than CV In position and the BV value of X low order composition as this non-empty dispatch in chained list more than on the current count value direction away from The to be dispatched count value nearest from the current count moment;It, will be Y of current count value high invalid when BV is less than or equal to CV Lowest order adds the value of X low order composition in the Y after 1 high invalid bits and the BV to be dispatched as this non-empty in chained list in position The to be dispatched count value nearest more than the current count moment described in distance on the current count value direction.
Further, above device can also have the characteristics that:
The X with it is described Y's and for standard count value total bit.
Further, above device can also have the characteristics that:
The computing module is additionally operable to when BV is less than or equal to CV, will be minimum in the Y of current count value high invalid bits Behind position plus 1, the digit of current count value is added 1, wherein high invalid bit number is Y+1.
Further, above device can also have the characteristics that:
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2 is 1, except this 1 low order Outside position be high invalid bit;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/4 is 2, except this 2 low orders Outside position be high invalid bit;
And so on;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2048 is 11, low is had except this 11 It is high invalid bit to imitate the position outside position.
This programme employs a kind of lowest difference away from the counter accumulation algorithm in the former patent of algorithm replacement, for patent The defects of WO03084283A2 Counter accumulation algorithms, overcomes the problems, such as that counter accumulation algorithm iterations is excessive, makes meter Number device accumulation algorithm adapts to the scheduling requirement of high speed.
Description of the drawings
Fig. 1 is the schematic diagram for counting the moment and dispatching chained list;
Fig. 2 is the schematic diagram for having in a scheduling chained list multiple flow;
Fig. 3 is the mobile schematic diagram of Token;
Fig. 4 is the distribution schematic diagram of Token;
Fig. 5 is the transition diagram between movable chained list and inactive chained list;
Fig. 6 is counter accumulation algorithm schematic diagram;
Fig. 7 is fixed length bag Weighted Fair Queuing dispatching method flow chart in embodiment;
Fig. 8 is fixed length bag Weighted Fair Queuing dispatching method schematic diagram in specific embodiment.
Specific embodiment
As shown in fig. 7, fixed length bag Weighted Fair Queuing dispatching method includes in this programme:In the current count of counter After inscribing the task scheduling for completing scheduling chained list, calculate be more than in each non-empty scheduling chained list on the current count value direction respectively The to be dispatched count value nearest apart from the current count moment, will currently count described in distance in the count value to be dispatched calculated A nearest next count value of conduct of numerical value.
Wherein, calculate in each non-empty scheduling chained list and be more than the current count moment described in distance on the current count value direction The method of nearest count value to be dispatched specifically includes:Determine that the X of the corresponding standard count value of the non-empty scheduling chained list is a low Significance bit is known as BV, determines that X low order of current count value is known as CV;It is high by Y of current count value when BV is more than CV The value of X low order composition is dispatched as this non-empty in invalid bit and the BV is more than the current count value direction in chained list On apart from the current count moment nearest count value to be dispatched;It is high by Y of current count value when BV is less than or equal to CV Lowest order adds the value of X low order composition in the Y after 1 high invalid bits and the BV to dispatch chain as this non-empty in invalid bit It is more than the count value to be dispatched of current count moment described in distance recently on the current count value direction in table.
The X with it is described Y's and for standard count value total bit.
Wherein, when BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bits, current count The digit of value adds 1, wherein high invalid bit number is Y+1.
As shown in table 1, the low order number for the corresponding standard count value of scheduling chained list that weight is 1/2 is 1, except this 1 Position is high invalid bit outside a low order;The low order number for the corresponding standard count value of scheduling chained list that weight is 1/4 For 2, the position in addition to this 2 low orders is high invalid bit;And so on;Weight is the 1/2048 corresponding mark of scheduling chained list The low order number of quasi- count value is 11, and the position in addition to this 11 low orders is high invalid bit.
By taking Fig. 8 as an example, current count value 5, Q2 and Q3 dispatch chained list for non-empty.
Calculate count value to be dispatched nearest apart from current count value on more than current count moment direction in Q2:It determines The corresponding standard count values of Q2(XXXXXXXXX100)3 low order BV for 100, present counter value 5= 000000000101,3 low order CV is 101, and the invalid bit CE 9 high of present counter value 5 is 000000000, BV Less than CV, therefore the corresponding S of Q2nextFor { CE+1, BV }={ 000000001100 }, i.e., 12.
Calculate count value to be dispatched nearest apart from current count value on more than current count moment direction in Q3:It determines The corresponding standard count values of Q3(XXXXXXXX1000)4 low order BV for 1000, present counter value 5= 000000000101,4 low order CV is 0101, and the invalid bit CE 8 high of present counter value 5 is 000000000, BV More than CV, therefore the corresponding S of Q3nextFor { CE, BV }={ 000000001000 }, i.e., 8.
So new count value should select 8 as new count value.
This algorithm needs to carry out plus and minus calculation and what comparison operation, and combinational logic scale may be larger, but during calculating Between it is fixed, it should can be completed within 2,3 clock cycle.Therefore lowest difference away from algorithm be really can be practical algorithm, It is the key improvements point of the present invention.
It should be noted that it is that lowest difference can also be applied to away from algorithm on Token moving algorithms, if implementation complexity is small In Token moving algorithms noted earlier, then can be substituted.
Fixed length bag Weighted Fair Queuing dispatching device in this case includes:Count value management module, computing module.
The computing module is worked as calculating in each non-empty scheduling chained list more than distance on current count moment direction The nearest count value to be dispatched of preceding count value;
The count value management module, for inscribing the task scheduling for completing scheduling chained list in the current count of counter Afterwards, the computing module is triggered, current count value described in distance is most in the count value to be dispatched that the computing module is calculated A near next count value of conduct.
The computing module, X specifically for determining the corresponding standard count value of the non-empty scheduling chained list are low effective Position is known as BV, determines that X low order of current count value is known as CV;It, will be Y of current count value high invalid when BV is more than CV In position and the BV value of X low order composition as this non-empty dispatch in chained list more than on the current count value direction away from The to be dispatched count value nearest from the current count moment;It, will be Y of current count value high invalid when BV is less than or equal to CV Lowest order adds the value of X low order composition in the Y after 1 high invalid bits and the BV to be dispatched as this non-empty in chained list in position The to be dispatched count value nearest more than the current count moment described in distance on the current count value direction.
The X with it is described Y's and for standard count value total bit.
The computing module is additionally operable to when BV is less than or equal to CV, will be minimum in the Y of current count value high invalid bits Behind position plus 1, the digit of current count value is added 1, wherein high invalid bit number is Y+1.
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase Mutually any combination.
Certainly, the present invention can also have other various embodiments, without deviating from the spirit and substance of the present invention, ripe Various corresponding changes and deformation, but these corresponding changes and deformation can be made according to the present invention by knowing those skilled in the art The protection domain of appended claims of the invention should all be belonged to.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program Related hardware is completed, and described program can be stored in computer readable storage medium, such as read-only memory, disk or CD Deng.Optionally, all or part of step of above-described embodiment can also be realized using one or more integrated circuits.Accordingly Ground, the form that hardware may be employed in each module/unit in above-described embodiment are realized, can also use the shape of software function module Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.

Claims (10)

1. a kind of fixed length bag Weighted Fair Queuing dispatching method, which is characterized in that
After the task scheduling for completing scheduling chained list is inscribed in the current count of counter, calculate respectively in each non-empty scheduling chained list More than count value to be dispatched nearest apart from current count value on current count moment direction, scheduling meter is treated by what is calculated A nearest next count value of conduct of current count value described in distance in numerical value.
2. the method as described in claim 1, which is characterized in that
Calculate be more than in each non-empty scheduling chained list on current count moment direction apart from current count value it is nearest wait to dispatch The method of count value specifically includes:
It determines that X low order of the corresponding standard count value of the non-empty scheduling chained list is known as BV, determines the X of current count value A low order is known as CV;
When BV is more than CV, the value using X low order composition in the Y of current count value high invalid bits and the BV is non-as this It is more than the count value to be dispatched of current count moment described in distance recently on the current count value direction in air-conditioning degree chained list;BV During less than or equal to CV, lowest order in the Y of current count value high invalid bits is added into X in the Y after 1 high invalid bits and the BV The value of a low order composition is dispatched in chained list to be more than on the current count value direction described in distance as this non-empty and currently counted The count value to be dispatched of number moment recently.
3. method as claimed in claim 2, which is characterized in that
The X with it is described Y's and for standard count value total bit.
4. method as claimed in claim 2, which is characterized in that
When BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bits, the digit of current count value Add 1, wherein high invalid bit number is Y-1.
5. method as claimed in claim 2, which is characterized in that
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2 is 1, in addition to this 1 low order Position is high invalid bit;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/4 is 2, in addition to this 2 low orders Position be high invalid bit;
And so on;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2048 is 11, except this 11 low orders Outside position be high invalid bit.
6. a kind of fixed length bag Weighted Fair Queuing dispatching device, which is characterized in that
Described device includes:Count value management module, computing module;
The computing module is more than on current count moment direction for calculating in each non-empty scheduling chained list apart from current count value Nearest count value to be dispatched;
The count value management module, after the task scheduling for completing scheduling chained list is inscribed in the current count of counter, The computing module is triggered, current count value described in distance is nearest in the count value to be dispatched that the computing module is calculated One next count value of conduct.
7. device as claimed in claim 6, which is characterized in that
The computing module claims specifically for X low order for determining the corresponding standard count value of the non-empty scheduling chained list For BV, determine that X low order of current count value is known as CV;When BV is more than CV, by the Y of current count value high invalid bits and The value of X low order composition is dispatched as this non-empty in the BV is more than distance institute on the current count value direction in chained list State the count value to be dispatched of current count moment recently;It, will be in the Y of current count value high invalid bits when BV is less than or equal to CV Lowest order adds the value of X low order composition in the Y after 1 high invalid bits and the BV to be dispatched as this non-empty in chained list and is more than The count value to be dispatched of current count moment described in distance recently on the current count value direction.
8. device as claimed in claim 6, which is characterized in that
The X with it is described Y's and for standard count value total bit.
9. device as claimed in claim 6, which is characterized in that
The computing module is additionally operable to when BV is less than or equal to CV, and lowest order in the Y of current count value high invalid bits is added After 1, the digit of current count value is added 1, wherein high invalid bit number is Y-1.
10. device as claimed in claim 6, which is characterized in that
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2 is 1, in addition to this 1 low order Position is high invalid bit;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/4 is 2, in addition to this 2 low orders Position be high invalid bit;
And so on;
The low order number for the corresponding standard count value of scheduling chained list that weight is 1/2048 is 11, except this 11 low orders Outside position be high invalid bit.
CN201210246793.6A 2012-07-17 2012-07-17 A kind of fixed length bag Weighted Fair Queuing dispatching method and device Active CN103546390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210246793.6A CN103546390B (en) 2012-07-17 2012-07-17 A kind of fixed length bag Weighted Fair Queuing dispatching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210246793.6A CN103546390B (en) 2012-07-17 2012-07-17 A kind of fixed length bag Weighted Fair Queuing dispatching method and device

Publications (2)

Publication Number Publication Date
CN103546390A CN103546390A (en) 2014-01-29
CN103546390B true CN103546390B (en) 2018-05-18

Family

ID=49969454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210246793.6A Active CN103546390B (en) 2012-07-17 2012-07-17 A kind of fixed length bag Weighted Fair Queuing dispatching method and device

Country Status (1)

Country Link
CN (1) CN103546390B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003084283A2 (en) * 2002-03-25 2003-10-09 Erlang Technology, Inc. Method and apparatus for wfq scheduling using a plurality of scheduling queues
CN101277560A (en) * 2007-03-30 2008-10-01 三洋电机株式会社 Electroluminescence display apparatus
CN101299726A (en) * 2008-06-30 2008-11-05 中兴通讯股份有限公司 Method for calculating forwarding shortest path

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739817B (en) * 2009-11-26 2012-08-29 西北工业大学 Shortest path planning method for dynamic origins

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003084283A2 (en) * 2002-03-25 2003-10-09 Erlang Technology, Inc. Method and apparatus for wfq scheduling using a plurality of scheduling queues
CN101277560A (en) * 2007-03-30 2008-10-01 三洋电机株式会社 Electroluminescence display apparatus
CN101299726A (en) * 2008-06-30 2008-11-05 中兴通讯股份有限公司 Method for calculating forwarding shortest path

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
网络优化技术在光缆路由自动设计中的应用;李楠;《中国优秀硕士论文全文库 信息科技辑》;20120415;第23-25页 *
网络优化技术在光缆路由自动设计中的应用;李楠;《中国优秀硕士论文全文库 科技信息辑》;20120415;第23-25页 *

Also Published As

Publication number Publication date
CN103546390A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
JP5827594B2 (en) Virtual machine placement apparatus and virtual machine placement method
CN109788489A (en) A kind of base station planning method and device
CN109669774A (en) Quantization method, method of combination, device and the network equipment of hardware resource
CN110503534A (en) Cloud computing service resource dynamic dispatching method and system based on price expectation
Ha Optimal pricing that coordinates queues with customer-chosen service requirements
Cai et al. Stochastic scheduling on parallel machines subject to random breakdowns to minimize expected costs for earliness and tardy jobs
CN105378667A (en) Method and apparatus for scheduling virtual machine resources
CN105791447B (en) A kind of cloud resource dispatching method and device towards Video service
CN109327844A (en) A kind of cell capacity-enlarging method and device
CN109582452A (en) A kind of container dispatching method, dispatching device and electronic equipment
CN110389822A (en) The node scheduling method, apparatus and server of execution task
CN109686431A (en) Based on mixing grey wolf-variable neighborhood search algorithm operating room dispatching method and device
CN114154894A (en) Task processing method and device, electronic equipment and computer readable storage medium
CN113850394A (en) Federal learning method and device, electronic equipment and storage medium
CN105045667B (en) A kind of resource pool management method for virtual machine vCPU scheduling
CN104866238A (en) Access request scheduling method and apparatus
CN107396445A (en) A kind of information reporting dispatching method, system, host device and slave devices
CN103546390B (en) A kind of fixed length bag Weighted Fair Queuing dispatching method and device
CN112994911B (en) Calculation unloading method and device and computer readable storage medium
CN114429195A (en) Performance optimization method and device for hybrid expert model training
Jia et al. Improving performance of dispatch rules for daily scheduling of assembly and test operations
Vasant Hybrid mesh adaptive direct search genetic algorithms and line search approaches for fuzzy optimization problems in production planning
CN115633317B (en) Message channel configuration method and system
CN110308965A (en) The rule-based heuristic virtual machine distribution method and system of cloud data center
CN108337634A (en) HAPS call Cut-in control methods, device, High Altitude Platform and computer storage media

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Huang Wei

Inventor after: Sun Mingshi

Inventor before: Huang Wei

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: HUANG WEI TO: HUANG WEI SUN MINGSHI

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20151029

Address after: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Applicant after: ZTE Corp.

Applicant after: SANECHIPS TECHNOLOGY Co.,Ltd.

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Applicant before: ZTE Corp.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221206

Address after: 518055 Zhongxing Industrial Park, Liuxian Avenue, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: SANECHIPS TECHNOLOGY Co.,Ltd.

Address before: 518057 Ministry of justice, Zhongxing building, South Science and technology road, Nanshan District hi tech Industrial Park, Shenzhen, Guangdong

Patentee before: ZTE Corp.

Patentee before: SANECHIPS TECHNOLOGY Co.,Ltd.