CN103546390A - Scheduling method and device for weighted fair queuing of fixed-length packets - Google Patents

Scheduling method and device for weighted fair queuing of fixed-length packets Download PDF

Info

Publication number
CN103546390A
CN103546390A CN201210246793.6A CN201210246793A CN103546390A CN 103546390 A CN103546390 A CN 103546390A CN 201210246793 A CN201210246793 A CN 201210246793A CN 103546390 A CN103546390 A CN 103546390A
Authority
CN
China
Prior art keywords
count value
chained list
scheduling
current
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.)
Granted
Application number
CN201210246793.6A
Other languages
Chinese (zh)
Other versions
CN103546390B (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
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 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

Images

Abstract

The invention discloses a scheduling method and device for weighted fair queuing of fixed-length packets. The method includes: after task scheduling in scheduling linked lists is finished at current counting time of a counter, calculating count values under scheduling, which are the closest to a current count value and larger than the current counting time, in each non-null scheduling linked list, and using the one, the closet to the current count value, in the calculated count values under scheduling, as a next count value. A counter accumulation algorithm in the original patent is replaced with a minimum gap algorithm, the problem that excessive iterations are performed in the counter accumulation algorithm is solved, and the counter accumulation algorithm meets the requirement for high-speed scheduling.

Description

A kind of fixed length bag Weighted Fair Queuing dispatching method and device
Technical field
The present invention relates to the queue scheduling technology of data communication class chip, relate in particular to a kind of fixed length bag Weighted Fair Queuing Weighted Fair Queuing (Weighted Fair Queuing is called for short WFQ) dispatching method and device.
Background technology
Data communication class chip unavoidably will relate to traffic management, and the core of traffic management is queue scheduling technology.WFQ dispatching technique is RR, and WRR is best a kind of of performance in the various dispatching algorithms such as DWRR, be also a kind of comparatively ideal dispatching algorithm, but implementation complexity is high, reach higher Performance Ratio more difficult.
When the bandwidth of data communication class chip improves gradually, scheduling mode is gradually to the mandate scheduling future development based on representing fixed word joint number, and the scheduling mode of the scheduling mode fundamental sum fixed length bag of mandate is similar.What mention here is mainly also the WFQ dispatching algorithm based on fixed length bag or mandate.
In the patent that is WO03084283A2 at international publication number, mention a kind of WFQ dispatching algorithm, the following is the implementation of this patent:
Because the allocated bandwidth of the scheduling of fixed length bag or mandate be exactly in fact dispatcher can distribution, therefore need to calculate the distribution with Control and Schedule chance with counter.If the assignment accuracy minimum of bandwidth can reach 1/16, correspondingly need the distribution of the counter controls dispatcher meeting that a count range is 0-15.In order to guarantee that dispatcher can be able to distribute equably, can stipulate dispatcher corresponding to each weight grade, make the flow of respective weights obtain dispatcher meeting with interval equably, provide as follows:
WFQ scheduler for 1:4K, the minimal weight that can arrange is 1/4096, the bit number needing is 12 bits, each is correspondence 1/2 respectively, 1/4,1/8 ... 1/4096, for each weight ratio spy arranges 1 scheduling chained list, scheduling chained list is comprised of the flow of dispatcher meeting to be provided, totally 12 scheduling chained lists; 12 digit counters are set, and the corresponding relation of 12 scheduling chained list sum counters is as shown in table 1:
Table 1
Counter cnt Scheduling chained list Respective weights
000000000000 Do not use
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
Dispatch as can be seen from Table 1 chained list Q(0) counter that occupied half constantly, represent 1/2 weight, Q(1) occupied 1/4 counter constantly, represent 1/4 weight, the rest may be inferred.For ease of for example, the WFQ scheduler of 1:16 precision of take is example, and rolling counters forward scope should be 0-15 mutually, scheduling chained list Q(0) dispatcher can corresponding counting be xxx1 constantly, Q(1) that corresponding is xx10, Q(2) corresponding be x100, Q(3) corresponding be 1000.As Fig. 1, if the weight of a flow only has a weight position, this flow only can be present in a scheduling chained list of this weight position correspondence, if the weight of a flow has a plurality of weights position, this flow should move in each scheduling chained list constantly at different counters, in each scheduling chained list, can obtain the dispatcher meeting of respective weights, obtaining total dispatcher can will meet its weight.
As shown in Figure 1, the horizontal line in Fig. 1 represents dispatcher meeting, and by above corresponding relation, each scheduling chained list has all obtained the dispatcher meeting of corresponding proportion, and the flow in scheduling chained list has also just obtained the dispatcher meeting of corresponding proportion.A plurality of flow may have identical weight bit simultaneously, as WFQ scheduler has 2 flow, the weight of flow_0 is that 1/2+1/16 can be expressed as " 1001 ", the weight of flow_1 is that 1/2+1/8 can be expressed as " 1010 " and (it should be noted that, for the feature that can not waste dispatcher meeting, the weight of WFQ is relative weight, and nisi weight, dispatcher can be distributed between all flow that are connected to this scheduler, the ratio of distributing is the weight relative value of each flow, so the weight sum of each flow is to be greater than 1) flow_0 and flow_1 have 1/2 weight, all need in Q0, rank, at same counting, will there be 2 flow to wait for dispatcher meeting constantly, at this counting, constantly to provide 2 dispatcher meetings, counter could add up.As shown in Figure 2, in Fig. 2, solid line represents flow_0 scheduling constantly, dotted line represents flow_1 scheduling constantly, because flow_0 and flow_1 all do not have 1/4 weight, so Q1 is empty, in Q2, only has flow_1, in Q3, only has flow_0, and existing flow_0 has flow_1 in Q0, therefore at the counter of Q0, constantly need to provide 2 dispatcher meetings, therefore need flow_0 and flow_1 to rank in Q0, if there be n flow to there is 1/2 weight, Q0 is comprised of n flow, therefore need to by the mode of chained list, manage this n flow in scheduling chained list.
Can be corresponding a plurality of counters of scheduling chained list constantly, flow in a scheduling chained list is divided into two parts, a part is the flow that current counting should be issued dispatcher meeting constantly, another part is to wait for the flow that is issued dispatcher meeting at next one counting constantly, therefore scheduling chained list is divided into movable chained list and inactive chained list, in movable chained list is exactly the flow that current time should be issued dispatcher meeting, and in inactive chained list is exactly the flow that next counting is issued dispatcher meeting constantly.Chained list is in series by the Token that represents flow.Each flow has and only has a Token, Token comprises the pointer that points to next Token, when taking turns to certain scheduling chained list service, the inactive chained list of this scheduling chained list becomes movable chained list, scheduling chained list obtains No. flow of first Token representative from the owner pointer of movable chained list, dispatcher can be provided to this flow, then according to the weighted value of current Counter Value and this flow, calculate the counter moment that this flow next time should be serviced, and constantly determine according to this counter which scheduling chained list the Token of this flow should be moved in, then this Token is moved to the inactive chained list afterbody of this new scheduling chained list, upgrade the pointer of the former afterbody Token of the inactive chained list of this scheduling chained list simultaneously, as shown in Figure 3.
The Token that represents a flow moves between each scheduling chained list, and a counter can all be served all Token in the movable chained list of its corresponding scheduling chained list one time constantly, after the movable chained list of this scheduling chained list is serviced, the value of counter just adds up and (may add 1, also may add 2 etc.), therefore in a count cycle, high weight scheduling chained list is due to the more counter moment of correspondence, can be more serviced more than low weight scheduling chained list, Token often enters and once dispatches chained list and finally can both be issued a dispatcher meeting, the flow weight that Token is corresponding is higher, will be moved to more high weight queue, thereby obtain more dispatcher meeting, realize the distribution of bandwidth ratio.
Scheduling chained list is formed by Token link, but actual of the scheduling chained list leaving in scheduler needs to preserve head and the tail pointer, and it is upper that each Token is put into each flow, as shown in Figure 4, therefore no matter how long scheduling chained list has, the scheduling chained list leaving on scheduler all only has head and the tail pointer.Also just mean that scheduling chained list can endless, scheduler is actual can connect a unlimited port.The tail pointer of the object scheduling chained list that the movement of Token only needs to move to points to this Token, as shown in Figure 4.
In WFQ scheduler, only have current serviced scheduling chained list to there is movable chained list and inactive chained list simultaneously, other not serviced scheduling chained lists only have inactive chained list, flow in the movable chained list of current serviced scheduling chained list serviced complete after, counter is cumulative, according to the value of counter, pick out next serviced scheduling chained list, selected scheduling chained list transfers inactive chained list to movable chained list, originally the empty chain table in activity chain table position becomes inactive chained list, the Token that newly transfers to afterwards this scheduling chained list will be placed in the afterbody of inactive chained list, as shown in Figure 5.
Token moving algorithm:
The Token that represents a flow moves between each scheduling chained list, thereby obtain the dispatcher meeting of corresponding proportion, when Token then serviced, its corresponding flow will be issued a dispatcher meeting, then scheduler according to the WFQ weight calculation of this flow go out this flow next time serviced institute should in the counter moment, and constantly find corresponding scheduling chained list according to counter, this Token is put into the inactive chained list afterbody of this scheduling chained list.
The WFQ scheduler that the minimum precision of take is 1/16 is example, needs 4 digit counters, and the corresponding relation of all count values and scheduling chained list is as shown in table 2.
Table 2
Count value Scheduling chained list
0000 Do not use
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)
As can be seen from Table 2, the Q of weight 1/2 (0) is spaced apart 2 in count value, the Q of weight 1/4 (1) is spaced apart 4 in count value, by that analogy, and the occupied counter of the scheduling chained list of low one-level weight is always positioned at the occupied contiguous counter of high one-level weight scheduling chained list centre position constantly constantly, according to this feature, can obtain following algorithm and calculate the next counter of Token position:
1: the WFQ weight weight limit position of finding out the flow that this Token is corresponding:
j=N-1-max{k,for all K’s where Wk=1};
The weight comprising as flow is that 1/4+1/16 is expressed as " 0101 ", and j=1, if the weight of flow is 1/2 to be expressed as " 1000 ", j=0.
2: according to weight limit position, obtain the cumulative step value of counter:
I=0001<<j,
Be that weight limit is 1/2 o'clock, step value is 1, and weight limit is 1/4 o'clock, and step value is 2, and weight limit is 1/8 o'clock, and step value is 4, and the rest may be inferred.
3: current counter is added to step value obtains new Counter Value:
D=(Scurrent+I)mod(2N),
Scurrent is current count value, and I is step value, and N is counter bit number, if cumulative rear the overflowing of counter, remainder.
4: the minimum non-zero position of finding out D:
p=min(t,for all T’s where Dt=1),
If i.e. D=xxx1, p=0, if D=xx10, p=1, the rest may be inferred.If the weighted value Wp of corresponding this flow of p is 1, Token is put in Q (p), if the weighted value Wp of corresponding this flow of p is 0, Token is put in Q (j).
This algorithm can be understood simply like this: because the residing counter of all low weight scheduling chained lists is constantly inevitable in highest weighting (the highest effective weight of a flow) the scheduling chained list centre position in the corresponding counter moment, so only need to add up according to the step value of highest weighting, if scheduling chained list corresponding to count value after cumulative meets the weight of this flow, show that this counter constantly need to provide dispatcher meeting, otherwise this counter constantly does not need to provide dispatcher meeting, that is exactly the corresponding counter moment of highest weighting scheduling chained list from this nearest counter of counter moment constantly.
Take weight 0101 as example, this flow should be issued dispatcher can the moment as shown in table 3.
Table 3
Count value Whether should provide dispatcher meeting Corresponding scheduling chained list
0000
0001
0010 Be Q(1)
0011
0100
0101
0110 Be Q(1)
0111
1000 Be Q(3)
1001
1010 Be Q(1)
1011
1100
1101
1110 Be Q(1)
1111
Flow counter be 0010 o'clock serviced, need to determine now its serviced moment next time, should be 0110 constantly as can be seen from Table 3.While being shown " 0101 " according to weight table, obtain j=1, obtaining step value I=0001<<1 is 2, so new count value D=0100, the least significant non-zero position p of D is 2, the corresponding weights W p1/8 of p is 0, so this Token can only be put in the scheduling chained list Q (1) of highest weighting 1/4 correspondence, Q (1) will equal this flow to be provided to dispatcher meeting at 0110 o'clock at counter.
Flow was issued dispatcher meeting by 0110 o'clock at counter meter, then carry out same calculating, because highest weighting is always 1/4, so step value is also 2 all the time, obtain new count value D=1000, the least significant non-zero position p of D is 3, the corresponding weights W p1/16 of p is 1, therefore 1000 this constantly should be serviced, 1000 countings constantly corresponding scheduling chained lists are Q (3), therefore this Token is put in Q (3), this flow will counter reach 1000 o'clock serviced.The rest may be inferred in calculating below.
Token adds scheduler algorithms:
When the token bucket that becomes non-NULL or its corresponding reshaper from dummy status in queue becomes non-NULL from space-variant, its Token of correspondence need to be put in scheduling chained list, add Token identical to the scheduling algorithm of chained list and the algorithm of mobile Token, all to calculate according to the weighted value of the value of current counter and queue, determine it should scheduling chained list.
Counter accumulation algorithm:
The activity queue of current scheduling chained list serviced complete after, counter need to add up to obtain a new count value, according to the next scheduling of this new count value service chained list.
1: in all non-NULL scheduling chained lists and current scheduling chained list, select a weight limit scheduling chained list;
2: cumulative (with reference to the step 2 of Token moving algorithm) of carrying out count value according to the step value of the weight limit scheduling chained list of selecting.
3: if the count value after cumulative can be dispatched chained list correspondence with non-NULL, the count value after adding up is New count value.If the count value after cumulative could not to dispatch chained list corresponding with non-NULL, between scheduling chained list corresponding to cumulative rear count value and non-empty queue, select a weight limit scheduling chained list, repeating step 1 and 2, until find a new count value and non-empty queue correspondence, shown in Fig. 6.
Fig. 6 current count value is 1, and Q0 is empty after having served Q0, other non-empty queue only has Q11, and count value corresponding to Q11 should be 2048, in this example, iteration count value jumps to Q1 for the first time, but Q1 is empty, take Q1 again as basis, and iteration jumps to Q2 for the second time, has jumped to Q11 like this by 11 iteration.
Adopt this iterative manner finally certainly can find the corresponding non-empty queue of a count value, but the iterations needing is uncertain, needs at most iteration 11 times, can cause the overlong time of scheduling.
Summary 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 device, overcomes the too much problem of counter accumulation algorithm iterations.
In order to solve the problems of the technologies described above, the invention provides a kind of fixed length bag Weighted Fair Queuing dispatching method, comprise: when the current counting of counter, inscribed after the task scheduling of scheduling chained list, calculate respectively and in each non-NULL scheduling chained list, be greater than the nearest count value to be dispatched of distance current count value in described current counting moment direction, using nearest one of current count value described in the count value middle distance to be dispatched calculating as next count value.
Further, said method can also have following characteristics:
Calculate in each non-NULL scheduling chained list, be greater than described current counting constantly in direction the method for the nearest count value to be dispatched of distance current count value specifically comprise:
X low order determining the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV;
When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
Further, said method can also have following characteristics:
Described X and described Y's and be the total bit of standard meter numerical value.
Further, said method can also have following characteristics:
When BV is less than or equal to CV, after in the Y of current count value high invalid bit, lowest order adds 1, the figure place of current count value adds 1, and wherein high invalid bit number is Y+1.
Further, said method can also have following characteristics:
Weight is that the low order number of the standard meter numerical value that 1/2 scheduling chained list is corresponding is 1, and except this 1 low order, position is high invalid bit;
Weight is that the low order number of the standard meter numerical value that 1/4 scheduling chained list is corresponding is 2, and the position except these 2 low orders is high invalid bit;
By that analogy;
Weight is that the low order number of the standard meter numerical value that 1/2048 scheduling chained list is corresponding is 11, and the position except these 11 low orders is high invalid bit.
In order to solve the problems of the technologies described above, the present invention also provides a kind of fixed length bag Weighted Fair Queuing dispatching device, and described device comprises: count value administration module, computing module;
Described computing module, is greater than the nearest count value to be dispatched of distance current count value in described current counting moment direction for calculating each non-NULL scheduling chained list;
Described count value administration module, be used for having inscribed after the task scheduling of scheduling chained list when the current counting of counter, trigger described computing module, nearest one of current count value is as next count value described in the count value middle distance to be dispatched that described computing module is calculated.
Further, said apparatus can also have following characteristics:
Described computing module, specifically for determining that X low order of the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV; When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
Further, said apparatus can also have following characteristics:
Described X and described Y's and be the total bit of standard meter numerical value.
Further, said apparatus can also have following characteristics:
Described computing module, also for when BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bit, adds 1 by the figure place of current count value, and wherein high invalid bit number is Y+1.
Further, said apparatus can also have following characteristics:
Weight is that the low order number of the standard meter numerical value that 1/2 scheduling chained list is corresponding is 1, and except this 1 low order, position is high invalid bit;
Weight is that the low order number of the standard meter numerical value that 1/4 scheduling chained list is corresponding is 2, and the position except these 2 low orders is high invalid bit;
By that analogy;
Weight is that the low order number of the standard meter numerical value that 1/2048 scheduling chained list is corresponding is 11, and the position except these 11 low orders is high invalid bit.
This programme has adopted a kind of lowest difference to substitute the counter accumulation algorithm in former patent apart from algorithm, defect for patent WO03084283A2 Counter accumulation algorithm, overcome the too much problem of counter accumulation algorithm iterations, make counter accumulation algorithm adapt to scheduling requirement at a high speed.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the counting moment and scheduling chained list;
Fig. 2 has the schematic diagram of a plurality of flow in a scheduling chained list;
Fig. 3 is the mobile schematic diagram of Token;
Fig. 4 is the distribution schematic diagram of Token;
Fig. 5 is the conversion schematic 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.
Embodiment
As shown in Figure 7, in this programme, fixed length bag Weighted Fair Queuing dispatching method comprises: when the current counting of counter, inscribed after the task scheduling of scheduling chained list, calculate respectively and in each non-NULL scheduling chained list, be greater than in described current count value direction the constantly nearest count value to be dispatched of current counting described in distance, using nearest one of current count value described in the count value middle distance to be dispatched calculating as next count value.
Wherein, calculating the method that is greater than in described current count value direction the constantly nearest count value to be dispatched of current counting described in distance in each non-NULL scheduling chained list specifically comprises: X low order determining the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV; When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
Described X and described Y's and be the total bit of standard meter numerical value.
Wherein, when BV is less than or equal to CV, after in the Y of current count value high invalid bit, lowest order adds 1, the figure place of current count value adds 1, and wherein high invalid bit number is Y+1.
As shown in table 1, the low order number of the standard meter numerical value that scheduling chained list that weight is 1/2 is corresponding is 1, and except this 1 low order, position is high invalid bit; Weight is that the low order number of the standard meter numerical value that 1/4 scheduling chained list is corresponding is 2, and the position except these 2 low orders is high invalid bit; By that analogy; Weight is that the low order number of the standard meter numerical value that 1/2048 scheduling chained list is corresponding is 11, and the position except these 11 low orders is high invalid bit.
Take Fig. 8 as example, and current count value is that 5, Q2 and Q3 are non-NULL scheduling chained list.
Calculate in Q2 and be greater than the nearest count value to be dispatched of distance current count value in current counting moment direction: 3 low order BV that determine the standard meter numerical value (XXXXXXXXX100) that Q2 is corresponding are 100, current Counter Value 5=000000000101, its 3 low order CV are 101,9 high invalid bit CE of current Counter Value 5 are 000000000, BV is less than CV, so S corresponding to Q2 nextfor { CE+1, BV}={000000001100}, 12.
Calculate in Q3 and be greater than the nearest count value to be dispatched of distance current count value in current counting moment direction: 4 low order BV that determine the standard meter numerical value (XXXXXXXX1000) that Q3 is corresponding are 1000, current Counter Value 5=000000000101, its 4 low order CV are 0101,8 high invalid bit CE of current Counter Value 5 are 000000000, BV is greater than CV, so S corresponding to Q3 nextfor { CE, BV}={000000001000}, 8.
So New count value should select 8 as New count value.
This algorithm need to carry out plus and minus calculation and what comparison operation, and combinational logic scale may be larger, but fix computing time, should within 2,3 clock cycle, complete.Therefore lowest difference apart from algorithm be really can be practical algorithm, be also key improvements point of the present invention.
Should be noted that it is that lowest difference also can be applied on Token moving algorithm apart from algorithm, if implementation complexity is less than Token moving algorithm noted earlier, can be substituted.
Fixed length bag Weighted Fair Queuing dispatching device in this case comprises: count value administration module, computing module.
Described computing module, is greater than the nearest count value to be dispatched of distance current count value in described current counting moment direction for calculating each non-NULL scheduling chained list;
Described count value administration module, be used for having inscribed after the task scheduling of scheduling chained list when the current counting of counter, trigger described computing module, nearest one of current count value is as next count value described in the count value middle distance to be dispatched that described computing module is calculated.
Described computing module, specifically for determining that X low order of the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV; When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
Described X and described Y's and be the total bit of standard meter numerical value.
Described computing module, also for when BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bit, adds 1 by the figure place of current count value, and wherein high invalid bit number is Y+1.
It should be noted that, in the situation that not conflicting, the embodiment in the application and the feature in embodiment be combination in any mutually.
Certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art can make according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
One of ordinary skill in the art will appreciate that all or part of step in said method can come instruction related hardware to complete by program, described program can be stored in computer-readable recording medium, as read-only memory, disk or CD etc.Alternatively, all or part of step of above-described embodiment also can realize with one or more integrated circuits.Correspondingly, each the module/unit in above-described embodiment can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.The present invention is not restricted to the combination of the hardware and software of any particular form.

