RESOURCE OPTIMIZATION IN A MULTIPROCESSOR SYSTEM FOR A PACKET
NETWORK
BACKGROUND OF THE INVENTION
The invention relates to serving packet switched connections, pref- erably ATM connections, in a multiprocessor system, and particularly to optimizing resource allocation in such a system. The invention further relates to an SAR circuit employed in such a system.
With reference to Figure 1 , in a packet switched network information is transmitted in packets comprising at least a header part and a payload part. In an ATM network, for example, the length of the packets is 53 bytes. A five- byte header indicates with which connection the packet in question is associated. For the sake of simplicity, Figure 1 shows five connections CA to CE. A terminal using ATM connections is typically a workstation, a personal computer or the like wherein one efficient processor PROC1 processes the ATM connections. The ATM terminal equipment comprises an SAR circuit (Segmentation And Re-assembly) SAR which receives ATM packets and writes them to a queue Q1 located in a memory, from which queue the processor retrieves them on a first in, first out principle (FIFO).
If more than one processor are needed in the terminal equipment, the allocation of resources between the different processors presents a problem. In accordance with a potential solution, one common SAR circuit shared by all processors serves all processors sharing a common queue. In this solution the elements of the queue are formed in an unarranged manner from packets which belong to all CA to CE. The processors spend much time searching the queue Q1 only for elements which belong to them. Furthermore, to write to a shared queue would be difficult for the processors. If, on the other hand, there are as many queues as there are processors but the SAR circuit is still a shared one, the processors still waste their time searching the unarranged queues only for elements which belong to them. If a specific SAR cir- cuit is reserved for each processor, the queues could be arranged in such a manner that only elements which belong to the respective processor are written to the queue of each processor. The problem in this solution is, however, that it requires a great number of SAR circuits, and it is still unclear how the system should be configured in case some processors serve more than one connection at a time.
This is not extremely harmful in terminal equipment with a light processing load associated with a single connection, since the processors can perform the required arranging (for example by simply selecting only packets which belong to the connection to be served and discarding others). In net- work elements performing complex signal processing, such as speech encoding devices, echo cancellers, compression or decompression devices, etc. the situation is different. One processor (typically a digital signal processor DSP) can usually serve a few connections at the most and often only one connection at a time. The processors spend much time arranging the queues ac- cording to which connection they serve at a given time.
BRIEF DESCRIPTION OF THE INVENTION
An object of the invention is thus to provide a method and equipment implementing the method so as to solve the above problems. More specifically, the object of the invention is to enable resources to be more efficiently utilized in a multiprocessor system which serves several connections. The objects of the invention can be achieved by a method, an arrangement and an SAR circuit characterized by what is said in the independent claims. The preferred embodiments of the invention are disclosed in the dependent claims.
The invention is based on the idea of forming a separate queue for each telecommunication connection to be served in a memory space of an SAR circuit, and conveying to each queue substantially only queue elements formed from packets which belong to the respective telecommunication connection. In this connection, "substantially only" means that only queue elements formed from packets of a corresponding telecommunication connection (but not of other connections) are transmitted via each queue. Furthermore, processor configuration instructions and status information may be transmitted via the queue. In the present invention, this configuring means that the processor is informed at which memory address the queues associated with the connections and served by it can be found. Most preferably, all queues and processors share a common SAR circuit. Each queue can in practice be implemented as a ring buffer pair or a linked list. The SAR circuit places in each queue only packets which belong to the connection corresponding to it. If a processor serves several connections, the processor also processes several queues.
An advantage of the method and the system of the invention is that the processors do not have to spend much time arranging the queues, and the equipment becomes readily scalable for large numbers of connections and processors. Avoiding redundant processing also reduces power consumption. The memory capacity required by the queues is reduced since no need exists to store in any queue packets which will not be processed. In accordance with a preferred embodiment, a shared SAR circuit is fitted for several processors, which reduces the number of components and the price of the system. The invention thus enables several processors to be connected behind a shared SAR circuit.
BRIEF DESCRIPTION OF THE DRAWINGS
The invention is now described in closer detail in connection with the preferred embodiments with reference to the accompanying drawings, in which Figure 1 shows how several connections are served by one processor in accordance with prior art, and
Figure 2 shows how several connections are served by several processors in accordance with the invention.
DETAILED DESCRIPTION OF THE INVENTION Let us first take a simple case in which packets A to E which belong to connections CA to CE can be processed as such. An example of such a situation is a speech frame of the GSM system, whose length is about 85% of the length of the payload of an ATM cell.
With reference to Figure 2, a shared SAR circuit arranges packets which belong to all connections CA to CE into queues Q1 to Q2 on the basis of their header in such a manner that a separate queue is formed in the memory space of the SAR circuit for each connection CA to CE. The SAR circuit places in each queue Q1 to Qn only packets which belong to a corresponding connection CA to CE. The queues Q1 to Qn can be provided in a shared physical memory. A problem is then presented, however, by collisions caused by several processors simultaneously writing in the same memory. Even if the queue of each processor was located in a separate storage area, the processor would be compelled to use the same data and/or address bus simultaneously. It is thus more preferable to implement a separate physical queue for each processor. In accordance with a preferred embodiment, in order to save mem-
ory only the payload parts of the packets are stored in the queues Q1 to Qn and the packet header parts are reformed when the packet is transmitted to the network after processing. Since the length of the packet is a fixed one in this example, the queues Q1 to Qn can be simple ring buffer pairs in which the writing element (the SAR circuit or the processor) maintains the write address of a next location, rewrites the packet to this address and increments the write address. The reading element (the processor or the SAR circuit, correspondingly) reads the packet from the read address of the location to be read next and increments this address. When the write or the read address is incre- mented beyond the maximum address of the ring buffer, it is returned to the minimum address.
A situation in which the same processor serves several connections (in this case CB and Cc) is shown in connection with a second processor of Figure 2. The processor PROC2 reads from and writes to two queues Q2τ and Q22. A separate queue is provided for each connection CA to CE, however.
Let us next discuss a more complex case in which the packets A to E which belong to the connections CAto CE do not as such constitute appropriate packets to be processed. Such a situation is, for example, a half-speed speech frame of the GSM system, two of which fit in one ATM cell. On such a connection, the SAR circuit can be configured to divide the payload of one ATM cell into two packets to a corresponding queue Q1 to Qn. Similarly, if the length of the packet to be processed is a fixed multiple of the payload of the ATM cell, the SAR circuit can be configured to form each packet of the queue from the payload part of several ATM cells. In all the cases described above the queues Q1 to Qn can be implemented as ring buffers, for example.
However, if variable length packets produced by many video codecs, for example, are transmitted via the ATM network, a simple ring buffer is not sufficient but the queues can be formed as linked lists, for example, in which each element refers to the beginning of a next element. It is obvious to those skilled in the art that with progress in technology the basic ideas of the invention can be implemented in various ways. The invention and its embodiments are thus not restricted to the examples described above, but they can vary within the scope of the claims.