CN1972242A - A difference weight queue scheduling apparatus and scheduling method for network processor - Google Patents
A difference weight queue scheduling apparatus and scheduling method for network processor Download PDFInfo
- Publication number
- CN1972242A CN1972242A CN200510124024.9A CN200510124024A CN1972242A CN 1972242 A CN1972242 A CN 1972242A CN 200510124024 A CN200510124024 A CN 200510124024A CN 1972242 A CN1972242 A CN 1972242A
- Authority
- CN
- China
- Prior art keywords
- priority
- queue
- formation
- scheduling
- result
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
This invention discloses one difference right re-arrange line method based on network processor, which comprises the following steps: according to each line head frame length, each transmission wide band and last time transfer result computing wait transfer each priority; according to priority selecting subject from lines; sending dispatch result and deleting it from send frame and then repeating above operations. This invention also discloses one transfer device, which comprises priority buffer register, line send control device, priority compute device and line selection arbitrary device.
Description
Technical field
The present invention relates to data communication technology field, particularly a kind of difference weight queue dispatching device and dispatching method that is used for network processing unit.
Background technology
The growth at full speed of the network bandwidth and network demand for services requires network core device that the higher transmission bandwidth and the packet transaction ability of deep layer more can be provided.Network processing unit is replacing traditional GPP (general processor), ASIC (application-specific integrated circuit (ASIC)) and FPGA implementations such as (field programmable gate array) owing to have high speed processing performance and high flexible concurrently, becomes the core of next generation network equipment.This just requires network processing unit to provide and serves controlled function preferably, and particularly in order to satisfy the requirement of ever-increasing Differentiated Services, used dispatching method must have preferable performance.On the other hand, owing to be based on the design of hardware, used dispatching method also must have lower implementation complexity.
Fairness is to weigh the most important index of dispatching method performance, owing to there is bandwidth contention, the network switching equipment must reasonably carry out assignment of traffic according to the type of Business Stream, so that high-quality Differentiated Services to be provided.In the existing dispatching method, as FCFS (service earlier first), BR (step-by-step circulation wheel changes) and FQ methods such as (fair-queueings) early put forward, and these dispatching methods all can't satisfy the requirement of network Differentiated Services.WRR (changeing by weight circulation wheel), DRR (deficiency circulation wheel changes), SRR (superfluous circulation wheel changes) and ERR methods such as (the circulation wheel change flexibly) are the dispatching methods that changes based on the circulation wheel that a class can be used for Differentiated Services, their work complexity is lower, but its dynamic dispatching performance, fair performance and delay performance all are subjected to certain restriction.WFQ (Weighted Fair Queuing), WF
2Q methods such as (Weighted Fair Queuings under the worst case) is the dispatching method based on priority criteria that a class can be used for Differentiated Services, and fairness is better, particularly WF
2Q considers bursting problem, under worst case, still has fairness preferably.But owing to these class methods need be calculated virtual time usually and flow ordering, as WF
2Q also will compare with corresponding GPS (common treatment is shared) system, and the work complexity is higher, and realizes difficulty.Characteristics just because of existing various dispatching methods can not possess high-performance simultaneously, easily realize satisfy the specific (special) requirements that network processing unit designs so need to design a kind of new dispatching method.
Summary of the invention
The objective of the invention is to overcome existing dispatching method work complexity height, realize the shortcoming of difficulty, a kind of better fairness that has is provided, and can suppresses the dispatching method and the corresponding dispatching device of network burst transfer phenomenon.
To achieve these goals, the invention provides a kind of difference weight queue dispatching device that is used for network processing unit, comprise: the priority buffer register 3 that is used to preserve priority result of calculation, formation transmission control device 6 with the frame that is used for sending scheduling queue, also comprise the priority calculation element 1 that is used to calculate queue priority, arbitration device 5 is selected in formation; Priority calculation element 1 is according to the first frame length of stored each formation in the queue management parts of network processing unit and the transmission bandwidth ratio of each formation, calculate the priority of formation, the result of calculation of priority sends in the priority buffer register 3, formation selects arbitration device 5 to obtain the priority of each formation from priority buffer register 3, first frame length in conjunction with each formation, dispatching principle according to the difference weight queue dispatching method, select a formation as scheduling queue, and the result that will select sends in the formation transmission control device 6, the result who selects to be fed back in the priority calculation element 1 simultaneously, use when calculating for next priority; Formation transmission control device 6 send the frame in the scheduling queue, and the frame that notification queue management component will dispatch is deleted from respective queue according to the arbitration result of formation selection arbitration device 5.
In the technique scheme, described priority buffer register 3 is made up of activity queue's counter register and priority result register, activity queue's counter register is deposited the number of queues of each scheduling, and the priority result register is then deposited the result of calculation of queue priority.
Also comprise being used for the priority corrected parameter calculation element 2 that the priority corrected parameter calculates, be used to preserve the candidate queue buffer register 4 of candidate queue number; Priority calculation element 1 calculates the priority of formation according to the first frame length of stored each formation in the queue management parts of network processing unit and the transmission bandwidth ratio of each formation, and the result of calculation of priority sends in the priority buffer register 3; Priority corrected parameter calculation element 2 is according to the frame length of each formation, and the calculating priority level corrected parameter by priority corrected parameter decision candidate queue, and number sends to candidate queue in the candidate queue buffer register 4; Formation selects arbitration device 5 to obtain candidate queue, and the priority of candidate queue by candidate queue buffer register 4, priority buffer register 3, first frame length in conjunction with candidate queue, dispatching principle according to the difference weight queue dispatching method, select a formation as scheduling queue, and the result that will select sends in the formation transmission control device 6, the result who selects to be fed back in priority calculation element 1 and the priority corrected parameter calculation element 2 simultaneously, use when calculating for next priority; Formation transmission control device 6 send the frame in the scheduling queue, and the frame that notification queue management component will dispatch is deleted from respective queue according to the arbitration result of formation selection arbitration device 5.
Described candidate queue buffer register 4 is made up of candidate queue counter register and candidate queue register, and the candidate queue counter register is deposited the number of each scheduling candidate queue, and candidate queue number then leaves in the candidate queue register successively.
A kind of difference weight queue dispatching method that is used for network processing unit comprises:
1), according to the first frame length of each formation, the transmission bandwidth ratio of each formation, calculate to wait for the priority of each formation of scheduling;
2), the priority that obtains according to step 1), selection scheduling object from candidate queue;
3), according to step 2) the result, send scheduling result, and transmit frame deleted from formation, return step 1) then and dispatch next time, the result of this scheduling is used for the calculating of priority next time when dispatching.
In the described step 1), the computing formula of queue priority is:
Wherein, R
i kExpression priority;
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
S
kRepresent when scheduling the k time, the flow queue that is scheduled number;
P
iThe shared transmission bandwidth ratio of expression flow queue i.
Described step 2) in, when the selection scheduling object, from candidate queue, select the formation of priority minimum, if there is the priority of a plurality of formations identical, and value all is minimum, then select the formation of first frame length minimum,, then select the formation of queue number minimum if priority is identical and first frame length is also identical.
A kind of difference weight queue dispatching method with the priority corrected parameter comprises:
A), according to the transmission bandwidth of the first frame length of each formation, each formation than and the result of last scheduled, calculate the priority and the priority corrected parameter of each formation of waiting for scheduling;
B), investigate the resulting priority corrected parameter of step a) and determine candidate queue;
C), the priority that obtains according to step a), selection scheduling object from the candidate queue that step b) obtains;
D), according to the result of step c), send scheduling result, and transmit frame deleted from formation, return step a) then and dispatch next time.
In the described step a), the computing formula of queue priority is:
Wherein, R
i kExpression priority (i is a queue number, and k is a scheduling times);
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
S
kRepresent when scheduling the k time, the flow queue that is scheduled number;
P
iThe shared transmission bandwidth ratio of expression flow queue i.
In the described step a),
The computing formula of described priority corrected parameter is:
Wherein, V
i kExpression priority corrected parameter;
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
In the described step b), when selecting candidate queue, select the priority corrected parameter smaller or equal to 0 formation as candidate queue, if there is no the priority corrected parameter is smaller or equal to 0 formation, then with all formations as candidate queue.
In the described step c), when the selection scheduling object, select the formation of priority minimum, if there is the priority of a plurality of formations identical, and value all is minimum, then selects the formation of first frame length minimum, if priority is identical and first frame length is also identical, then select the formation of queue number minimum.
The invention has the advantages that:
1, have fairness preferably,
2, can suppress the generation of the burst transfer phenomenon of network.
3, has lower work complexity.
Description of drawings
Fig. 1 is the schematic diagram that utilizes the embodiment that difference weight queue dispatching method of the present invention works as dispatcher to flow queue;
The schematic diagram of Fig. 2 embodiment that to be the difference weight queue dispatching method that utilizes band priority corrected parameter of the present invention work as dispatcher to flow queue;
Fig. 3 is the schematic diagram that utilizes difference weight queue dispatching method inhibition network burst phenomenon of the present invention, wherein:
Fig. 3 (a) is the schematic diagram of the length of each flow queue;
Fig. 3 (b) is when not adopting the dispatching method of priority corrected parameter, the dispatching sequence of the frame in each formation;
Fig. 3 (c) is when adopting the dispatching method of priority corrected parameter, the dispatching sequence of the frame in each formation;
Fig. 4 is the structure chart of a kind of implementation of the difference weight queue dispatching device that is used for network processing unit of the present invention;
Fig. 5 is the structure chart of the another kind of implementation of the difference weight queue dispatching device that is used for network processing unit of the present invention;
Fig. 6 (a) is the schematic diagram of priority buffer register;
Fig. 6 (b) is the schematic diagram of candidate queue buffer register;
Fig. 7 is the operational flowchart that is used for the difference weight queue dispatching device of network processing unit of the present invention;
Fig. 8 is the flow chart of difference weight queue dispatching method of the present invention.
The drawing explanation:
1 priority calculation element, 2 priority corrected parameter calculation elements
3 priority buffer register groups, 4 candidate queue buffer registers
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments.
Before difference weight queue dispatching method of the present invention is elaborated, at first employed main calculating parameter in this method is described.
R: the total transmission speed of system;
r
i: distribute to the transmission speed of flow queue i, ∑ r
i=r (i=0,1,2...n-1, n are the flow queue number, below identical);
L
i k: during the k time scheduling, the length of the first frame of flow queue i;
s
k: the k time the scheduling, the flow queue that is scheduled number;
P
i: the shared total transmission bandwidth ratio of flow queue i,
D
i k: during the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor (this factor promptly is sent completely the time divided by r),
R
i k: the k time scheduling, the priority of flow queue i.
Difference weight queue dispatching method of the present invention may further comprise the steps:
The priority of each formation of scheduling is waited in step 10, calculating.Use R
i kExpression priority, the computational methods of priority as shown in Equation (1).
In addition, when a formation became activity queue's (non-empty queue) by non-activity queue (empty queue), its priority, had promptly for flow queue i for the first frame of stream i expectation is sent completely time factor
Step 20, from candidate queue the selection scheduling object.The dispatching principle of difference weight queue dispatching method of the present invention is: select the formation of priority minimum, if there is the priority of a plurality of formations identical, and value all is minimum, then selects the formation of first frame length minimum, selects the formation of queue number minimum if priority and first frame length all equate.According to above-mentioned dispatching principle, select the formation that to dispatch.
Step 30, send scheduling result, and transmit frame is deleted from formation, return step 10 then and dispatch next time.
With reference to the accompanying drawings 1, embodiment 1 is an application example that utilizes above-mentioned dispatching algorithm to dispatch according to priority.3 formations to be scheduled are arranged, be respectively No. 0, No. 1 and No. 2 formations, the transmission bandwidth ratio that No. 0 formation distributed is that transmission bandwidth ratio that 0.5, No. 1 formation distributed is that the transmission bandwidth ratio that 0.2, No. 2 formation distributed is 0.3.Above-mentioned transmission bandwidth is than not changing in scheduling process.In No. 0 formation, the length of first frame is that the first frame length of 5, No. 1 formations is that the first frame length of 2, No. 2 formations is 3.According to the priority computational methods in the formula (1), when dispatching for the first time,
And
So the priority of No. 0 formation is 5/0.5=10, the priority of No. 1 formation is 2/0.2=10, and the priority of No. 2 formations is 3/0.3=10.The priority of each formation is identical, therefore, compares the first frame length of individual queue.The first frame length of No. 1 formation is 2, and therefore minimum is called the first frame of No. 1 formation, and this frame is deleted from formation when dispatching for the first time, enters scheduling for the second time then.When dispatching for the second time, the priority of each formation need recomputate.When calculating priority level, select the latter half of formula (1) for use.To No. 0 formation, therefore the formation of being called when this formation is not last scheduled, selects computing formula for use
Be scheduled when the deducting last scheduled first frame length of formation of queue priority during just with last scheduled, the priority of formation in the time of promptly can obtaining this scheduling.The priority of No. 0 formation when dispatching for the second time is 10-2=8.Same, the priority that can obtain No. 2 formations is 10-2=8.Because No. 1 formation is the formation of scheduling when dispatching for the first time, the priority computational methods of this formation are different.Its computing formula is
Be scheduled when the deducting last scheduled first frame length of formation of queue priority during just with last scheduled, when adding this scheduling, the first frame of flow queue i expectation is sent completely time factor, the priority of formation in the time of promptly can obtaining this scheduling.The priority of No. 1 formation is 10-2+2/0.2=18.Obtain after the priority of 3 formations,, at first select the formation of priority minimum according to dispatching principle.Obviously, No. 0 formation is identical with the priority of No. 2 formations, more first frame length.The first frame length of No. 2 formations is less, therefore, when dispatching for the second time, calls the first frame of No. 2 formations, and this frame is deleted from formation, enters scheduling for the third time then.The rest may be inferred, can realize the scheduling to other frames in the formation.
Difference weight queue dispatching method of the present invention described above has been considered allocated bandwidth and frame length, has certain fairness, is suitable for packet switching.This dispatching method has fair performance and the delay performance near WFQ, has suitably reduced the computation complexity of virtual time simultaneously, and it also takes all factors into consideration all activity queue's states, has the better dynamic scheduling performance.But should see that also there is certain defective in this dispatching method, produce burst phenomenon possibly.Described burst phenomenon mainly is meant, reason owing to dispatching algorithm, the network processing unit certain port may be concentrated at set intervals and send a secondary data, and all can concentrate the transmission mass data at every turn, flow increases suddenly in certain port a period of time thereby cause, and other a period of time does not have or has only seldom flow, and this phenomenon can cause the inefficacy of network congestion control algolithm, so should avoid as far as possible.
In order to suppress the generation of burst phenomenon, difference weight queue dispatching method of the present invention can also increase the priority corrected parameter to realize the correction to priority.In the present invention, use V
i kExpression priority corrected parameter, when it represents to dispatch for the k time, the difference of the medium frame to be scheduled of flow queue i delivery time and current time in corresponding gps system.Utilize this priority corrected parameter can make the delivery time of the first frame of each flow queue be no earlier than the delivery time of frame in the corresponding gps system.
The difference weight queue dispatching method of band priority corrected parameter may further comprise the steps:
Step 40: the priority and the priority corrected parameter that calculate each formation of waiting for scheduling.The computational methods of priority are identical with step 10, the computational methods of priority corrected parameter such as formula (2).
This computing formula is represented: when dispatching for the first time, the priority corrected parameter of all candidate queue all is 0.In other scheduling, if a formation is the formation of being dispatched when last scheduled, then the priority corrected parameter of this formation is that the priority corrected parameter of this formation when last scheduled deducts the first frame length of this formation when last scheduled, and then when adding last scheduled, the first frame of flow queue i expectation is sent completely time factor (promptly
If the formation that a formation is dispatched when being not last scheduled, then the priority corrected parameter of this formation be the priority corrected parameter of this formation when last scheduled time that deducts last scheduled institute's scheduling queue first frame length (
)。
Step 50: selection scheduling object from candidate queue.After the priority corrected parameter was arranged, the dispatching principle of formation also changed to some extent.Whether the dispatching principle of the difference weight queue dispatching method of band priority corrected parameter is: at first search and exist the priority corrected parameter to be less than or equal to zero flow queue, if exist, with the candidate queue of these flow queues as current scheduling, from candidate queue, select the formation of priority minimum then, if the priority minimum of a plurality of formations is arranged, then selects the shortest formation of first frame length; If do not exist the priority corrected parameter to be less than or equal to zero flow queue, then with all formations all as candidate queue, and then select the minimum and the shortest formation of first frame length of priority; The result that above-mentioned selection obtains is exactly the formation that will dispatch.
Step 60, send scheduling result, and transmit frame is deleted from formation, return step 40 then and dispatch next time.
With reference to the accompanying drawings 2, embodiment 2 is on the basis of embodiment 1, the difference weight queue dispatching method is increased an application example of priority corrected parameter.Identical with embodiment 1, in this embodiment, 3 formations to be scheduled are arranged, be respectively No. 0, No. 1 and No. 2 formations, the transmission bandwidth ratio that No. 0 formation distributed is that transmission bandwidth ratio that 0.5, No. 1 formation distributed is that the transmission bandwidth ratio that 0.2, No. 2 formation distributed is 0.3.When dispatching for the first time, the priority of No. 0, No. 1 and No. 2 formation all is 10, and according to formula (2), the priority corrected parameter of No. 0, No. 1 and No. 2 formation all is 0, so select formation after 0,1, No. 3 formation all belongs to.Because the priority of three formations is 10,,, select No. 1 the shortest formation of frame length again as the object of dispatching for the first time according to scheduling rule at this moment because the first frame length of No. 1 formation is the shortest.When dispatching for the second time, according to formula
(s
k≠ i), the priority corrected parameter of No. 0 formation is 0-2=-2.Same, the priority corrected parameter of No. 2 formations is-2.No. 1 formation is the object of dispatching for the first time, and the computing formula of the priority corrected parameter of this formation is
So the priority corrected parameter of No. 1 formation is 0-2+2/0.2=8.Because the priority corrected parameter of 0, No. 2 formation is a negative, so these two formations are candidate queue, compare the priority and the first frame length of these two formations again, last, when dispatching for the second time, call No. 2 formations.When dispatching for the third time, because the priority corrected parameter that has only No. 0 formation is smaller or equal to 0, so directly select No. 0 formation as scheduler object.The rest may be inferred, can realize the scheduling of other frames in the formation.
By the description of embodiment 2, a formation is after being scheduled, and the priority corrected parameter of this formation can become greatly, is unfavorable for that this formation is selected when dispatching next time, therefore the burst phenomenon in the Network Transmission is had the obvious suppression effect.Be with the effect of the difference weight queue dispatching method of priority corrected parameter to describe below in conjunction with 3 pairs in accompanying drawing.
Be diadic in network traffics and distribute under the situation of (Two-value Distribution), when the average length of frame near the time, use general dispatching algorithm that burst phenomenon takes place easily.As in the example shown in Fig. 3 (a), the length of supposing each flow queue frame is identical, when the shared bandwidth ratio of stream S1 is 0.5, other flows shared bandwidth ratio is 0.1 o'clock, if do not use the priority corrected parameter, only to dispatch according to the base priority scheduling rule of difference weight queue dispatching method, the sending order of each flow queue frame is shown in Fig. 3 (b), wherein S1 fails to be convened for lack of a quorum to concentrate at set intervals and sends once, thereby causes burst phenomenon.In the difference weight queue dispatching method, by utilizing the priority corrected parameter dispatching sequence is regulated, can suitably suppress burst phenomenon, accompanying drawing 3 (c) is to use the scheduling result behind the priority corrected parameter, can see, compare with the transmission result shown in Fig. 3 (b), send more smoothly, reduced the possibility of port burst.
In addition, the difference weight queue dispatching method also has lower work complexity.When using the difference weight queue dispatching method, the afterbody insertion that frame is joined the team and only need be carried out chained list, its computation complexity is O (1).Frame goes out team need carry out operations such as priority, the calculating of priority corrected parameter, scheduling queue selection, chain list deletion.The calculating of priority and priority corrected parameter and the time complexity that frame is needed O (1) from the chain list deletion, and the selection of scheduling queue is owing to will compare, its max calculation time complexity is O (logn) (n is the maximum number of flow queue), so the work complexity of whole difference weight queue dispatching method is O (logn).In addition, the priority of difference weight queue dispatching method and delay parameter calculate only needs simple plus and minus calculation, frame length L
i kOwing to be recorded in the relevant frame information structure, can directly obtain the bandwidth ratio P of each stream
iGenerally be provided with when initialization, and generally no longer change in running, so the difference weight queue dispatching method does not have special complicated parameter calculation, the realization of method is very simple.
Corresponding with difference weight queue dispatching method of the present invention is the difference weight queue dispatching device, as shown in Figure 4, for the corresponding difference weight queue dispatching device of difference weight queue dispatching method of the present invention.In Fig. 4, the part in the square frame is a difference weight queue dispatching device of the present invention, and the outer queue management parts of square frame are arranged in network processing unit.
This dispatching device comprises: arbitration device 5 and formation transmission control device 6 are selected in priority calculation element 1, priority buffer register group 3, formation.Priority calculation element 1 selects arbitration device 5 to link to each other with priority buffer register 3 with queue management parts, formation, is used for the calculating of queue priority; Priority buffer register 3 selects arbitration device 5 to link to each other with priority calculation element 1 and formation, is used to preserve the priority result calculated; The priority result of calculation of arbitration device 5 according to current queue queue is selected in formation, according to the dispatching principle of difference weight queue dispatching method, selects a formation as scheduling queue; Formation transmission control device 6 send the frame in the scheduling queue, and the frame that notification queue management component will dispatch is deleted from respective queue according to the arbitration result of formation selection arbitration device 5.
Above-mentioned difference weight queue dispatching device and aforesaid not corresponding with the dispatching method of priority corrected parameter, in this enforcement, a kind of difference weight queue dispatching method with the priority corrected parameter also is provided, as shown in Figure 5, for the corresponding difference weight queue dispatching device of the difference weight queue dispatching method of band priority corrected parameter of the present invention.In Fig. 5, the part in the square frame is a difference weight queue dispatching device of the present invention, and the outer queue management parts of square frame are arranged in network processing unit.
This dispatching device comprises: arbitration device 5 and formation transmission control device 6 are selected in priority calculation element 1, priority corrected parameter calculation element 2, priority buffer register group 3, candidate queue buffer register 4, formation.
The function of various piece and mutual annexation are as follows in these parts:
Priority corrected parameter calculation element 2 and queue management parts, formation selects arbitration device 5 to link to each other with candidate queue buffer register 4, priority corrected parameter calculation element 2 is obtained the information of the first frame of queue queue by the queue management parts, the arbitration result of selecting arbitration device 5 at every turn to be dispatched by formation, information according to the first frame of queue queue, the arbitration result of each scheduling and the formula (2) of difference weight queue dispatching method carry out the calculating of priority corrected parameter, if exist the priority corrected parameter smaller or equal to 0 formation, then with these formations as candidate queue, otherwise with all formations as candidate queue.Candidate result is stored in the candidate queue buffer register 4, and priority corrected parameter calculation element 2 also is responsible for and is responsible for selecting arbitration device 5 to send requests for arbitration to formation simultaneously.
Candidate queue buffer register 4 selects arbitration device 5 to link to each other with priority corrected parameter calculation element 2 and formation, by priority corrected parameter calculation element 2 resulting candidate queue, it mainly was made up of candidate queue counter register and a plurality of candidate queue register when candidate queue buffer register 4 was responsible for depositing each scheduling.Shown in Fig. 5 (b), the candidate queue counter register is deposited the number of each scheduling candidate queue, candidate queue number then leaves in the candidate queue register successively, and formation selects arbitration device 5 to obtain candidate queue by visiting these registers, for the arbitration use.
The priority result of calculation of arbitration device 5 according to current queue queue is selected in formation, according to the dispatching principle of difference weight queue dispatching method, selects a formation as scheduling queue from candidate queue.It adopts the quicksort method usually in the candidate queue set, select the shortest formation of first frame length in the formation of priority minimum as scheduler object, the result of each arbitration will issue priority calculation element 1, priority corrected parameter calculation element 2 and formation transmission control device 6 simultaneously, and the above two will carry out the calculating of new priority and priority corrected parameter according to arbitration result.
Formation transmission control device 6 is selected arbitration device 5 resulting arbitration result according to formation, get the relevant parameter of scheduler object (frame), giving the next stage transmit block by transmit port with frame ranks, when sending the scheduling frame information, it also is responsible for the frame that notification queue management component will dispatch and deletes from respective queue.
Said apparatus can be by network processing unit is obtained as circuit design, and according to the described function of said apparatus, those of ordinary skill in the art need not creative work can obtain said apparatus.
When work, the component devices of each difference weight queue dispatching device is concurrent working, concrete operations step to each main device is described below, wherein to priority buffer register and candidate queue operation registers owing to be basic register read write operation, do not repeat them here.
As shown in Figure 6, the main operational steps of priority calculating and priority corrected parameter calculation element is as follows,
(1) at initial phase, this device is provided with the value of initialization priority and priority corrected parameter, and the arbitration result available flag is set.
(2) if arbitration result can with continue, otherwise wait for.
(3) the unavailable mark of arbitration result is set, reads queued frame information, calculating priority level and priority corrected parameter, and determine candidate queue according to the result.
(4) priority result of calculation and candidate queue number are write buffer register.
(5) send requests for arbitration, wait for arbitrating and finish.
(6), otherwise continue wait if receiving arbitration replys then continues.
(7) the arbitration result serviceable indicia is set and returns (2), carry out next view degree and calculate
Formation selects the main operational steps of arbitration device as follows
(1) initialization enters requests for arbitration loitering phase (2).
(2), otherwise wait for if requests for arbitration is arranged then continue.
(3) obtain the candidate queue set from candidate's buffer register, carry out priority ratio, determine scheduling queue.
(4) reply and arbitration result to priority calculating and priority corrected parameter calculation element transmission arbitration,, also be responsible for simultaneously asking and arbitration result to the transmission of formation transmission control device so that they can carry out the calculating of next view degree.
(5), otherwise continue to wait for if receiving to send replys then return (2).
The main operational steps of formation transmission control device is as follows
(1) initialization enters and sends request loitering phase (2).
(2), otherwise wait for if the request of transmission is arranged then continuation.
(3) send the information of scheduling frame to the next stage transmit block.
(4), then select arbitration device to send answer signal and return (2), otherwise continue to send to formation if the scheduling frame information has sent to finish.
Claims (12)
1, a kind of difference weight queue dispatching device that is used for network processing unit, comprise: the priority buffer register (3) that is used to preserve priority result of calculation, formation transmission control device (6) with the frame that is used for sending scheduling queue, it is characterized in that, also comprise the priority calculation element (1) that is used to calculate queue priority, arbitration device (5) is selected in formation; Wherein, described priority calculation element (1) is according to the first frame length of stored each formation in the queue management parts of network processing unit and the transmission bandwidth ratio of each formation, calculate the priority of formation, the result of calculation of priority sends in the priority buffer register (3), formation selects arbitration device (5) to obtain the priority of each formation from priority buffer register (3), first frame length in conjunction with each formation, dispatching principle according to the difference weight queue dispatching method, select a formation as scheduling queue, and the result that will select sends in the formation transmission control device (6), the result who selects to be fed back in the priority calculation element (1) simultaneously, use when calculating for next priority; Formation transmission control device (6) sends the frame in the scheduling queue according to the arbitration result of formation selection arbitration device (5), and scheduling result is turned back in the queue management parts.
2, the difference weight queue dispatching device that is used for network processing unit according to claim 1, it is characterized in that, described priority buffer register (3) is made up of activity queue's counter register and priority result register, activity queue's counter register is deposited the number of queues of each scheduling, and the priority result register is then deposited the result of calculation of queue priority.
3, the difference weight queue dispatching device that is used for network processing unit according to claim 2, it is characterized in that, also comprise being used for the priority corrected parameter calculation element (2) that the priority corrected parameter calculates, be used to preserve the candidate queue buffer register (4) of candidate queue number; Priority calculation element (1) is according to the first frame length of stored each formation in the queue management parts of network processing unit and the transmission bandwidth ratio of each formation, calculate the priority of formation, the result of calculation of priority sends in the priority buffer register (3); Priority corrected parameter calculation element (2) is according to the frame length of each formation, and the calculating priority level corrected parameter by priority corrected parameter decision candidate queue, and number sends to candidate queue in the candidate queue buffer register (4); Formation selects arbitration device (5) to obtain candidate queue, and the priority of candidate queue by candidate queue buffer register (4), priority buffer register (3), first frame length in conjunction with candidate queue, dispatching principle according to the difference weight queue dispatching method, select a formation as scheduling queue, and the result that will select sends in the formation transmission control device (6), the result who selects to be fed back in priority calculation element (1) and the priority corrected parameter calculation element (2) simultaneously, use when calculating for next priority; Formation transmission control device (6) send the frame in the scheduling queue, and the frame that notification queue management component will dispatch is deleted from respective queue according to the arbitration result of formation selection arbitration device (5).
4, difference weight queue dispatching device according to claim 3, it is characterized in that, described candidate queue buffer register (4) is made up of candidate queue counter register and candidate queue register, the candidate queue counter register is deposited the number of each scheduling candidate queue, and candidate queue number then leaves in the candidate queue register successively.
5, a kind of difference weight queue dispatching method that is applied on the described difference weight queue dispatching device that is used for network processing unit of claim 1 comprises:
1), start priority calculation element (1), according to the first frame length of each formation, the transmission bandwidth ratio of each formation, calculate the priority of each formation of waiting for scheduling;
2), the priority that obtains according to step 1), arbitration device (5) selection scheduling object from candidate queue is selected in formation;
3), according to step 2) the result, formation transmission control device (6) sends scheduling result, and transmit frame is deleted from formation, returns step 1) then and dispatches next time, the result of this scheduling is used for the calculating of priority next time when dispatching.
6, the difference weight queue dispatching method that is used for network processing unit according to claim 5 is characterized in that, in the described step 1), the computing formula of queue priority is:
Wherein, R
i kExpression priority;
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
S
kRepresent when scheduling the k time, the flow queue that is scheduled number;
P
iThe shared transmission bandwidth ratio of expression flow queue i.
7, the difference weight queue dispatching method that is used for network processing unit according to claim 5, it is characterized in that, described step 2) in, when the selection scheduling object, from candidate queue, select the formation of priority minimum, if there is the priority of a plurality of formations identical, and value all is minimum, then select the formation of first frame length minimum,, then select the formation of queue number minimum if priority is identical and first frame length is also identical.
8, the difference weight queue dispatching method of the corresponding band priority of the described difference weight queue dispatching device of a kind of and claim 3 corrected parameter comprises:
A), according to the transmission bandwidth of the first frame length of each formation, each formation than and the result of last scheduled, calculate the priority and the priority corrected parameter of each formation of waiting for scheduling;
B), investigate the resulting priority corrected parameter of step a) and determine candidate queue;
C), the priority that obtains according to step a), selection scheduling object from the candidate queue that step b) obtains;
D), according to the result of step c), send scheduling result, and transmit frame deleted from formation, return step a) then and dispatch next time.
9, the difference weight queue dispatching method that is used for the band priority corrected parameter of network processing unit according to claim 8 is characterized in that in the described step a), the computing formula of queue priority is:
Wherein, R
i kExpression priority (i is a queue number, and k is a scheduling times);
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
S
kRepresent when scheduling the k time, the flow queue that is scheduled number;
P
iThe shared transmission bandwidth ratio of expression flow queue i.
10, the difference weight queue dispatching method that is used for the band priority corrected parameter of network processing unit according to claim 8 is characterized in that, in the described step a),
The computing formula of described priority corrected parameter is:
Wherein, V
i kExpression priority corrected parameter;
L
i kWhen representing the k time scheduling, the length of the first frame of flow queue i;
D
i kWhen representing the k time scheduling, flow queue i is according to the transmission speed of distributing, and desired first frame is sent completely time factor,
11, the difference weight queue dispatching method that is used for the band priority corrected parameter of network processing unit according to claim 8, it is characterized in that, in the described step b), when selecting candidate queue, select the priority corrected parameter smaller or equal to 0 formation as candidate queue, if there is no the priority corrected parameter is smaller or equal to 0 formation, then with all formations as candidate queue.
12, the difference weight queue dispatching method that is used for the band priority corrected parameter of network processing unit according to claim 8, it is characterized in that, in the described step c), when the selection scheduling object, select the formation of priority minimum, if there is the priority of a plurality of formations identical, and value all is minimum, then select the formation of first frame length minimum,, then select the formation of queue number minimum if priority is identical and first frame length is also identical.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200510124024.9A CN100505688C (en) | 2005-11-23 | 2005-11-23 | A difference weight queue scheduling apparatus and scheduling method for network processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200510124024.9A CN100505688C (en) | 2005-11-23 | 2005-11-23 | A difference weight queue scheduling apparatus and scheduling method for network processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1972242A true CN1972242A (en) | 2007-05-30 |
CN100505688C CN100505688C (en) | 2009-06-24 |
Family
ID=38112842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200510124024.9A Active CN100505688C (en) | 2005-11-23 | 2005-11-23 | A difference weight queue scheduling apparatus and scheduling method for network processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100505688C (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101471856B (en) * | 2007-12-26 | 2011-01-12 | 无锡江南计算技术研究所 | Arbitration method and arbitrator |
WO2011015063A1 (en) * | 2009-08-07 | 2011-02-10 | 中兴通讯股份有限公司 | Queue scheduling method and apparatus |
CN102045858A (en) * | 2009-10-19 | 2011-05-04 | 中兴通讯股份有限公司 | Method and system for scheduling business of WiMAX (World Interoperability for Microwave Access) system |
CN102868633A (en) * | 2012-09-12 | 2013-01-09 | 中国联合网络通信集团有限公司 | Grouped data scheduling method and system |
CN103530173A (en) * | 2012-07-06 | 2014-01-22 | 上海宝信软件股份有限公司 | Dynamic weighted event processing system and method |
CN105376177A (en) * | 2015-12-12 | 2016-03-02 | 中国航空工业集团公司西安航空计算技术研究所 | Configurable multi-priority scheduling method |
CN107196874A (en) * | 2017-05-16 | 2017-09-22 | 北京国电通网络技术有限公司 | A kind of queue scheduling algorithm and system |
CN113037650A (en) * | 2019-12-09 | 2021-06-25 | 北京灵汐科技有限公司 | Data processing method and device and electronic equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6470016B1 (en) * | 1999-02-09 | 2002-10-22 | Nortel Networks Limited | Servicing output queues dynamically according to bandwidth allocation in a frame environment |
US6925094B2 (en) * | 2002-09-23 | 2005-08-02 | Symbol Technologies, Inc. | System and method for wireless network channel management |
CN1203688C (en) * | 2003-05-16 | 2005-05-25 | 上海交通大学 | Fluid track dispatching method |
CN1298149C (en) * | 2003-07-31 | 2007-01-31 | 中兴通讯股份有限公司 | Flow control device and method based on packet mode |
CN2884709Y (en) * | 2005-11-30 | 2007-03-28 | 中国科学院计算技术研究所 | Differential weighting queuing and sheduling parts on network processor |
-
2005
- 2005-11-23 CN CN200510124024.9A patent/CN100505688C/en active Active
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101471856B (en) * | 2007-12-26 | 2011-01-12 | 无锡江南计算技术研究所 | Arbitration method and arbitrator |
US9288154B2 (en) | 2009-08-07 | 2016-03-15 | Zte Corporation | Queue scheduling method and apparatus |
WO2011015063A1 (en) * | 2009-08-07 | 2011-02-10 | 中兴通讯股份有限公司 | Queue scheduling method and apparatus |
US8588243B2 (en) | 2009-08-07 | 2013-11-19 | Zte Corporation | Queue scheduling method and apparatus |
RU2510580C2 (en) * | 2009-08-07 | 2014-03-27 | Зте Корпорейшн | Method and apparatus for managing queues |
CN102045858A (en) * | 2009-10-19 | 2011-05-04 | 中兴通讯股份有限公司 | Method and system for scheduling business of WiMAX (World Interoperability for Microwave Access) system |
CN103530173A (en) * | 2012-07-06 | 2014-01-22 | 上海宝信软件股份有限公司 | Dynamic weighted event processing system and method |
CN102868633A (en) * | 2012-09-12 | 2013-01-09 | 中国联合网络通信集团有限公司 | Grouped data scheduling method and system |
CN102868633B (en) * | 2012-09-12 | 2015-04-29 | 中国联合网络通信集团有限公司 | Grouped data scheduling method and system |
CN105376177A (en) * | 2015-12-12 | 2016-03-02 | 中国航空工业集团公司西安航空计算技术研究所 | Configurable multi-priority scheduling method |
CN105376177B (en) * | 2015-12-12 | 2018-07-03 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of configurable multipriority dispatching method |
CN107196874A (en) * | 2017-05-16 | 2017-09-22 | 北京国电通网络技术有限公司 | A kind of queue scheduling algorithm and system |
CN107196874B (en) * | 2017-05-16 | 2020-11-10 | 北京中电普华信息技术有限公司 | Queue scheduling algorithm and system |
CN113037650A (en) * | 2019-12-09 | 2021-06-25 | 北京灵汐科技有限公司 | Data processing method and device and electronic equipment |
CN113037650B (en) * | 2019-12-09 | 2022-11-18 | 北京灵汐科技有限公司 | Data processing method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN100505688C (en) | 2009-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1972242A (en) | A difference weight queue scheduling apparatus and scheduling method for network processor | |
US7292580B2 (en) | Method and system for guaranteeing quality of service in a multi-plane cell switch | |
US6122673A (en) | Port scheduler and method for scheduling service providing guarantees, hierarchical rate limiting with/without overbooking capability | |
CN105657843B (en) | A kind of outbound capacity is limited the outbound resource regulating method of asymmetric satellite channel and device | |
US20070064711A1 (en) | System and method for providing, by a plurality of schedulers, differentiated service to consumers of distributed resources | |
US7929438B2 (en) | Scheduler pipeline design for hierarchical link sharing | |
US9042224B2 (en) | Method and system for weighted fair queuing | |
US8339949B2 (en) | Priority-aware hierarchical communication traffic scheduling | |
US20030219026A1 (en) | Method and multi-queue packet scheduling system for managing network packet traffic with minimum performance guarantees and maximum service rate control | |
CN100420241C (en) | Information switching realizing system and method and scheduling algorithm | |
JPH10313324A (en) | Packet delivery system in communication network and its method | |
CN101414958A (en) | Method and apparatus for scheduling business | |
CN101286949A (en) | Wireless Mesh network MAC layer resource scheduling policy based on IEEE802.16d standard | |
CN104009936B (en) | Queue scheduling method based on dynamic weight calculation | |
CN102594663A (en) | Queue scheduling method and device | |
CN116055021B (en) | Multi-user flexible Ethernet small particle time slot allocation method and device | |
CN2884709Y (en) | Differential weighting queuing and sheduling parts on network processor | |
CN101374109A (en) | Method and apparatus for scheduling packets | |
CN100456744C (en) | Data dispatching method and system | |
CN106921586A (en) | A kind of data flow shaping methods, data dispatching method and device | |
WO2003047182A1 (en) | Method for real time network traffic admission and scheduling | |
US7385987B1 (en) | Scheduling system and method for multi-level class hierarchy | |
US8467401B1 (en) | Scheduling variable length packets | |
CN102594670B (en) | Multiport multi-flow scheduling method, device and equipment | |
CN101263680B (en) | Method and device for scheduling unicast and multicast traffic in an interconnecting fabric |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Li Xiaowei Inventor after: Li Huawei Inventor after: Gong Shuguang Inventor before: Gong Shuguang Inventor before: Li Huawei Inventor before: Li Xiaowei |