Claims (10)

1. a fixed length bag Weighted Fair Queuing dispatching method, is characterized in that,
When the current counting of counter, inscribed after the task scheduling of scheduling chained list, calculate respectively and in each non-NULL scheduling chained list, be greater than the nearest count value to be dispatched of distance current count value in described current counting moment direction, using nearest one of current count value described in the count value middle distance to be dispatched calculating as next count value.
2. the method for claim 1, is characterized in that,
Calculate in each non-NULL scheduling chained list, be greater than described current counting constantly in direction the method for the nearest count value to be dispatched of distance current count value specifically comprise:
X low order determining the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV;
When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
3. method as claimed in claim 2, is characterized in that,
Described X and described Y's and be the total bit of standard meter numerical value.
4. method as claimed in claim 2, is characterized in that,
When BV is less than or equal to CV, after in the Y of current count value high invalid bit, lowest order adds 1, the figure place of current count value adds 1, and wherein high invalid bit number is Y+1.
5. method as claimed in claim 2, is characterized in that,
Weight is that the low order number of the standard meter numerical value that 1/2 scheduling chained list is corresponding is 1, and except this 1 low order, position is high invalid bit;
Weight is that the low order number of the standard meter numerical value that 1/4 scheduling chained list is corresponding is 2, and the position except these 2 low orders is high invalid bit;
By that analogy;
Weight is that the low order number of the standard meter numerical value that 1/2048 scheduling chained list is corresponding is 11, and the position except these 11 low orders is high invalid bit.
6. a fixed length bag Weighted Fair Queuing dispatching device, is characterized in that,
Described device comprises: count value administration module, computing module;
Described computing module, is greater than the nearest count value to be dispatched of distance current count value in described current counting moment direction for calculating each non-NULL scheduling chained list;
Described count value administration module, be used for having inscribed after the task scheduling of scheduling chained list when the current counting of counter, trigger described computing module, nearest one of current count value is as next count value described in the count value middle distance to be dispatched that described computing module is calculated.
7. device as claimed in claim 6, is characterized in that,
Described computing module, specifically for determining that X low order of the standard meter numerical value that described non-NULL scheduling chained list is corresponding is called BV, determines that X low order of current count value is called CV; When BV is greater than CV, the value that X low order in the Y of current count value high invalid bit and described BV is formed is greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance in this non-NULL scheduling chained list; When BV is less than or equal to CV, lowest order in the Y of current count value high invalid bit is added in Y high invalid bit after 1 and described BV to value that X low order forms and in this non-NULL scheduling chained list, be greater than in described current count value direction nearest count value to be dispatched of the current counting moment described in distance.
8. device as claimed in claim 6, is characterized in that,
Described X and described Y's and be the total bit of standard meter numerical value.
9. device as claimed in claim 6, is characterized in that,
Described computing module, also for when BV is less than or equal to CV, after lowest order adds 1 in the Y of current count value high invalid bit, adds 1 by the figure place of current count value, and wherein high invalid bit number is Y+1.
10. device as claimed in claim 6, is characterized in that,
Weight is that the low order number of the standard meter numerical value that 1/2 scheduling chained list is corresponding is 1, and except this 1 low order, position is high invalid bit;
Weight is that the low order number of the standard meter numerical value that 1/4 scheduling chained list is corresponding is 2, and the position except these 2 low orders is high invalid bit;
By that analogy;
Weight is that the low order number of the standard meter numerical value that 1/2048 scheduling chained list is corresponding is 11, and the position except these 11 low orders is 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 true CN103546390A (en) 2014-01-29
CN103546390B 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 (4)

