US 7817644 B2 Resumen Methods and apparatus for an ATM network for implementing a fair servicing of all connections during a back-logged condition through the use of a weighted fair queuing technique. The system is particularly suited for systems where the packets/cells are of a fixed size. Although some important approximations are made in the proposed implementation, all of the properties of an ideal weighted fair queuing algorithm are preserved. The sorting methods and apparatus are advantageous in that it is possible to maintain appropriate servicing of connections without sorting all of the individual connections. This may be accomplished by pre-sorting each of the individual virtual circuit connections into a finite number of predetermined bins according to a weight associated with the connection. Thereafter, only the bins need be sorted without having to sort each of the individual connections. Further aspects of the invention include storing the bins in a matrix with an offset value dependent upon the current potential of the bin. In this manner, the overall sorting required to determine the next connection to service is substantially reduced. Accordingly, the invention is suitable for implementations having transmission speeds of multiple gigabits-per-second.
Reclamaciones(18) 1. A method of transmitting packets comprising:
sorting packets associated with a plurality of virtual circuits into a plurality of bins using a two-dimensional matrix, where each of the plurality of bins corresponds to one of a plurality of weights and all of the sorted packets in each of the bins have the same weight, the weight of each of the sorted packets dependent upon the weights associated with the plurality of virtual circuits;
sorting the bins based on connection potentials associated with the plurality of bins to determine which packets to transmit, wherein at least one of the connection potentials is defined as an amount of service that an associated bin has received normalized to the weight of the associated bin, where the amount of service is a variable according to the backlogged status of a circuit and each of the connection potentials are adjusted based on the weight of the associated bin; and
servicing all non-empty virtual circuits within a first of the plurality of bins according to the connection potentials prior to sorting the plurality of bins.
2. The method of
storing the connection potential for each of the bins which contain at least one backlogged virtual circuit.
3. The method of
initializing a newly backlogged virtual circuit to a connection potential matching connection potentials of other virtual circuits having the same weight.
4. The method of
servicing all non-empty virtual circuits within a second of the plurality of bins when the connection potential of the second bin is the same as the connection potential of the first bin.
5. The method of
adjusting the connection potential of the first bin by an amount proportional to an inverse of its weight.
6. The method of
7. The method of
8. A packet network comprising:
a plurality of packet switches interconnected via a plurality of connections, each connection having one or more virtual circuits, each packet switch having a processor and a memory configured to sort incoming packets associated with the plurality of virtual circuits into a plurality of virtual circuit queues and for sorting the plurality of virtual circuit queues into a plurality of bins using a two-dimensional matrix enterable by row, where each of the plurality of bins corresponds to one of a plurality of weights and all of the sorted packets in each of the bins have the same weight, the weight of each of the sorted packets dependent upon the weights associated with the plurality of virtual circuits, where bins are organized according to their associated connection potentials, wherein
at least one of the connection potentials is defined as an amount of service that an associated bin has received normalized to the weight of the associated bin, wherein
the amount of service is a variable according to the backlogged status of a circuit and each of the connection potentials are adjusted based on the weight of the associated bin, and wherein
packets are output from each of the packet switches in accordance with connection potentials associated with the bins.
9. The packet network of
10. The packet network of
11. The packet network of
12. The packet network of
13. The packet network of
14. A packet switch, comprising:
a processor and a memory configured to sort incoming packets associated with a plurality of virtual circuits into a plurality of virtual circuit queues and for sorting the plurality of virtual circuit queues into a plurality of bins using a two-dimensional matrix enterable by row, where each of the plurality of bins corresponds to one of a plurality of weights and all of the sorted packets in each of the bins have the same weight, the weight of each of the sorted packets dependent upon the weights associated with the plurality of virtual circuits, where bins are organized according to their associated connection potentials, wherein
at least one of the connection potentials is defined as an amount of service that an associated bin has received normalized to the weight of a the associated bin, where the amount of service is a variable according to the backlogged status of a circuit and each of the connection potentials are adjusted based on the weight of the associated bin, and wherein
packets are output from each of the packet switches in accordance with connection potentials associated with the bins.
15. The packet switch of
16. The packet switch of
17. The packet switch of
18. The packet switch of
Descripción This is a Continuation Application of prior application Ser. No 09/153,352 filed Sep. 15, 1998, now U.S. Pat. No. 6,829,218 assigned to the same assignee as that of the present invention, and to which priority is claimed. The invention relates generally to asynchronous transfer mode (ATM) networks and, more particularly, to high speed weighted queuing systems for ATM switches. Weighted fair queuing, (also known as packetized general processor sharing (PGPS), may be come important in the next generation of ATM switching system and routers in order to fairly share bandwidth while allowing for a guaranteed minimum delay to individual connections sharing a particular transmission facility. However, to date, the implementation of weighted fair queuing algorithms have been problematic and difficult to scale to a large number of connections. For example, in conventional weighted fair queuing, the complexity of an ideal implementation is 0(N)+0(logN) where N is the number of circuits, 0(N) represents the recalculation for all head-of-line packets for all circuits, and 0(logN) is the amount of calculations involved in resorting all of the reference finishing times. The next generation of ATM switches is expected to include tens of thousands of connections and operate at multi-gigabit rates. Accordingly, a scalable, highly efficient implementation of a weighted fair queuing algorithm is necessary. The present invention provides improved algorithms for performing queuing in an ATM switch. In particular, the invention provides a highly efficient implementation of a weighted fair queuing algorithm in an ATM switch where the packets are of a fixed size. Although some important approximations are made in the proposed implementation, all of the properties of an ideal weighted fair queuing algorithm are preserved. The sorting algorithms in accordance with the present invention are advantageous in that it is possible to maintain appropriate servicing of connections without sorting all of the individual connections. This may be accomplished by presorting each of the individual virtual circuit connections into a finite number of predetermined bins according to a weight associated with the connection. Thereafter, only the bins need be sorted without having to sort each of the individual connections. Accordingly, the invention is suitable for implementations having transmission speeds of multiple gigabits-per-second. The foregoing summary of the invention, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the accompanying drawings, which are included by way of example, and not by way of limitation with regard to the claimed invention. Referring to Each of the individual ATM switches ATM A, ATM B, ATM C, may include an output queue for storing received cells prior to transmission on one or a plurality of output connections. Each output queue may, from time to time, become back-logged due to congestion on a particular output connection. While the circuit is back-logged, cells cannot be sent out over the circuit without loss of the cell. Accordingly, cells for each of the various connections begin to build-up in the output queue. When capacity becomes available on the output connection, a choice must be made as to which cells to transmit. This choice may be made, for example, using one or more algorithms described below. A first exemplary embodiment of the weighted fair queuing algorithm may store a connection potential Pi for each back-logged circuit. The connection potential Pi is the amount of service that the connection has received normalized to the weight of a particular connection. For any given instant in time for which service is available, the circuit with the minimum connection potential is serviced. When a circuit newly becomes back-logged, its potential must be initialized. This may be done by keeping track of a system potential Ps that is used for the initial value of Pi for any connection that newly becomes back-logged. To maintain fairness, the system potential should always be kept within the range of the connection potentials of the back-logged connections. In one exemplary embodiment, the connection potential of the circuit which newly becomes backlogged is set to be the connection potential of all other virtual circuits within the bin which have the same connection weight. Where the bin is empty, it may be desirable to set the connection potential of the virtual circuit to be: a) the average of the connection potentials of the two bins having the closest weight to the newly non-empty bin, b) the potential of the bin having the next lowest or next highest weight. The object is to service the connection with the lowest normalized past service (i.e., potential Pi). In this manner, the all connection are maintained to within a narrow normalized past service range and the system is fair. An additional mechanism is needed for a new connection which has just been initiated. If the connection potential is set at zero, the new connection will receive all of the service. Accordingly, a weighting mechanism is required for new connections to assign an initialization potential to a new connection which is comparable to the existing connection potentials. Thereafter, the new connection is serviced like all other connections in accordance with its normalized connection potential. A parameter Ps may be utilized by the ATM switch to keep track of where the connection potentials are and to provide a reference for initializing the potentials of newly back-logged circuits. Using the above described method, the complexity for sorting N connections is 0(logN) plus some overhead for updating the system potential. A further improvement may be made where there are only a finite number of discrete potentials such as when one cell is transmitted, the potential varies by a discrete amount. Referring to In the potential-based approach, every time a connection receives service (1 cell transmitted), its potential may be increased by 1/Wi, where Wi is its weight (i.e., the potential varies by a discrete amount). Where there are only a finite set of values for Wi, then for all connections with the same weight, their potentials are always incremented in the same fashion and intuitively, it is not necessary to keep track of the individual potentials and to sort them separately. In this manner, once a bin with the lowest potential is determined, it may be desirable to service all non-empty virtual circuits within that bin before resorting to find the bin with the new lowest potential. Where a empty virtual circuit within a bin becomes non-empty during servicing of a particular bin, it may be desirable to not service that virtual circuit until a new potential is recalculated. For example, where there are K different weights allowed, then the ATM switch may include K bins for each output connection Sorting of Lead-Bins Where we have a plurality of weighted bins, each being associated with one of a plurality of finite weights, it may be desirable to sort the bins to determine which order the bins should be serviced. Since Bin Next the potentials among all non-empty bins are resorted. Since Bin Again the potential for all non-empty bins are resorted. Since Bin As is apparent from the above operational description, since Bin Storage of Pij In yet a further aspect of the invention, it is possible to further increase the efficiency of the algorithm by organizing the data associated with the bins in memory in a predetermined arrangement. For example, the above method requires the storage of the potential values for each of the individual bins. An alternative is to keep track of a system virtual time which is a reference potential from which all of the potentials of the bins may be offset by one or more values. In this manner, all potential values associated with the bins can then be compared as offsets to the system virtual time. The value of the offsets can be deduced from the system virtual time since the progression of the potential value for each of the bin is known. Also, any potential values for two or more bins which are tied across a row can be determined by a simple operation. This alternative method of sorting requires an efficient and accurate division of the system time t. Second t may grow without bound as long as the system stays busy. (Only when the system goes) idle can t be reset to zero. When t becomes large, the division or multiplication (if high speed division is utilized to implement the table look-up) becomes complex. Also, straightforward wraparound of t is not acceptable and hence the values may need to be reset as the system approaches wrap-around condition. However, for suitable environments, the table based sorting based on offset from a system time is a highly efficient solution for sorting the bins. Although the sorting of lead bins in a matrix arrangement may be accomplished using any suitable sorting mechanism, a two dimensional structure and algorithm may be useful. Alternatively, a three dimensional structure and algorithm may be used to store bins which have a tied potential with bins having the tied potential stored in the third dimension. For simplicity, the example given below will be shown in a two dimensional format. In this example, d may be set to the reciprocal of the weight, i.e., d=1/w. It may also be desirable to represent d by a floating point number with an n-bit mantissa and m-bit exponent forming the two sides of the matirx. As shown below, the bins may be arranged as a two-dimensional structure where d has a two bit mantissa and a two bit exponent:
In this arrangement, the bin in the upper left hand corner (or next full bin closest thereto) of the matrix is serviced first. Thereafter, a new potential is calculated for the bin and the bin is inserted into the matrix in an appropriate location for the new potential. Thus, there is no need to resort all of the bins, only to store the bin in the appropriate location in the matrix. Accordingly, the processing necessary to determine the bin with the least potential is substantially reduced. In an exemplary embodiment, a processor in the ATM switch may be configured with a memory implementing the matrix arrangement described above. Although the matrix may be accessed and maintained in any suitable manner to accomplish the above function, one technique is described below.
In exemplary embodiments in accordance with this aspect of the invention, it is not necessary to sort all of the weighted bins. For example, it is sufficient to sort the first non-empty weight bin in each row. Where there are ties, it may be desirable to serve all of the tied bins. Further, it may be desirable to determine all non-empty bins in each winning row that are tied with the winning lead bin (i.e., the first non-empty bin on that row). Finding all the bins that are tied with the lead bin in a row is on the order of one operation since all that is required is to check the weight of the next non-empty bin Bim in row i to see if it is a tie with the first non-empty bin. If it is, then we serve bin Bim and check if Bim′ (where Bim′ is the next non-empty bin) is a tie with Bim. Otherwise, we are done and sort the lead bins of all rows again. Note that where the bins are presorted, since if Bim is not tied with Bij, no subsequent bin Bik, k>m can be tied with Bij. In exemplary embodiments of the table based sorting method described above, the first step is to represent the potential for each bin as a floating point number having a mantissa and an exponent. The next step is to organize all of the bins in a memory of the ATM switch into rows (each having the same mantissa value) and columns (each having the same exponent value. In organizing the bins, it may be desirable to organize each row such that each adjacent column has a higher potential (or equal potential for a two dimensional matrix) than the preceding column in the same row. In this manner, only the lead bins in each row need be sorted. Bins with the largest weight (smallest distance) may be organized first in the row/column with bins with the smallest weight (largest distance) organized last in the rows/columns. The next step is to sort the first non-empty bin (lead bin) of each row in terms of potential. Once the table has been sorted as defined above, the next step is to service the lead bins in each of the rows and then to serve all of the non-empty bins with the same potential as the lead bin. Thereafter, the potential for each of the serviced bins is recalculated, and the serviced bins are inserted into the table in an appropriate location. In this manner, the amount of sorting is reduced by the square root of the number of bins and the number of register loads are also decreased. Pseudo-Code Exemplary embodiments of the present invention may be performed using methods and systems as described above. In one embodiment, the methods and systems of the present invention may be described using the following pseudo code:
While exemplary systems and methods embodying the present invention are shown by way of example, it will be understood, of course, that the invention is not limited to these embodiments. Modifications may be made by those skilled in the art, particularly in light of the foregoing teachings. For example, it will be well known in the art that a processor in each of the ATM switches in Citas de patentes
Clasificaciones
Eventos legales
Girar |