CN101447943A - Queue scheduling system and method - Google Patents
Queue scheduling system and method Download PDFInfo
- Publication number
- CN101447943A CN101447943A CNA2008102411489A CN200810241148A CN101447943A CN 101447943 A CN101447943 A CN 101447943A CN A2008102411489 A CNA2008102411489 A CN A2008102411489A CN 200810241148 A CN200810241148 A CN 200810241148A CN 101447943 A CN101447943 A CN 101447943A
- Authority
- CN
- China
- Prior art keywords
- formation
- queue
- module
- dispatch group
- scheduling
- 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
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a queue scheduling system and a method. The method comprises the following steps: dividing queues of each scheduling group into a work queue and a backup queue; receiving a message; searching a queue corresponding to the flow ID of the message, and loading the queue to the end of the backup queue of the scheduling group to which the queue belongs if the queue is empty; carrying out port-based polling and priority-based polling, and setting the backup queue as the work queue if the work queue of the scheduling group is empty; scheduling a first queue in the work queue of the polled scheduling group, and determining whether or not to end the queue scheduling, if so, loading the queue to the end of the backup queue of the scheduling group to which the queue belongs; or else, reloading the queue to the end of the work queue of the scheduling group to which the queue belongs. The queue scheduling system can obviate large-scale polling so as to save the expense of hardware logic resources.
Description
Technical field
The present invention relates to the traffic management technical field, be specifically related to queue scheduling system and method.
Background technology
Along with new continuous appearance of using on the IP network, service quality to IP network has also proposed new requirement, ip voice (VoIP for example, Voice over IP) etc. real time business has just proposed high requirement to the transmission delay of message, if it is oversize that message transmits time-delay, will be that user institute is unacceptable.Business such as voice, video and data in order to support to have different demands for services require network can distinguish different business, and then corresponding service are provided for it.For this reason, service quality (QoS, Quality ofService) technology is arisen at the historic moment.And in high-end switch and router, the QoS characteristic can be handled by stream discriminator, Flow Policy, queue management and priority mapping etc. and realize.Along with the continuous growth of the network bandwidth and the operation level demand of multiple service supporting, high-end switch and router all adopt the hardware distribution formula to handle in QOS handles.
Fig. 1 is the basic high-end switch and the hardware structure figure of router, and as shown in Figure 1, wherein, the Framer/MAC/PHY module is finished the adaptive of outgoing interface; The PE module is finished stream and is searched forwarding and traffic classification identification processing; Traffic management (TM, Traffic Management) module is finished traffic management, operations such as queue scheduling and traffic monitoring during promptly QoS handles; Switching network adaptive (FA) module is finished the adaptive of inner exchanging net, as traffic management between built-in message section, plate etc.; FABRIC is the switching network framework, finishes message switching.
Fig. 2 is the inside generic structure of existing TM module, and as shown in Figure 2, wherein, the IIF module is used for receiving and the buffer memory message, gives the module of joining the team with the packet parsing result of PE module simultaneously and handles.The module of joining the team is joined the team to queue management module (QM, Queue Management) application according to the formation of selecting, and finishes the congested control inspection of the formation of joining the team; If handle for multicast then finish multicast and join the team and duplicate.Go out group module and then in the QM module, ask the message of certain formation to go out team, finish out the queue scheduling of team and the traffic shaping or the traffic policing of each formation simultaneously according to the port transmit status.
Fig. 3 is the block diagram that existing TM module is carried out queue scheduling, and as shown in Figure 3, the outlet scheduling is often carried out three grades of scheduling based on stream, priority and port.The general forward queue state that adopts of scheduling judges that the back is to the mode of queue scheduling, and promptly quene state provides forward step by step, and the messages that judged whether at different levels allow scheduling; Poll formation at the corresponding levels is simultaneously exported to determine which formation, and application scheduling backward step by step.
Fig. 4 is the existing flow chart of joining the team and handling, and as shown in Figure 4, its concrete steps are as follows:
Step 401: the module of joining the team is provided with a formation for each stream, preserves the corresponding relation of stream ID and queue number.
Step 402: the module of joining the team receives message, according to the stream ID in the message, finds stream ID corresponding queues m.
Step 403: the module of joining the team reads the parameter of formation m from the parameter list of joining the team, as: the algorithm etc. of joining the team.
Step 404: the module of joining the team adopt join the team algorithm as: Weighted random earlier detection (WRED, Weighted Random Early Detection)/tail drop (TD, Tail Drop) algorithm calculates.
Step 405: the module of joining the team judges whether to allow message to go into formation m according to result of calculation, if, execution in step 407; Otherwise, execution in step 406.
Step 406: the module of joining the team abandons this message, and this flow process finishes.
Step 407: the module of joining the team sends the request of joining the team of carrying queue number m to the QM module.
Step 408:QM module receives the request of joining the team, and message is put into formation m, and upgrades the parameter of the formation m that self preserves, as: the length of formation m, empty full state etc.
The QM module is safeguarded address administration, length management, the empty condition managing etc. of expiring of individual queue, and upgrades queue parameter according to joining the team, go out team's request.
Fig. 5 is the flow chart of existing dequeue scheduling, and as shown in Figure 5, its concrete steps are as follows:
Step 501: according to priority formation is divided into a plurality of dispatch group in advance, for each dispatch group, the QM module is with the full state notifying first order scheduler of sky of each formation in each dispatch group; Obtain the full state of sky of each dispatch group according to the full state of sky of each formation in each dispatch group, the full state notifying second level of sky scheduler with each dispatch group, expire the full state of sky that state is determined whole scheduling queue according to the sky of each dispatch group, with the full state notifying third level scheduler of sky of whole scheduling queue.
The corresponding dispatch group of each priority.
If all interior formations of dispatch group all are empty, then this dispatch group is empty; As long as any one formation is arranged not for empty in the dispatch group, then this dispatch group is for full.If all dispatch group all are empty, then whole scheduling queue is empty, as long as a dispatch group is arranged not for empty, then whole scheduling queue is for full.
Step 502: the third level scheduler that goes out group module carries out poll to port, establishes the poll result and is port p, and the poll result is sent to second level scheduler.
Step 503: the second level scheduler that goes out group module receives the poll result that third level scheduler is sent, the full state of the sky of each dispatch group of sending according to the QM module, each dispatch group is carried out poll based on priority, establish the poll result and be dispatch group q, the poll result is sent to first order scheduler.
Step 504: first order scheduler receives the poll result that second level scheduler is sent, the full state of the sky of the individual queue among the dispatch group q that sends according to the QM module, poll is carried out in all formations among the dispatch group q, if the poll result is formation r, from go out group parameter list, read dispatching algorithm, adopt the difference circulation (MDRR of this dispatching algorithm as: correction, Modified Deficit Round Robin) and/or strict priority (SP, Strict Priority) algorithm is dispatched formation r, scheduling result is sent to the traffic policing module as agreement access rate (CAR, Committed Access Rate) module.
Step 505: the traffic policing module judges whether to allow bag to send, if, execution in step 507; Otherwise, execution in step 506.
Step 506: go out the scheduling parameter that group module is upgraded formation r, as: modulated degree length etc., this flow process finishes.
Step 507: the traffic policing module sends the permission indication to going out group module, goes out group module and asks to the team that goes out that queue number r is carried in the transmission of QM module.
Step 508:QM module receives out team's request, reads a bag from formation r, should wrap to send to provide group module, upgrades the parameter of the formation r that self preserves simultaneously, as: the length of formation r, empty full state etc.
Step 509: go out group module and will wrap from port p and send.
From flow process shown in Figure 5 as can be seen: go out group module and obtain the poll result: behind the dispatch group q, need carry out poll to dispatch group q at the poll that finishes based on priority.Formation in dispatch group q is many more, realizes that the progression of the hardware logic that the poll processing is required is dark more, and the logical resource expense is big more.And, some application of high-end router and switch is had relatively high expectations to traffic handing capacity, for example: the traffic policing that high-performance multi-service disposal ability is provided as the switch request of convergence device, higher to bandwidth requirement, support the disposal ability of unidirectional 10G even 40G as needs, also higher to the service access qos requirement simultaneously, as require 1K even above user's multi-service as ip voice (VOIP, Voice Over IP), the scheduling of VPN (VPN, Virtual Private Network) etc., like this, can cause the quantity of formation more, the logical resource expense is bigger, even, when formation is too much, poll can can't be finished.
Summary of the invention
The invention provides queue scheduling system and method, to reduce the hardware logic resource overhead.
Technical scheme of the present invention is achieved in that
A kind of queue scheduling system comprises:
The module of joining the team receives message, finds the stream ID corresponding queues of message, if allow message to go into this formation, sends the notice of joining the team of carrying queue identity to the inlet scheduler module;
The inlet scheduler module receives the notice of joining the team, and is empty if find described queue identity corresponding queues, the backup queue tail of dispatch group under then this formation being put into;
Go out group module, carry out,, transfer the backup queue of this dispatch group to work queue if the work queue of finding the dispatch group that is polled to is for empty based on the poll of port with based on the poll of priority; First formation in the work queue of the dispatch group that is polled to is dispatched, and scheduling finishes, and judges whether to need to finish the epicycle scheduling of this formation, if, the backup queue tail of dispatch group under this formation put into; Otherwise, the work queue tail of dispatch group under this formation heavy duty gone into.
Described system further comprises: schedule register is provided with module, is used to each dispatch group that a schedule register is set;
And, describedly go out group module and be further used for, judge do not need to finish the epicycle scheduling of this formation after, be last formation in the work queue of affiliated dispatch group if find this formation, the schedule register of dispatch group under then this formation being put into; Carrying out based on the poll of port and having formation in the schedule register as if the dispatch group of finding to be polled to after based on the poll of priority, then the formation in this schedule register is dispatched.
Described schedule register is provided with module and is further used for, and for each schedule register is provided with an effective marker, and initialization should be indicated engineering noise by sign;
Describedly go out group module and be further used for, after the schedule register of dispatch group, the effective marker of this dispatch group register is set to indication " effectively " under this formation is put into; If find the effective marker indication " effectively " of the schedule register of the dispatch group be polled to, then determine to have formation in the schedule register of the dispatch group that is polled to; Before the formation in this schedule register is dispatched, from schedule register, take out formation, the effective marker of schedule register is changed to the indication engineering noise.
Describedly go out group module and be further used for, when scheduling finishes, find that formation that scheduling finishes for empty, then do not put into this formation work queue, also backup queue is not put in this formation.
Described system further comprises:
Traffic management QM module is used to safeguard the bag sum of each formation; When receiving when request of joining the team, the bag sum of the queue identity correspondence formation of carrying in this request is added 1; When receiving out team when request, the bag sum of the correspondence of the queue identity in this request formation is subtracted 1;
And described inlet scheduler module is further used for, and when this formation being put into the backup queue tail of affiliated dispatch group, sends the request of joining the team of carrying queue identity to the QM module; After notice is joined the team in reception, obtain the bag sum of the queue identity correspondence this notice from the QM module, to be used to judging whether this formation is sky;
And, describedly go out group module and be further used for, when scheduling finishes, to the QM module send carry queue identity go out team's request.
A kind of array dispatching method is divided into work queue and backup queue two classes with the formation of each dispatch group, and this method comprises:
Receiving message, find the stream ID corresponding queues of message, is empty if find this formation, then this formation is put into the backup queue tail of the affiliated dispatch group of this formation;
Carry out based on the poll of port with based on the poll of priority,, transfer the backup queue of this dispatch group to work queue if the work queue of finding the dispatch group that is polled to is for empty; First formation in the work queue of the dispatch group that is polled to is dispatched, and scheduling finishes, and judges whether to need to finish the epicycle scheduling of this formation, if, the backup queue tail of dispatch group under this formation put into; Otherwise, the work queue tail of dispatch group under this formation heavy duty gone into.
Described method further comprises: in advance for each dispatch group is provided with a schedule register,
Described judgement need finish further to comprise after the epicycle scheduling of this formation: judge this formation whether be under last formation in the work queue of dispatch group, if, the schedule register of dispatch group under this formation put into;
And, described carrying out: judge in the schedule register of the dispatch group that is polled to whether have formation, if the formation in this schedule register is dispatched based on further comprising after the poll of port and the poll based on priority; Otherwise, carry out the described action that first formation in the work queue of the dispatch group that is polled to is dispatched.
Describedly further comprise for each dispatch group is provided with a schedule register in advance: for each schedule register is provided with an effective marker, and initialization should sign indication engineering noise;
Describedly further comprise after the schedule register of dispatch group under this formation is put into: the effective marker of this dispatch group register is set to indication " effectively ";
Whether and exist formation to be in the schedule register of the dispatch group that described judgement is polled to: whether the effective marker of judging the schedule register of the dispatch group be polled to indicates " effectively ", if determine to have formation in the schedule register of the dispatch group that is polled to;
And, described formation in this schedule register is further comprised before dispatching: from schedule register, take out formation, the effective marker of schedule register is changed to the indication engineering noise.
Further comprise after the described backup queue tail of this formation being put into dispatch group under this formation: the bag sum of formation is added 1;
Described scheduling further comprises after finishing: the bag sum of the formation that scheduling is finished subtracts 1;
This formation of described discovery is that sky is: the bag of finding formation adds up to 0.
After finishing, described scheduling further comprises: judge whether this formation is empty, if, work queue is not put in this formation, backup queue is not put in this formation yet; Otherwise, carry out the described needs that judge whether and finish the action of the epicycle scheduling of this formation.
Compared with prior art, among the present invention, the formation of each dispatch group is divided into work queue and backup queue two classes, when receiving message, finding the stream ID corresponding queues of message, is empty if find this formation, then this formation is put into the backup queue tail of the affiliated dispatch group of this formation; When the work queue of finding dispatch group be sky, transfer the backup queue of this dispatch group to work queue; When carrying out based on the poll of port and during based on the poll of priority, first formation in the work queue of the dispatch group that is polled to is dispatched, and scheduling finishes, and judges whether this formation finishes the epicycle scheduling, if, the backup queue tail of dispatch group under this formation put into; Otherwise, the work queue tail of dispatch group under this formation heavy duty gone into.The present invention need not to carry out large-scale poll, has reduced the hardware logic resource overhead.
Description of drawings
Fig. 1 is the basic high-end switch and the hardware structure figure of router;
Fig. 2 is the inside universal stand composition of existing TM module;
Fig. 3 carries out the block diagram of queue scheduling for existing TM module;
Fig. 4 is the existing flow chart of joining the team and handling;
Fig. 5 is the flow chart of existing dequeue scheduling;
The queue scheduling system composition diagram that Fig. 6 provides for the embodiment of the invention one;
The queue scheduling system composition diagram that Fig. 7 provides for the embodiment of the invention two;
The flow chart of joining the team and handling that Fig. 8 provides for the embodiment of the invention;
The flow chart that Fig. 9 dispatches for the dequeue that the embodiment of the invention one provides;
The flow chart that Figure 10 dispatches for the dequeue that the embodiment of the invention two provides.
Embodiment
Basic thought of the present invention is: the non-empty queue in each dispatch group is divided into work queue and backup queue, and work queue is used to deposit the formation of epicycle scheduling, and backup queue is used to deposit the formation of waiting for the next round scheduling.When depositing first message in the formation, this message is put into the backup queue tail, after finishing the epicycle scheduling, a formation in the work queue enters the backup queue tail, when find work queue be sky promptly: when the epicycle scheduling is finished, transfer all backup queues to work queue and carry out the next round scheduling.
When carrying out the dequeue scheduling, obtain the poll result finishing: when port p, dispatch group q based on the poll of port with based on the poll of priority, directly from the work queue of dispatch group q, take out first formation, from this formation, dispatch out a bag and get final product, need not dispatch group q is carried out poll.
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
The queue scheduling system block diagram that Fig. 6 provides for the embodiment of the invention, as shown in Figure 6, it mainly comprises: the module of joining the team 61, inlet are dispatched (ISCH) module 62, QM module 63 and are gone out group module 64, wherein:
The module 61 of joining the team: the corresponding relation of preserving stream ID and queue number; Receive message, stream ID according to message finds this stream ID corresponding queues m, from the parameter list of joining the team of self, take out the algorithm of joining the team of formation m, the employing algorithm of joining the team calculates the parameter of formation m, according to result of calculation, judge whether to allow message to go into formation m, if send the notice of joining the team of carrying queue number m to ISCH module 62; Otherwise, abandon this message.
ISCH module 62: receive the notice of joining the team of carrying queue number m that the module 61 of joining the team is sent, obtain the bag sum of formation m from QM module 63, judge whether this bag sum is 0, if, determine that formation m does not also go into work queue and backup queue, formation m is put into the backup queue tail, send the request of joining the team of carrying queue number m to QM module 63; Otherwise, determine that formation m has been present in work queue or the backup queue, directly send the request of joining the team of carrying queue number m to QM module 63.
QM module 63: receive the request of joining the team of carrying queue number m that ISCH module 62 is sent, message is put into formation m, upgrade the bag sum of the formation m that self preserves; Receive out that group module 64 sends carry queue number r go out team's request, take out a bag transmission from formation r and provide group module 64, upgrade the bag sum of the formation r that self preserves, the full state of sky of each dispatch group and the full state transmission of sky of whole scheduling queue are provided group module 64.。
Going out group module 64 can comprise: scheduler module 641 and heavily loaded processing module 642, wherein:
Scheduler module 641: the full state of the sky of the whole work queue of sending according to QM module 63, carry out poll based on port, the full state of the sky of each dispatch group of sending according to QM module 63, carry out poll based on priority, if the poll result is port p, dispatch group q, judge whether the work queue of dispatch group q is empty, if empty, transfer the backup queue of dispatch group q to work queue, from the work queue of dispatch group q, take out first formation r; If be not empty, directly from the work queue of dispatch group q, take out first formation r; From go out group parameter list, read dispatching algorithm, adopt dispatching algorithm that formation r is dispatched, judge whether to allow bag to send, if allow, sending the team that of carrying queue number r to QM module 63 asks, receive the bag that QM module 63 is sent, this bag is sent on the port p, send the heavy duty indication of carrying queue number r to heavily loaded processing module 642.
Heavy duty processing module 642: the heavy duty indication of carrying dispatch group q and queue number r that receiving scheduling module 641 is sent; Read the parameter of formation r from QM module 63, judge whether formation r is empty, if empty, go out group module and formation r is not put into work queue, does not also put into backup queue; If be empty, judge whether that the epicycle that needs to finish formation r dispatches, if formation r is put into the backup queue tail of dispatch group q; Otherwise, formation r is put into the work queue tail of dispatch group q.
In actual applications, as shown in Figure 7, go out group module 64 and also can comprise:
Schedule register is provided with module 640: be used to each dispatch group that a schedule register is set, and for each schedule register is provided with an effective marker, this is masked as engineering noise initialization, preserves the corresponding relation of schedule register address and dispatch group sign.
And, when scheduler module 641 is port p, dispatch group q in definite poll result, want from schedule register the address that module 640 reads the schedule register of dispatch group q to be set earlier, whether the effective marker of judging the schedule register of dispatch group q again is " effectively ", if, from this schedule register, read formation r, and the effective marker of the schedule register of dispatch group q is changed to engineering noise; Whether otherwise carrying out the described work queue of judging dispatch group q again is empty action.
And, when heavy duty processing module 642 is not finished the epicycle scheduling at definite formation r, want from schedule register the address that module 640 reads the schedule register of dispatch group q to be set earlier, whether the work queue of judging scheduling q again is empty, if, formation r is put into the schedule register of dispatch group q, and the effective marker that this schedule register is set is " effectively "; Otherwise, carry out described action of formation r heavy duty being gone into the work queue tail of dispatch group q.
Fig. 8 provides the flow chart of joining the team and handling for the embodiment of the invention, and as shown in Figure 8, its concrete steps are as follows:
Step 801: the module of joining the team is provided with a formation for each stream, preserves the corresponding relation of stream ID and queue number; The ISCH module is respectively each dispatch group work queue and backup queue is set.
Step 802: the module of joining the team receives message, according to the stream ID of message, finds this stream ID corresponding queues m.
Step 803: the module of joining the team reads the algorithm of joining the team of formation m from the parameter list of joining the team.
Step 804: the module of joining the team adopt join the team algorithm as: the WRED/TD algorithm calculates.
Step 805: the module of joining the team judges whether to allow message to go into formation m according to result of calculation, if, execution in step 807; Otherwise, execution in step 806.
Step 806: the module of joining the team abandons this message, and this flow process finishes.
Step 807: the module of joining the team sends the notice of joining the team of carrying queue number m to the ISCH module.
Step 808:ISCH module receives the notice of joining the team, and obtains the bag sum of formation m to the QM module.
Step 809:ISCH module judges whether the bag sum of formation m is 0, if, execution in step 810; Otherwise, execution in step 811.
Step 810:ISCH module determines that formation m does not also go into work queue and backup queue, formation m is put into the backup queue tail, execution in step 811.
Here, the ISCH module is put into the backup queue tail with formation m, when practical operation, only needs that the address information of formation m is put into backup queue and gets final product.
Step 811:ISCH module sends the request of joining the team of carrying queue number m to the QM module.
If the ISCH module is found the bag sum of formation m and greater than 0, can be determined that then formation m has gone in work queue or the backup queue, directly initiates the request of joining the team to the QM module and get final product.
Step 812:QM module receives this request of joining the team, and message is put into formation m, upgrades the parameter of the formation m that self preserves, as: bag sum etc.
In the embodiment of the invention, the queue parameter table that the QM module is preserved is different with existing queue parameter table, and the QM module will be preserved the bag sum of formation, that is: the QM module will be added up the bag number in each formation in the embodiment of the invention.
The flow chart that Fig. 9 dispatches for the dequeue that the embodiment of the invention one provides, as shown in Figure 9, its concrete steps are as follows:
Step 900:QM module provides group module with the full state of sky of each dispatch group and the full state transmission of sky of whole scheduling queue.
The QM module can be learnt the full state of sky of formation according to the bag sum of formation, if the bag of formation adds up to 0, then formation is empty as can be known; Otherwise, learn that formation is full.
Step 901: go out the sky full state of group module, carry out poll, establish the poll result and be port p based on port according to whole scheduling queue.
Step 902: go out the sky full state of group module, carry out poll, establish the poll result and be dispatch group q based on priority according to each dispatch group.
Step 903: go out group module and judge whether the work queue of dispatch group q is empty, if, execution in step 904; Otherwise, execution in step 905.
Step 904: go out group module and transfer all backup queues of dispatch group q to work queue.
Step 905: go out group module and from the work queue of dispatch group q, take out first formation r, from go out group parameter list, read dispatching algorithm, adopt this dispatching algorithm as: the MDRR algorithm is dispatched formation r.
Step 906: go out group module and judge whether to allow bag to send, if, execution in step 908; Otherwise, execution in step 907.
Step 907: go out scheduling parameter that group module upgrades formation r as: upgrade modulated degree length, go to step 912.
In this step, after formation r is scheduled, even do not allow the bag dispatched out to send, the scheduling parameter that also will upgrade formation r as: upgrade modulated degree length.
Step 908: go out group module and ask, and upgrade the scheduling parameter of formation r to the team that goes out that queue number r is carried in the transmission of QM module.
Step 909:QM module receives out team's request, upgrades the parameter of formation r in the queue parameter table of self preserving, as: bag sum etc., from formation r, take out a bag, should wrap transmission and provide group module.
Step 910: go out group module and receive bag, bag is sent on the port p, obtain the bag sum of formation r from the QM module.
Step 911: go out group module and judge whether the bag sum of formation r is 0, if return step 901; Otherwise, execution in step 912.
If formation r is empty, then go out group module and formation r is not put into work queue, do not put into backup queue yet.After this, when bag entered formation r, the ISCH module can be put into formation r the backup queue of dispatch group q.
Step 912: go out group module and need to judge whether the epicycle scheduling of end formation r, if, execution in step 913; Otherwise, execution in step 914.
For example: if go out group module the MDRR algorithm is adopted in the scheduling of formation, then go out group module and detecting: when the packet length that formation r has dispatched out in the epicycle scheduling is equal to or greater than the scheduling threshold value of default formation r for the first time, then can finish epicycle scheduling to formation r.
One takes turns scheduling is meant the scheduling of finishing all formations in the work queue.
Step 913: go out group module with the backup queue tail that formation r puts into dispatch group q, return step 901.
Step 914: go out group module the work queue tail of dispatch group q is gone in formation r heavy duty, return step 901.
In the present embodiment, going out group module to the reading and over-loading operation of the formation in the work queue, in actual applications, all is to operate realization by the address to formation, for example: go out group module and from work queue, take out first formation, be actually the address of taking out first formation; Backup queue tail or work queue tail are put in the formation that scheduling finishes, be actually backup queue tail or work queue tail are put in the address of this formation.Equally, when whether the judgment task formation is sky, can determine then that without any the address of formation work queue is empty if find in the work queue.
By flow process shown in Fig. 8,9 as can be seen: before message is joined the team, for empty, then this formation is put into the backup queue tail if the ISCH module is found this formation; When message goes out group, if the poll result based on priority is dispatch group q, when going out group work queue of module discovery dispatch group q for sky, can transfer backup queue to work queue, direct first formation in the work queue of dispatch group q is dispatched gets final product, and when scheduling finishes, dispatches if find the epicycle that does not need to finish this formation, then the work queue tail is put in this formation, continued to wait for the follow-up scheduling of epicycle scheduling; Otherwise, the backup queue tail is put in this formation, wait for the next round scheduling.As seen, when message is joined the team, go into the front of the formation meeting of message earlier in work queue, thereby make when dispatching for the first time, formation can be scheduled according to the sequencing of going into message, and after a queue scheduling finishes once, this formation can be put into work queue tail or backup queue tail, so not only guaranteed this formation one take turns be dispatched to probability in the scheduling size (as: if adopt the MDRR algorithm, the scheduling threshold value of certain formation is high more, then to this formation finish once put into the work queue tail after the scheduling may be big more, the number of times that this formation is scheduled in taking turns scheduling is also many more), also guaranteed the sequencing of queue scheduling in follow-up scheduling process, so just need not to carry out poll, significantly reduced the expense of logical resource based on stream.
In flow process shown in Figure 9, in order to guarantee that the entire process flow process can keep pipeline processes always, the module of joining the team and ISCH module need be finished the processing of once joining the team in a pipeline cycle, going out group module need finish once to go out team and handle and to comprise in a pipeline cycle: dequeue scheduling and heavy duty are handled, and the QM module need handle once joining the team request in a pipeline cycle, go out team asks.And since the module and going out of joining the team relate to heavy duty between group module and handle, that is: go out group module after taking out a work queue and finishing the dequeue scheduling, do not finish the epicycle scheduling if find the formation of this taking-up, work queue is gone in the formation heavy duty that also needs to take out, this heavy duty process has delay, in the time of when enough formations are arranged in the work queue, can dispatching, can offset this delay, streamline can not interrupt, and when having only a formation in the work queue, so, this formation by the process of heavy duty in, will be owing to can dispatching without any formation in the work queue, and make streamline interrupt.In order to address this problem, the embodiment of the invention proposes following solution:
The flow chart of the dequeue scheduling that Figure 10 embodiment of the invention two provides, as shown in figure 10, its concrete steps are as follows:
Step 1000:QM module provides group module with the full state of sky of each dispatch group and the full state transmission of sky of whole scheduling queue.
Step 1001: go out group module and a schedule register is set, and for each schedule register is provided with an effective marker position, this flag bit of initialization is " 0 " for each dispatch group.
The effective marker position of the schedule register of a dispatch group is " 0 ", then represents no formation in this schedule register, and this may be caused by two kinds of reasons: one, also have two formations in the work queue of this dispatch group at least; Two, the next round scheduling is being waited in all be through with epicycle scheduling of the formation in the work queue of this dispatch group, and at this moment, work queue be a sky.
It is very fast to go out the speed that group module puts into its pairing dispatch group schedule register with a certain formation, therefore, just can significantly reduce because of the formation heavy duty brings delay, avoids streamline to interrupt.
Step 1002: go out group module and carry out poll, establish the poll result and be port p based on port.
Step 1003: go out group module and carry out poll, establish the poll result and be dispatch group q based on priority.
Step 1004: go out group module and judge whether the effective marker position of the schedule register of dispatch group q is " 1 ", if, execution in step 1005; Otherwise, execution in step 1006.
Step 1005: go out group module and from the schedule register of dispatch group q, take out formation r, and the effective marker position of the schedule register of dispatch group q is changed to " 0 ", go to step 1009.
The effective marker position of the schedule register of dispatch group q is " 1 ", and representing has formation in this schedule register, and this formation is last formation in the epicycle scheduling.
Step 1006: go out group module and judge whether the work queue of dispatch group q is empty, if, execution in step 1007; Otherwise, execution in step 1008.
Step 1007: go out group module and transfer all backup queues of dispatch group q to work queue.
Step 1008: go out group module and from the work queue of dispatch group q, take out first formation r.
Step 1009: go out group module and adopt default dispatching algorithm to dispatch to formation r.
Step 1010: go out group module and judge whether to allow bag to send, if, execution in step 1012; Otherwise, execution in step 1011.
Step 1011: go out the scheduling parameter that group module is upgraded formation r, go to step 1016.
Step 1012: go out group module and ask to the team that goes out that queue number r is carried in the transmission of QM module.
Step 1013:QM module receives out team's request, takes out a bag from formation r, should wrap to send to provide group module, upgrades the parameter of formation r simultaneously, as: bag sum etc.
Step 1014: go out group module and receive bag, this bag is sent on the port p, obtain the bag sum of formation r from the QM module.
Step 1015: go out group module and judge whether the bag sum of formation r is 0, if return step 1002; Otherwise, execution in step 1016.
If the bag of formation r adds up to 0, then go out group module and formation r is not put into work queue, do not put into backup queue yet.
Step 1016: go out group module and need to judge whether the epicycle scheduling of end formation r, if, execution in step 1017; Otherwise, execution in step 1018.
Step 1017: go out group module with the backup queue tail that formation r puts into dispatch group q, return step 1002.
Step 1018: go out group module and judge whether the work queue of dispatch group q is empty, if, execution in step 1019; Otherwise, execution in step 1020.
Step 1019: go out group module formation r is put into the schedule register of dispatch group q, and the effective marker position that schedule register is set is " 1 ", return step 1002.
Step 1020: go out group module the work queue tail of dispatch group q is gone in formation r heavy duty, return step 1002.
From the invention described above embodiment as can be seen: when message is joined the team, the finish the work division of formation and backup queue when scheduling, only needs to take out first formation and directly dispatches and get final product from work queue, thereby need not to carry out extensive poll, saved the hardware logic resource greatly.
The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1, a kind of queue scheduling system is characterized in that, this system comprises:
The module of joining the team receives message, finds the stream ID corresponding queues of message, if allow message to go into this formation, sends the notice of joining the team of carrying queue identity to the inlet scheduler module;
The inlet scheduler module receives the notice of joining the team, and is empty if find described queue identity corresponding queues, the backup queue tail of dispatch group under then this formation being put into;
Go out group module, carry out,, transfer the backup queue of this dispatch group to work queue if the work queue of finding the dispatch group that is polled to is for empty based on the poll of port with based on the poll of priority; First formation in the work queue of the dispatch group that is polled to is dispatched, and scheduling finishes, and judges whether to need to finish the epicycle scheduling of this formation, if, the backup queue tail of dispatch group under this formation put into; Otherwise, the work queue tail of dispatch group under this formation heavy duty gone into.
2, the system as claimed in claim 1 is characterized in that, described system further comprises: schedule register is provided with module, is used to each dispatch group that a schedule register is set;
And, describedly go out group module and be further used for, judge do not need to finish the epicycle scheduling of this formation after, be last formation in the work queue of affiliated dispatch group if find this formation, the schedule register of dispatch group under then this formation being put into; Carrying out based on the poll of port and having formation in the schedule register as if the dispatch group of finding to be polled to after based on the poll of priority, then the formation in this schedule register is dispatched.
3, system as claimed in claim 2 is characterized in that, described schedule register is provided with module and is further used for, and for each schedule register is provided with an effective marker, and initialization should be indicated engineering noise by sign;
Describedly go out group module and be further used for, after the schedule register of dispatch group, the effective marker of this dispatch group register is set to indication " effectively " under this formation is put into; If find the effective marker indication " effectively " of the schedule register of the dispatch group be polled to, then determine to have formation in the schedule register of the dispatch group that is polled to; Before the formation in this schedule register is dispatched, from schedule register, take out formation, the effective marker of schedule register is changed to the indication engineering noise.
4, as the arbitrary described system of claim 1 to 3, it is characterized in that, describedly go out group module and be further used for, when scheduling finishes, find that formation that scheduling finishes for empty, then do not put into this formation work queue, also backup queue is not put in this formation.
5, as the arbitrary described system of claim 1 to 3, it is characterized in that described system further comprises:
Traffic management QM module is used to safeguard the bag sum of each formation; When receiving when request of joining the team, the bag sum of the queue identity correspondence formation of carrying in this request is added 1; When receiving out team when request, the bag sum of the correspondence of the queue identity in this request formation is subtracted 1;
And described inlet scheduler module is further used for, and when this formation being put into the backup queue tail of affiliated dispatch group, sends the request of joining the team of carrying queue identity to the QM module; After notice is joined the team in reception, obtain the bag sum of the queue identity correspondence this notice from the QM module, to be used to judging whether this formation is sky;
And, describedly go out group module and be further used for, when scheduling finishes, to the QM module send carry queue identity go out team's request.
6, a kind of array dispatching method is characterized in that, the formation of each dispatch group is divided into work queue and backup queue two classes, and this method comprises:
Receiving message, find the stream ID corresponding queues of message, is empty if find this formation, then this formation is put into the backup queue tail of the affiliated dispatch group of this formation;
Carry out based on the poll of port with based on the poll of priority,, transfer the backup queue of this dispatch group to work queue if the work queue of finding the dispatch group that is polled to is for empty; First formation in the work queue of the dispatch group that is polled to is dispatched, and scheduling finishes, and judges whether to need to finish the epicycle scheduling of this formation, if, the backup queue tail of dispatch group under this formation put into; Otherwise, the work queue tail of dispatch group under this formation heavy duty gone into.
7, method as claimed in claim 6 is characterized in that, described method further comprises: in advance for each dispatch group is provided with a schedule register,
Described judgement need finish further to comprise after the epicycle scheduling of this formation: judge this formation whether be under last formation in the work queue of dispatch group, if, the schedule register of dispatch group under this formation put into;
And, described carrying out: judge in the schedule register of the dispatch group that is polled to whether have formation, if the formation in this schedule register is dispatched based on further comprising after the poll of port and the poll based on priority; Otherwise, carry out the described action that first formation in the work queue of the dispatch group that is polled to is dispatched.
8, method as claimed in claim 7 is characterized in that, describedly further comprises for each dispatch group is provided with a schedule register in advance: for each schedule register is provided with an effective marker, and initialization should sign indication engineering noise;
Describedly further comprise after the schedule register of dispatch group under this formation is put into: the effective marker of this dispatch group register is set to indication " effectively ";
Whether and exist formation to be in the schedule register of the dispatch group that described judgement is polled to: whether the effective marker of judging the schedule register of the dispatch group be polled to indicates " effectively ", if determine to have formation in the schedule register of the dispatch group that is polled to;
And, described formation in this schedule register is further comprised before dispatching: from schedule register, take out formation, the effective marker of schedule register is changed to the indication engineering noise.
9, want 6 to 8 arbitrary described methods as right, it is characterized in that, further comprise after the described backup queue tail of this formation being put into dispatch group under this formation: the bag sum of formation is added 1;
Described scheduling further comprises after finishing: the bag sum of the formation that scheduling is finished subtracts 1;
This formation of described discovery is that sky is: the bag of finding formation adds up to 0.
10, as the arbitrary described method of claim 6 to 8, it is characterized in that, further comprise after described scheduling finishes: judge whether this formation is empty, if, work queue is not put in this formation, backup queue is not put in this formation yet; Otherwise, carry out the described needs that judge whether and finish the action of the epicycle scheduling of this formation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008102411489A CN101447943B (en) | 2008-12-26 | 2008-12-26 | Queue scheduling system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008102411489A CN101447943B (en) | 2008-12-26 | 2008-12-26 | Queue scheduling system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101447943A true CN101447943A (en) | 2009-06-03 |
CN101447943B CN101447943B (en) | 2011-05-11 |
Family
ID=40743355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008102411489A Active CN101447943B (en) | 2008-12-26 | 2008-12-26 | Queue scheduling system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101447943B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102223453A (en) * | 2010-04-14 | 2011-10-19 | 阿瓦亚公司 | High performance queueless contact center |
CN102300011A (en) * | 2010-04-14 | 2011-12-28 | 阿瓦亚公司 | Automated mechanism for populating and maintaining data structures in queueless contact center |
CN102316009A (en) * | 2010-07-08 | 2012-01-11 | 创锐讯通讯科技(上海)有限公司 | Improved deficit weighted round robin (DWRR) scheduling method |
CN105700949A (en) * | 2014-11-24 | 2016-06-22 | 中兴通讯股份有限公司 | Data processing method and device based on multi-core processor |
CN106162738A (en) * | 2016-09-27 | 2016-11-23 | 京信通信技术(广州)有限公司 | Chain of command resource regulating method and device |
US9571654B2 (en) | 2010-04-14 | 2017-02-14 | Avaya Inc. | Bitmaps for next generation contact center |
CN102891805B (en) * | 2011-07-20 | 2017-02-22 | 中兴通讯股份有限公司 | Method and device for implementing priority mapping in network equipment |
CN108200134A (en) * | 2017-12-25 | 2018-06-22 | 腾讯科技(深圳)有限公司 | Request message management method and device, storage medium |
CN111966406A (en) * | 2020-08-06 | 2020-11-20 | 北京微核芯科技有限公司 | Method and device for scheduling out-of-order execution queue in out-of-order processor |
CN113938439A (en) * | 2021-10-25 | 2022-01-14 | 深圳市风云实业有限公司 | Port queue scheduling method based on timer and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6791992B1 (en) * | 1999-10-07 | 2004-09-14 | The Regents Of The University Of California | Earliest-deadline-first queuing cell switching architecture and method |
CN100407697C (en) * | 2005-01-30 | 2008-07-30 | 华为技术有限公司 | Organizational scheduling method for multi-mode COS queue and apparatus thereof |
CN100463451C (en) * | 2005-12-29 | 2009-02-18 | 中山大学 | Multidimensional queue dispatching and managing system for network data stream |
CN101282303B (en) * | 2008-05-19 | 2010-09-22 | 杭州华三通信技术有限公司 | Method and apparatus for processing service packet |
-
2008
- 2008-12-26 CN CN2008102411489A patent/CN101447943B/en active Active
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9571654B2 (en) | 2010-04-14 | 2017-02-14 | Avaya Inc. | Bitmaps for next generation contact center |
CN102300011A (en) * | 2010-04-14 | 2011-12-28 | 阿瓦亚公司 | Automated mechanism for populating and maintaining data structures in queueless contact center |
CN102300011B (en) * | 2010-04-14 | 2014-12-10 | 阿瓦亚公司 | Automated mechanism for populating and maintaining data structures in queueless contact center |
CN102223453B (en) * | 2010-04-14 | 2016-04-27 | 阿瓦亚公司 | High performance queueless contact center |
CN102223453A (en) * | 2010-04-14 | 2011-10-19 | 阿瓦亚公司 | High performance queueless contact center |
CN102316009A (en) * | 2010-07-08 | 2012-01-11 | 创锐讯通讯科技(上海)有限公司 | Improved deficit weighted round robin (DWRR) scheduling method |
CN102891805B (en) * | 2011-07-20 | 2017-02-22 | 中兴通讯股份有限公司 | Method and device for implementing priority mapping in network equipment |
CN105700949A (en) * | 2014-11-24 | 2016-06-22 | 中兴通讯股份有限公司 | Data processing method and device based on multi-core processor |
CN106162738A (en) * | 2016-09-27 | 2016-11-23 | 京信通信技术(广州)有限公司 | Chain of command resource regulating method and device |
CN106162738B (en) * | 2016-09-27 | 2019-09-17 | 京信通信系统(中国)有限公司 | Control plane resource regulating method and device |
CN108200134A (en) * | 2017-12-25 | 2018-06-22 | 腾讯科技(深圳)有限公司 | Request message management method and device, storage medium |
CN108200134B (en) * | 2017-12-25 | 2021-08-10 | 腾讯科技(深圳)有限公司 | Request message management method and device, and storage medium |
CN111966406A (en) * | 2020-08-06 | 2020-11-20 | 北京微核芯科技有限公司 | Method and device for scheduling out-of-order execution queue in out-of-order processor |
US11989561B2 (en) | 2020-08-06 | 2024-05-21 | Beijing Vcore Technology Co., Ltd. | Method and apparatus for scheduling out-of-order execution queue in out-of-order processor |
CN113938439A (en) * | 2021-10-25 | 2022-01-14 | 深圳市风云实业有限公司 | Port queue scheduling method based on timer and electronic equipment |
CN113938439B (en) * | 2021-10-25 | 2023-12-15 | 深圳市风云实业有限公司 | Port queue scheduling method based on timer and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN101447943B (en) | 2011-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101447943B (en) | Queue scheduling system and method | |
US7397809B2 (en) | Scheduling methods for combined unicast and multicast queuing | |
CN104081736B (en) | The system and method for schedule packet transmissions on client device | |
CN1981484B (en) | Hierarchal scheduler with multiple scheduling lanes and scheduling method | |
US20040004961A1 (en) | Method and apparatus to communicate flow control information in a duplex network processor system | |
CN103534997A (en) | Port and priority based flow control mechanism for lossless ethernet | |
US8144588B1 (en) | Scalable resource management in distributed environment | |
CN105991470A (en) | Message buffer method and device of Ethernet equipment | |
JP6986588B2 (en) | Systems and methods to support efficient virtual output queue (VOQ) packet flushing schemes in networking equipment | |
CN101911764A (en) | Multi-hop wireless terminal and traffic control method therein | |
CN100466593C (en) | Method of implementing integrated queue scheduling for supporting multi service | |
US20050047338A1 (en) | Scalable approach to large scale queuing through dynamic resource allocation | |
US20050190779A1 (en) | Scalable approach to large scale queuing through dynamic resource allocation | |
US9838338B2 (en) | System and method for supporting efficient virtual output queue (VOQ) resource utilization in a networking device | |
CN107005487B (en) | System and method for supporting efficient Virtual Output Queue (VOQ) resource utilization in networked devices | |
CN102056097A (en) | Message sending method based on gateway and Parlay X gateway | |
CN101771603A (en) | Data exchange method and data exchange equipment | |
CN101616365A (en) | A kind of short message retry system and method based on parallel queue | |
CN110601996B (en) | Looped network anti-starvation flow control method adopting token bottom-preserving distributed greedy algorithm | |
Zhang et al. | Coflow scheduling in the multi-resource environment | |
CN100496020C (en) | Message dispatching method and device | |
CN100442760C (en) | Packet equity dispatching method and apparatus | |
US20070133561A1 (en) | Apparatus and method for performing packet scheduling using adaptation round robin | |
US9838330B2 (en) | System and method for supporting credit management for output ports in a networking device | |
Zhang et al. | Data rate guarantee for coflow scheduling in network function virtualization |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Patentee after: Xinhua three Technology Co., Ltd. Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base Patentee before: Huasan Communication Technology Co., Ltd. |