* 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
CN101739817A (en) * 2009-11-26 2010-06-16 西北工业大学 Shortest path planning method for dynamic origins

Patent Citations (4)

* 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
CN101739817A (en) * 2009-11-26 2010-06-16 西北工业大学 Shortest path planning method for dynamic origins

Non-Patent Citations (2)

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

Also Published As

Publication number Publication date
CN103546390B (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN103347259B (en) A kind of flow prompt method and system
JP5289588B2 (en) Method and system for calculating charges online based on user service volume
CN101676890B (en) Bus arbitration method for dynamically adjusting bandwidth allocation and arbitrator thereof
CN102457571A (en) Method for uniformly distributing data in cloud storage
CN109788489A (en) A kind of base station planning method and device
CN109948844A (en) A kind of optimization method, device, equipment and the medium of break indices robustness
CN109587072A (en) Distributed system overall situation speed limiting system and method
CN104580447A (en) Spatio-temporal data service scheduling method based on access heat
CN109191052A (en) A kind of multi-vehicle-type vehicle routing optimization method, server and system
CN108574645A (en) A kind of array dispatching method and device
CN107396445A (en) A kind of information reporting dispatching method, system, host device and slave devices
CN104866238A (en) Access request scheduling method and apparatus
CN112491742B (en) Method and device for scheduling edge computing terminal resources
CN111813524B (en) Task execution method and device, electronic equipment and storage medium
CN102780632A (en) Load sharing method and flow transmission equipment
CN114217944A (en) Dynamic load balancing method for neural network aiming at model parallelism
CN103546390A (en) Scheduling method and device for weighted fair queuing of fixed-length packets
CN109905331A (en) Array dispatching method and device, communication equipment, storage medium
CN112541610A (en) Robot control method, device, electronic device and storage medium
CN100420209C (en) Credible network simulation system of automatic conceptual contrast
CN110099061A (en) A kind of cloud platform video streaming services selection method and device
CN115640986A (en) Robot scheduling method, device, equipment and medium based on rewards
CN110309223A (en) Select method, system and the relevant device of back end
CN110234167B (en) Channel allocation method, channel allocation device and electronic equipment
CN102594670A (en) Multiport multi-flow scheduling method, device and equipment

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.