CN100359863C - Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence - Google Patents

Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence Download PDF

Info

Publication number
CN100359863C
CN100359863C CNB2004101039128A CN200410103912A CN100359863C CN 100359863 C CN100359863 C CN 100359863C CN B2004101039128 A CNB2004101039128 A CN B2004101039128A CN 200410103912 A CN200410103912 A CN 200410103912A CN 100359863 C CN100359863 C CN 100359863C
Authority
CN
China
Prior art keywords
limit register
formation
lower limit
value
random sequence
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.)
Expired - Fee Related
Application number
CNB2004101039128A
Other languages
Chinese (zh)
Other versions
CN1801733A (en
Inventor
童进
陈晓东
周一新
闫强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CNB2004101039128A priority Critical patent/CN100359863C/en
Publication of CN1801733A publication Critical patent/CN1801733A/en
Application granted granted Critical
Publication of CN100359863C publication Critical patent/CN100359863C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a method and an apparatus for realizing weighted round-robin scheduling using pseudo-random sequences. Each sending queue is provided with an upper and a lower limit registers with the same width; moreover, the value of the lower limit register of a first queue is zero; the value of the upper limit register of a last queue is the maximum value which can be represented by the register; the value of the lower limit register of a next queue is the addition of the value of the upper limit register of a front queue and one. The present invention adopts pseudo-random sequences for realizing a WRR scheduler. The pseudo-random sequences R are distributed in average probability within the range of (o, the maximum value which can be represented by the upper and the lower limit registers). Because the generating range of pseudo-random number R is completely covered by the upper and the lower limit registers, the R falls between the upper and the lower limit registers of some queue at a sending time, and the scheduler sends the data of the queue. The present invention avoids the lookup of a list for realizing bandwidth distribution, and needs few hardware resources.

Description

A kind of method and device that utilizes pseudo random sequence to realize Weight Round Robin
Technical field
The present invention relates to the method and the device of the queue scheduling in the communications field, particularly a kind of method and device that utilizes pseudo random sequence to realize Weight Round Robin.
Background technology
In communication system, and WRR (Weighted round robin, WRR) scheduler is a kind of very important dispatching technique, it carries out flow bandwidth to individual queue according to the weights size and distributes.
With 4 formation A, B, C, D is example, and weights are followed successively by Wa, Wb, Wc, Wd, 4 weights addition W=Wa+Wb+Wc+Wd.Tradition WRR scheduler workflow has following job step:
Step 1: the initial schedule value Va=W+Wa of formation A; The initial schedule value Vb=W+Wb of formation B; The initial schedule value Vc=W+Wc of formation C; The initial schedule value Vd=W+Wd of formation D.
Step 2: compare Va, Vb, Vc, Vd, as formation A scheduling value Va maximum, then formation A is scheduled.
Step 3: the scheduling value Va=Va+Wa of formation A; The scheduling value Vb=Vb+Wb of formation B; The scheduling value Vc=Vc+Wc of formation C; The scheduling value Vd=Vd+Wd of formation D.
Step 4: the formation that is scheduled for, as formation A, its scheduling value Va=Va-W.
Step 5: got back to for the 2nd step, dispatch again.
If number of queues is more, choose in the 2nd step in maxima operation and the 3rd step add operation is carried out in all formations, just become the bottleneck of WRR computing.
In order to avoid a large amount of numerical operation in the 2nd step and the 3rd step, application number is 02155335.1, and patent name has adopted following method to realize WRR for the patent application of " a kind of WRR method that makes the cell flow realize minimum jitter ".
This patent application is numbered each cell-queue earlier, disposes an equally distributed look-up table of the numbering with each formation again, and sends the cell of each formation according to the order of look-up table, thereby realizes the flow scheduling of formation.This patent application realizes simple, solved the defective of traditional Weighted Round Robin, when realizing, the marker register that need not compare each formation, can reduce to realize the difficulty and the complexity of Weighted Round Robin greatly, using ASIC or FPGA to realize greatly having reduced scale and difficulty that logical device is realized the time of the present invention; Greatly reduced simultaneously the shake of the flow in short-term that traditional Weighted Round Robin causes, making in short-term, shake is reduced to minimum level.In addition, because the present invention only tables look-up, if use CPU to calculate, its speed is very fast, is higher than the speed of existing Weighted Round Robin far away.
The thought of this patent application is in the look-up table of realizing in the RAM mode, utilizes the pseudo random interleaving method, by the numbering of bandwidth distribution setting corresponding to each formation.Scheduler is increasing address ram successively in each scheduling, obtain the RAM content, i.e. formation numbering is equivalent to transmit queue number.
In addition, distribute because patent application 02155335.1 will be numbered rationally, when distributing bandwidth, the flow that has reduced individual queue is shaken in short-term, obtains comparatively level and smooth flow output.But No. 02155335.1 patent application has following defectives:
The size of look-up table depends on the value of { total bandwidth/minimum discharge }, after the total bandwidth in a certain applied environment is determined, the look-up table size is in case fixing, just determined minimum discharge, and when minimum discharge need be segmented once more, can only increase the RAM capacity of look-up table, this is difficult to realize in many limited occasions.
In big capacity, fine-grained network element, the technology of No. 02155335.1 patent application of employing will cause or minimum discharge can not satisfy the demands, or look-up table length causes with high costs very greatly.
Summary of the invention
The object of the present invention is to provide a kind of method and device that utilizes pseudo random sequence to realize Weight Round Robin, reduce the numerical operation amount, also look-up table need not be set simultaneously, can satisfy the requirement of flow being carried out very little segmentation, reduce cost.
In order to realize the foregoing invention purpose, the invention provides a kind of method of utilizing pseudo random sequence to realize Weight Round Robin, wherein, comprise the following steps:
Step a is provided with width consistent lower limit register and upper limit register respectively to each formation;
Step b1, the value that the lower limit register of first formation is set is 0, the value of the upper limit register of last formation is the maximum that described register can be represented;
Step b2 with other all the queue assignment bandwidth sums before each formation and the ratio of total bandwidth, multiply by the maximum that described register can characterize and obtains first result of calculation;
Step b3 rounds described first result of calculation and to obtain second result of calculation, and described second result of calculation is set to the value of the lower limit register of this formation;
Step b4 subtracts the value that is set to last formation upper limit register after 1 with the value of the lower limit register of described formation;
Step c, each scheduling constantly utilizes pseudo-random sequence generator to produce to be positioned at the pseudo random sequence R that is the average probability distribution between [0, on/maximum that lower limit register can characterize]; And
Steps d, described formation judge that described pseudo random sequence whether between this formation lower limit register numerical value and upper limit register numerical value, in this way, then sends out this number of queues certificate, as not being then not send.
The above-mentioned method of utilizing pseudo random sequence realization Weight Round Robin, wherein, on all of described formation/the lower limit register width is all identical.
The above-mentioned pseudo random sequence of utilizing realizes the method for Weight Round Robin, wherein, also comprises step between described step b4 and the step c: initializing pseudo random sequence generator.
In order to realize that better foregoing invention purpose, the present invention also provide a kind of device that utilizes pseudo random sequence to realize Weight Round Robin, wherein, comprising:
Formation upper limit register and lower limit register, the value of the described lower limit register of first formation is 0, the value of the upper limit register of last formation is the maximum that described register can be represented, the value of the lower limit register of described formation is corresponding described second result of calculation, and the value of the upper limit register of described formation is that last formation lower limit register value adds 1;
Pseudo-random sequence generator is used for constantly producing in each scheduling and is positioned at the pseudo random sequence of one-tenth average probability distribution between [0, on/maximum that lower limit register can characterize];
The transmit queue memory space is used to store described transmit queue;
Send enabled device, be used to judge described pseudo random sequence numerical value R whether between this formation lower limit register numerical value and upper limit register numerical value, whether according to judged result decision transmit queue data; And
Transmit port is connected with described transmit queue memory space, is used to send the data of described formation.
The above-mentioned device that utilizes pseudo random sequence realization Weight Round Robin, wherein, on all of described formation/the lower limit register width is all identical.
The bandwidth refinement of device of the present invention is sufficient in foreseeable future.The present invention is by being provided with the boundary register of every formation, avoided employing look-up tables'implementation allocated bandwidth, required hardware resource is fewer, allocated bandwidth is more flexible, total bandwidth can be very big, minimum discharge can be very little, and total bandwidth and minimum discharge no longer are to take into account, and the allocated bandwidth granularity is only determined by register width.
The present invention is described in detail below in conjunction with drawings and Examples.
Description of drawings
Fig. 1 realizes the workflow diagram of WRR scheduler for the present invention utilizes pseudo random sequence;
Fig. 2 utilizes the WRR scheduler device of pseudo random sequence for the present invention.
Embodiment
The present invention is provided with two registers at each transmit queue: lower limit register and upper limit register.In all formations/and the lower limit register width is all the same, and register value is pressed following rule setting:
The lower limit register value of first formation is 0;
The upper limit register value of previous formation equals a back formation lower limit register value and subtracts 1;
The maximum that the upper limit register of last formation can characterize for this register.
As register width is 32bits, as N transmit queue, then the lower limit register of formation 0 is 0x0, and the upper limit register of formation N-1 is 0xFFFFFFFF, (when the upper limit register of 0≤M<N-1) was 0x10000000, then the lower limit register of formation M+1 then was 0x10000001 and as formation M.
The present invention adopts pseudo random sequence to realize the WRR scheduler, and this pseudo random sequence is an integer, is average probability and distributes in [0, the maximum that register can characterize] scope.
If pseudo-random sequence generator produces pseudo random sequence R.Since in all formations/lower limit register produces scope with R and covers fully, therefore must drop between the lower limit register and upper limit register of a certain formation at a certain delivery time R numerical value, and we can realize the desired allocated bandwidth of WRR scheduler by the boundary register of each formation of configuration.
If N formation allocated bandwidth is B0, B1, B2 ..., B (N-1) then has:
B=B0+B1+B2+......+B(N-1),
Wherein B is an allocated bandwidth value sum; Register width is RW, and Bmax=2RW is arranged.
Formation 0 occupies the bandwidth of B0/B so, and formation 1 occupies the bandwidth of B1/B, and formation 2 occupies the bandwidth of B2/B ..., formation N-1 occupies the bandwidth of B (N-1)/B.
At this moment, the boundary register setting of following individual queue is arranged:
Formation 0: the lower limit register value is 0x0, and the upper limit register value is for (B0 * Bmax/B)-1 rounds;
Formation 1: the lower limit register value is rounding of B0 * Bmax/B, and the upper limit register value rounds for [(B0+B1) * Bmax/B]-1;
Formation 2: the lower limit register value is the rounding of (B0+B1) * Bmax/B, and the upper limit register value rounds for [(B0+B1+B2) * Bmax/B]-1;
Formation N-1: the lower limit register value rounds for [B0+B1+......+B (N-2)] * Bmax/B's, and the upper limit register value is 0b1......1 (RW position altogether).
In sum, as shown in Figure 1, the present invention can describe by following workflow:
Step 100:, the upper limit register of each transmit queue is set, lower limit register according to allocated bandwidth;
Step 200: initializing pseudo random sequence generator;
Step 300: pseudo-random sequence generator in each scheduling constantly, be created in [0, the maximum that register can characterize] between the pseudo random sequence R that is evenly distributed, whether each transmit queue is differentiated pseudo random sequence R and is dropped between the lower limit register and upper limit register numerical value of this formation, in this way, then enable this transmit queue, as not being then not enable this transmit queue;
Step 400: jump to the 300th step, continue scheduling next time.
Now with 1024 output queues, the boundary register width is that 32bits is an example, illustrates how the present invention utilizes pseudo random sequence to realize the WRR scheduler.
Be located at that allocated bandwidth is B0: B1: B2 between 1024 formations: ...: B1023=1: 2: 3: ...: 1024, promptly individual queue sends bandwidth and is equal difference (difference is 1) and distributes, and has:
B=B0+B1+B2+......+B1023=524800,RW=32,Bmax=4294967296。
As shown in Figure 2, at first dispose the value of the upper limit register 22 and the lower limit register 23 of 1024 formations:
Formation 0: the lower limit register value is 0d0, and the upper limit register value is 0d8183;
Formation 1: the lower limit register value is 0d8184, and the upper limit register value is 0d24551;
Formation 2: the lower limit register value is 0d24552, and the upper limit register value is 0d49103;
Formation 1023: the lower limit register value is 0d4286586872, and the upper limit register value is 0d4294967295.
Then, 32 pseudo-random sequence generators 21 of initialization.
Then, pseudo-random sequence generator 21 produces [0 constantly in each scheduling, 4294967295] pseudo random sequence that is evenly distributed of interval, each formation judges whether this pseudo random sequence R drops between the lower limit register 22 and upper limit register 23 of this formation, if, then enable the transmission enable line 26 of this formation, give an order, make and dispatch out the data that respective queue also sends in these formations by transmit port 24 in the memory space 25.
At last, constantly dispatch in next one scheduling next time.
Because pseudo random sequence is [0,4294967295] probability distribution between is for being evenly distributed, and the probability that drops on each value all is the same, and each formation is with [0,4294967295] interval by bandwidth division, therefore drop on each interval probability and just embodied weights in the WRR scheduler.So just realized the WRR scheduler.
This for example in, device energy transmit queue bandwidth of the present invention only be the formation of total bandwidth 1/4294967296, this bandwidth refinement is in abundance in foreseeable future.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (4)

1. a method of utilizing pseudo random sequence to realize Weight Round Robin is characterized in that, comprises the following steps:
Step a is provided with width consistent lower limit register and upper limit register respectively to each formation;
Step b1, the value that the lower limit register of first formation is set is 0, the value of the upper limit register of last formation is the maximum that described upper limit register can be represented;
Step b2 with other all the queue assignment bandwidth sums before each formation and the ratio of total bandwidth, multiply by the maximum that described upper limit register can characterize and obtains first result of calculation;
Step b3 rounds described first result of calculation and to obtain second result of calculation, and described second result of calculation is set to the value of the lower limit register of this formation;
Step b4 subtracts the value that is set to last formation upper limit register after 1 with the value of the lower limit register of described formation;
Step c, each scheduling constantly utilizes pseudo-random sequence generator to produce to be positioned at the pseudo random sequence R that is the average probability distribution between [0, on/maximum that lower limit register can characterize]; And
Steps d, described formation judge that described pseudo random sequence whether between this formation lower limit register numerical value and upper limit register numerical value, in this way, then sends out this number of queues certificate, as not being then not send.
2. the method for utilizing pseudo random sequence to realize Weight Round Robin according to claim 1 is characterized in that, also comprises step between described step b4 and the step c: initializing pseudo random sequence generator.
3. a device that utilizes pseudo random sequence to realize Weight Round Robin is characterized in that, comprising:
Formation upper limit register and lower limit register, the value of the described lower limit register of first formation is 0, the value of the upper limit register of last formation is the maximum that described upper limit register can be represented, the value of the lower limit register of described formation is the second corresponding result of calculation, the value of the upper limit register of last formation equals back one formation lower limit register value and subtracts 1, wherein, with other all the queue assignment bandwidth sums before each formation and the ratio of total bandwidth, multiply by the maximum that described upper limit register can characterize and obtain first result of calculation, described first result of calculation is rounded obtain described second result of calculation;
Pseudo-random sequence generator is used for constantly producing in each scheduling and is positioned at the pseudo random sequence of one-tenth average probability distribution between [0, on/maximum that lower limit register can characterize];
The transmit queue memory space is used to store described transmit queue;
Send enabled device, be used to judge that described pseudo random sequence numerical value R is whether between this formation lower limit register numerical value and upper limit register numerical value, if then determine the transmit queue data; And
Transmit port is connected with described transmit queue memory space, is used to send the data of described formation.
4. the device that utilizes pseudo random sequence to realize Weight Round Robin according to claim 3 is characterized in that, on all of described formation/and the lower limit register width is all identical.
CNB2004101039128A 2004-12-31 2004-12-31 Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence Expired - Fee Related CN100359863C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004101039128A CN100359863C (en) 2004-12-31 2004-12-31 Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004101039128A CN100359863C (en) 2004-12-31 2004-12-31 Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence

Publications (2)

Publication Number Publication Date
CN1801733A CN1801733A (en) 2006-07-12
CN100359863C true CN100359863C (en) 2008-01-02

Family

ID=36811511

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004101039128A Expired - Fee Related CN100359863C (en) 2004-12-31 2004-12-31 Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence

Country Status (1)

Country Link
CN (1) CN100359863C (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030010155A (en) * 2001-07-25 2003-02-05 엘지전자 주식회사 Apparatus and control method for weighted round robin scheduler in ATM layer
KR20030057594A (en) * 2001-12-29 2003-07-07 엘지전자 주식회사 Method and Apparatus for weighted round-robin scheduling in ATM layer
CN1472936A (en) * 2003-05-16 2004-02-04 上海交通大学 Fluid track dispatching method
CN1507212A (en) * 2002-12-10 2004-06-23 华为技术有限公司 Weighing polling method realiznig minimum jitter of cell flux
CN1521988A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Method for uniform distribution of physical layer data transmitting time slot in whole time domain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030010155A (en) * 2001-07-25 2003-02-05 엘지전자 주식회사 Apparatus and control method for weighted round robin scheduler in ATM layer
KR20030057594A (en) * 2001-12-29 2003-07-07 엘지전자 주식회사 Method and Apparatus for weighted round-robin scheduling in ATM layer
CN1507212A (en) * 2002-12-10 2004-06-23 华为技术有限公司 Weighing polling method realiznig minimum jitter of cell flux
CN1521988A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Method for uniform distribution of physical layer data transmitting time slot in whole time domain
CN1472936A (en) * 2003-05-16 2004-02-04 上海交通大学 Fluid track dispatching method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"LINUX虚拟服务器中WRR调度算法的优化". 肖钧,庞丽萍.华中科技大学学报,第29卷第2期. 2001 *
"加权轮询算法在TCP非对称网络中的应用及其性能分析". 李慧玲,周继成.计算机工程与应用,第3期. 2000 *

Also Published As

Publication number Publication date
CN1801733A (en) 2006-07-12

Similar Documents

Publication Publication Date Title
CN106961741B (en) A kind of uplink resource allocating method and device
EP1774714B1 (en) Hierarchal scheduler with multiple scheduling lanes
CN101414958B (en) Method and apparatus for scheduling business
US8711871B2 (en) Method and system for weighted fair queuing
US6049526A (en) Enhanced integrated rate based available bit rate scheduler
US20090207846A1 (en) Propagation of minimum guaranteed scheduling rates among scheduling layers in a hierarchical schedule
WO2003090420A1 (en) Method and system for dynamically allocating bandwidth to a plurality of network elements
US7894347B1 (en) Method and apparatus for packet scheduling
US20120327948A1 (en) Adjustment of negative weights in weighted round robin scheduling
US20060274779A1 (en) Filling token buckets of schedule entries
CN104348751B (en) Virtual output queue authorization management method and device
CN1565143A (en) Distributed transmission of traffic flows in communication networks
CN105978824B (en) Frame queue schedules traffic shaping methods and system
CN100456744C (en) Data dispatching method and system
CN100359863C (en) Method and apparatus for realizing weighted round-robin scheduling using pseudo-random sequence
CN101557346B (en) Polling-based packet queue output scheduling method and packet switching node
US7599381B2 (en) Scheduling eligible entries using an approximated finish delay identified for an entry based on an associated speed group
US20060140192A1 (en) Flexible mesh structure for hierarchical scheduling
US7756037B2 (en) Oversubscription of guaranteed bandwidth
EP3021540A1 (en) Scheduler and method for layer-based scheduling queues of data packets
CN102594670A (en) Multiport multi-flow scheduling method, device and equipment
EP1774721B1 (en) Propagation of minimum guaranteed scheduling rates
Xue et al. A new WRR algorithm based on ideal packet interval time
Martinez et al. Decoupling the bandwidth and latency bounding for table-based schedulers
CN106713172B (en) A kind of method and apparatus of schedules message

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080102

Termination date: 20171231

CF01 Termination of patent right due to non-payment of annual fee