EP0889392B1 - Data structure and method for managing multiple ordered sets - Google Patents
Data structure and method for managing multiple ordered sets Download PDFInfo
- Publication number
- EP0889392B1 EP0889392B1 EP98305110A EP98305110A EP0889392B1 EP 0889392 B1 EP0889392 B1 EP 0889392B1 EP 98305110 A EP98305110 A EP 98305110A EP 98305110 A EP98305110 A EP 98305110A EP 0889392 B1 EP0889392 B1 EP 0889392B1
- Authority
- EP
- European Patent Office
- Prior art keywords
- data packet
- fifo
- data
- packet
- turnstile
- 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 - Lifetime
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F5/00—Methods or arrangements for data conversion without changing the order or content of the data handled
- G06F5/06—Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
- G06F5/10—Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor having a sequence of storage locations each being individually accessible for both enqueue and dequeue operations, e.g. using random access memory
Definitions
- the present invention pertains to first in, first out memory systems. More particularly, the present invention relates to a method, a computer readable medium, and an apparatus for managing multiple ordered sets in a single memory system.
- a first in, first out memory system is a memory system from which data items are retrieved in the same sequence in which the data items were stored in the memory system. That is, the first data item stored in a FIFO is the first data item that is retrieved from the FIFO.
- FIFO's are commonly used as data rate buffers between systems that transfer data at widely different rates. For example, multiple systems which process and transfer data at widely different rates can be interconnected through an interconnect such as a crossbar.
- a FIFO can be used to buffer data transferred from a fast device to a slow device, for example, from a computer to a printer.
- the computer can send character data to a FIFO at a relatively high rate.
- the printer can then read the data from the FIFO at a much slower rate and in the same order that the data was sent by the computer.
- a FIFO can be used to buffer data transferred from a slow device to a fast device, e.g., from a keyboard to a computer.
- the keyboard can send character data to a FIFO at a relatively low rate.
- the computer can then read the data from the FIFO at a much higher rate and in the order that the data was sent by the keyboard. Therefore, the computer may perform other tasks while the FIFO is slowly being filled with data and later retrieve the data from the FIFO in order.
- a FIFO implemented in hardware typically includes a finite number of memory positions into which data items can be stored.
- Each memory position can be, for example, a register.
- each memory position of the FIFO can store a single data item.
- Each data item typically has a fixed length, but some FIFOs store data items of variable length.
- scheduler that spools task sets for multiple processors.
- the scheduler can compile an ordered set of packets for each processor and each processor can sequentially execute a task set which includes the ordered set of packets specific to the processor. Therefore, it is important to maintain sequential ordering of packets within each ordered set for each processor. But, it is not necessary to maintain sequential ordering of packets among the plurality of ordered sets.
- EP-369920 discloses a method and apparatus for managing a plurality of circular buffers by subdividing a contiguous block of storage into a plurality of interleaved circular buffers.
- a table of pointers is used to store and retrieve information in the circular buffers.
- One method of buffering data entries of multiple ordered sets is to sort the data entries into multiple, separate FIFO's, i.e., one for each ordered set.
- FIFO's i.e., one for each ordered set.
- the number of FIFO's and the maximum requisite length of each FIFO can be particularly difficult to predict and can depend upon the manner in which such systems are used. Fixing the maximum number of FIFO's too low increases the likelihood that such a system finds insufficient FIFO's to operate properly.
- Fixing the maximum number of FIFO's too high allocates more memory, and therefor more circuitry, than is necessary for implementation of the multiple FIFO's.
- one of a number of FIFO's of fixed length can exhaust available memory positions while other FIFO's have a surplus of memory positions. Accordingly, fixing the number of FIFO's and the number-of memory positions for each FIFO can result in a memory position shortage in one FIFO and a simultaneous memory position surplus in other FIFO's.
- Blocking refers to the unavailability of data items of one ordered set stored in a FIFO as a result of storage of a data item of another ordered set in a preceding memory in the order of the FIFO.
- the following example is illustrative. Suppose a scheduler collects packets into respective ordered sets representing respective tasks to be performed by respective processors. Suppose further that the packets are spooled through a single FIFO regardless of the particular processor which is to receive each packet.
- packets intended for a first processor follow packets intended for a second processor in the sequence of the single FIFO, the packets intended for the first processor cannot be sent to the first processor until the preceding packets for the second processor are sent. If the second processor is busy and cannot receive the packets from the FIFO, the packets intended for the first processor are blocked. Even if the first processor is ready to receive packets from the FIFO, the packets are blocked pending receipt of the preceding packets by the second processor. Accordingly, the first processor is idle and wasted as long as the second processor is busy. Thus, blocking leads to unnecessarily wasted resources and time.
- What is needed is a method and apparatus for buffering data entries of multiple ordered sets without a need to allocate an excess of FIFO's or slots per FIFO and in a manner such that blocking of an oldest data entry which is a member of one set does not cause excessive delay in release of oldest data entries of other sets from the FIFO.
- a circular memory structure according to the present invention is sometimes referred to as a turnstile FIFO. Multiple ordered sets of data packets are stored in the turnstile FIFO. The turnstile FIFO is managed such that blocking of an oldest packet which is a member of one set does not cause excessive delay in dequeuing oldest packets which are members of other sets. Processing multiple ordered sets according to the present invention safely preserve sequential order among packets which are members of a same set.
- Each packet includes a set identifier which specifies one of the multiple ordered sets stored in the turnstile FIFO.
- the turnstile FIFO can include as few as one ordered set or as many distinct and separate ordered sets as can be uniquely identified by the range of values of the set identifier.
- Conventional FIFO systems require pre-allocating a number of FIFO's, each of which is pre-allocated at a maximum size.
- storing all packets at a single turnstile FIFO allows a moderately sized turnstile FIFO to store a few long ordered sets, many short ordered sets, or a combination of both.
- Operations performed on the turnstile FIFO include enqueue, dequeue, and rotate.
- the enqueue operation adds a new packet to the turnstile FIFO in such a way that preserves the sequential order of the packets of the selected set within the turnstile FIFO.
- the dequeue operation retrieves an oldest packet of a set stored in the turnstile FIFO which is not currently blocked from being dequeued.
- a data packet is dequeued from a position within the turnstile FIFO only if the data packet is the oldest data packet stored in the turnstile FIFO of the particular ordered set to which the data packet belongs.
- Turnstile logic determines whether the data packet is the oldest of its particular ordered set by determining the ordered set to which each older data packets of the turnstile FIFO belongs. Since the data packets of the turnstile FIFO are stored in the same sequence in which the data packets are added to the turnstile FIFO, all data packets which are older than the selected data packet are stored at preceding positions within the turnstile FIFO up to and including the head data packet.
- the head data packet is the oldest of all data packets stored in the turnstile FIFO regardless of ordered set membership and is tracked by the turnstile logic. For each data packet older than the selected data packet within the turnstile FIFO, the set to which the older data packet belongs is compared to the set to which the selected data packet belongs.
- the selected data packet is not the oldest data packet of the ordered set and therefore cannot be dequeued without violating the sequence of data packet dequeuing within the ordered set. Conversely, if no older data packet belongs to the same set to which the selected data packet belongs, the selected data packet is the oldest data packet of its particular ordered set and can therefore be dequeued.
- a turnstile FIFO according to the present invention provides the performance efficiencies of separate FIFO's for each of a number of ordered sets while simultaneously providing the flexibility of a single FIFO for storing data packets of multiple ordered sets.
- a circular memory structure according to the present invention is sometimes referred to as a turnstile FIFO 100.
- Multiple ordered sets of data packets are stored in turnstile FIFO 100.
- Turnstile logic 220 ( Figures 2A-2F) implements a rotate mechanism which enables management of multiple ordered sets such that the presence of an oldest packet which is a member of one set does not cause excessive delay in de-queuing oldest data packets which are members of other sets.
- turnstile FIFO 100 safely preserves sequential order among data packets which are members of a same set yet stores packets of multiple ordered sets in the single structure of turnstile FIFO 100.
- FIG 1A shows turnstile FIFO 100 according to an embodiment of the present invention.
- Turnstile FIFO 100 is a circular memory structure which includes a number of slots 102.
- Turnstile FIFO 100 is circular in that slots 102 are logically ordered and the first ordered slot, i.e., slot 102A, immediately follows the last ordered slot, i.e., slot 102N. Such is illustrated, for example, in Figures 2A-F.
- Turnstile FIFO 100 is shown in tabular form in Figures 1A-B to more clearly illustrate each of the fields of slots 102, each of which includes sufficient memory to store a respective packet.
- each of slots 102 is a register.
- Each of slots 102 includes a data field 104, a set identifier field 106, a head field 108 and a valid field 110.
- Each of fields 104-110 stores data representing a particular piece of information related to a particular data packet. Fields 104-110 are sometimes collectively, referred to as tags.
- Data field 104 stores the data packet which is the substantive data stored and managed within a particular one of slots 102.
- Set identifier 106 specifies the one of the multiple ordered sets stored in turnstile FIFO 100 to which a particular data packet belongs.
- turnstile FIFO 100 can store data packets of as few as one ordered set or as many distinct and separate ordered sets as can be uniquely identified by the range of values of set identifier 106.
- each of slots 102 can store a data packet of any of the distinct and separate ordered sets. Accordingly, turnstile FIFO 100 can be moderately sized yet store a few particularly long ordered sets, many short ordered sets, or a combination of both.
- Header field 108 stores data, e.g., a single bit, which indicates whether a particular one of slots 102 stores the head data packet.
- the head data packet is the oldest of all data packets stored in turnstile FIFO 100.
- Valid field 110 stores data, e.g., a single bit, which indicates whether a particular one of slots 102 stores a valid data packet and is therefore not available for storage of another data packet.
- FIG. 1B a block diagram representing an alternative embodiment of turnstile FIFO 100 is shown.
- valid tag 110 Figure 1A
- a unique ordered set identifier is reserved to represent an invalid packet entry. If set field 106 of a slot, e.g., slot 102A, stores data representing the reserved ordered set, slot 102A does not store a valid data packet and is available for storage of a new data packet.
- Turnstile logic 220 ( Figure 2A) manages one or more ordered sets of data packets stored in turnstile FIFO 100 using enqueue, dequeue, and rotate operations. Performance of the enqueue operation adds a new packet to turnstile FIFO 100 in such a way that preserves the sequential order of the packets of the selected set within turnstile FIFO 100. Performance of the dequeue operation retrieves an oldest data packet of a selected ordered set of data packets stored in turnstile FIFO 100 in such a way that data packets of other ordered sets cannot block the retrieval of the oldest data packet of the selected ordered set.
- turnstile FIFO 100 Prior to performance of the steps of logic flow diagram 400, turnstile FIFO 100 has a prior state in which turnstile FIFO 100 stores data packets A1, A2, B1, and B2. Data packets A1 and A2 are from a set generally designated as "A,” and data packet A1 is older than, i.e., was stored in turnstile FIFO 100 prior to, data packet A2. Similarly, data packets B1 and B2 are from a set generally designated as "B,” and data packet B1 is older than, i.e., was stored in turnstile FIFO 100 prior to, data packet B2. In this illustrative example of enqueuing a data packet according to logic flow diagram 400 ( Figure 4), turnstile FIFO 100 ( Figure 2A) stores the following data packets in the following order: A1, B1, B2, A2.
- Turnstile FIFO 100 generally has three (3) significant slots of slots 102 which are used by turnstile logic 220 to manage data packets in turnstile FIFO 100. Specifically, a tail slot stores a tail data packet which is the data packet most recently stored in turnstile FIFO 100, a head slot stores a head data packet which is the data packet least recently stored in turnstile FIFO 100, and a slot at position zero. The slot at position zero is the only slot from which a data packet can be dequeued in accordance with an illustrative embodiment of the present invention.
- the tail slot is located dynamically by turnstile logic 220 by determining which of slots 102 is valid and is immediately followed by an invalid slot as indicated by valid field 110 of each of slots 102 or is immediately followed by the head slot.
- a tail pointer 210 points to the tail slot.
- the head slot is the one of slots 102 in which head field 108 ( Figure 1A) of the slot so indicates.
- a head pointer 205 points to the head slot.
- the slot at position zero can be fixed within turnstile FIFO 100 as shown in Figure 2A or, alternatively, can be identified by a position zero pointer (not shown).
- turnstile logic 220 determines whether the head slot immediately following the tail slot in turnstile FIFO 100. If so, turnstile FIFO 100 is full and processing transfers to step 404 in which turnstile logic 220 ( Figure 2A) refuses to enqueue the subject data packet. Turnstile logic 220 can communicate such refusal to the source of the subject data packet in any conventional manner. Conversely, if the head slot does not immediately follow the tail slot, processing transfers from test step 402 ( Figure 4) to step 406.
- turnstile logic 220 increments the position of the tail slot by one. It should be noted that, since turnstile FIFO 100 is circular, the first of slots 102 immediately follows the last of slots 102. Thus, the slot at position N immediately precedes the slot at position zero. Accordingly, if the tail slot is at position N, the tail slot is at position zero after performance of step 406 ( Figure 4). In one embodiment, turnstile logic 220 ( Figure 2A) increments the tail slot position by setting valid field 110 in the one of slots 102 immediately following the tail slot to indicate that the slot is now valid and is now the new tail slot. The new tail slot is so identified by the fact that the immediately following slot is either invalid or is the head slot. In an alternative embodiment, turnstile logic 220 increments the position of the tail slot by adjusting tail pointer 210 to point to the slot immediately following the previous tail slot.
- turnstile logic 220 ( Figure 2A) stores the subject packet in the new tail slot. Specifically, turnstile logic 220 stores the subject packet in data packet field 104 of the new tail slot. For example, in enqueuing data packet B3 ( Figure 2B), turnstile logic 220 increments tail pointer 210 and stores data packet B3 in the new tail slot as shown. Since data packets are enqueued onto turnstile FIFO 100 in the same sequence in which such data packets are received by turnstile logic 220, the sequence of data packets within each ordered set is inherently preserved.
- Logic flow diagram 300 illustrates the dequeuing of data packets from turnstile FIFO 100 ( Figure 2B) by turnstile logic 220 in one embodiment of the present invention.
- turnstile logic 220 does not wait for requests to dequeue data packets from specific ordered sets but instead perpetually attempts to dequeue all data packets from turnstile FIFO 100 and deliver each such data packet to a recipient identified in the data packet, e.g., by set identifier field 106.
- Such is appropriate, for example, if turnstile logic 220 and turnstile FIFO 100 are used to route traffic between multiple systems coupled through a crossbar switch. In that case, turnstile logic 220 perpetually attempts to deliver data packets stored in turnstile FIFO 100 to respective recipients and generally only fails when the recipient is busy or otherwise unavailable to receive the data packets.
- turnstile control logic 220 retrieves the tags of the current packet zero.
- packet zero is the data packet stored in the slot at position zero, e.g., data packet A1 in Figure 2B.
- processing transfers to test step 303 ( Figure 3) in which turnstile logic 220 ( Figure 2B) determines whether packet zero is valid by comparison of data stored in valid field 110 ( Figure 1A) to data so indicating. If packet zero is not valid, processing transfers to step 316 ( Figure 3) which is described below and in which turnstile logic 220 ( Figure 2B) rotates turnstile FIFO 100 to process the next data packet in the manner described more completely below.
- turnstile logic 220 determines whether packet zero is the head packet. Turnstile logic 220 makes such a determination by comparison of data stored in head field 108 ( Figure 1A) of packet zero to data so indicating or, alternatively, by determining whether head pointer 205 points to position zero.
- turnstile logic 220 ( Figure 2B) must generally first determine that no older data packets of the same set are stored in turnstile FIFO 100 and processing transfers to step 306 ( Figure 3) which is described more completely below.
- turnstile logic 220 determines whether packet zero can be dequeued.
- a data packet can be dequeued if a recipient system to which the data packet is to be transferred is ready to receive the data packet.
- Turnstile logic 220 can make such a determination by communicating with the recipient system and identifies the recipient system by reference to data stored in set identifier field 106 of packet zero.
- turnstile logic 220 determines that packet zero, i.e., data packet A1, can be dequeued and proceeds to dequeue packet zero in step 320 ( Figure 3).
- Step 320 is shown in greater detail as logic flow diagram 320 ( Figure 5).
- turnstile logic 220 retrieves data stored in data packet field 104 ( Figure 1A) of packet zero and, in this illustrative embodiment, sends the retrieved data to the recipient which is identified by data stored in set identifier field 106 of packet zero.
- turnstile logic 220 ( Figure 2B) moves each data packet stored in a slot in a position subsequent to packet zero to and including the tail packet in the direction of arrow R. It should be noted that data packets preceding packet zero up to and including the head packet are not moved. Thus, packet zero is removed from turnstile FIFO 100 and the subsequent data packets are moved to fill the one of slots 102 vacated by packet zero.
- the data packets which remain stored.in turnstile FIFO 100 are stored in contiguous ones of slots 102.
- the data packet immediately following packet zero in the sequence of turnstile FIFO 100 becomes packet zero to thereby replace the previous packet zero in a subsequent performance of the steps of logic flow diagram 300 ( Figure 3).
- processing according to logic flow diagram 320, and therefore step 320 ( Figure 3) completes.
- the resulting of dequeuing data packet A1 is shown in Figure 2C.
- step 320 Figure 3
- packet zero is now data packet B1 ( Figure 2C) as a result of dequeuing data packet A1 in step 320 ( Figure 3) as described above.
- Data packet B 1 Figure 2C
- the recipient system of data packet B1 Figure 2C
- step 316 processing transfers from test step 305 ( Figure 3) to step 316.
- turnstile logic 220 rotates turnstile FIFO 100 in the direction of arrow R such that the data packet immediately following packet zero in the sequence of turnstile FIFO 100 becomes packet zero.
- the result of such rotation is shown in Figure 2D.
- Rotation is accomplished by physically shifting data stored in each packet into the adjacent slot in the direction of arrow R.
- rotation is accomplished by incrementing a position zero pointer (not shown) to point to the next one of slots 102 in the direction opposite arrow R.
- data packet B2 is packet zero and is a candidate for being dequeued in step 320 ( Figure 3) in the manner described above. It should be noted that the head packet and tail packet do not change as a result of rotation.
- Data packet B 1 is still the head packet
- data packet B3 is still the tail packet.
- turnstile logic 220 determines that no older data packets of the same set as packet zero are stored in turnstile FIFO 100. Specifically, turnstile logic 220 looks for another data packet which is of the same set as packet zero and which is positioned between position zero and the head slot. In step 306 ( Figure 3), turnstile logic 220 ( Figure 2B) initializes a temporary pointer 212 to point to position zero within turnstile FIFO 100. In step 308 ( Figure 3), turnstile logic 220 ( Figure 2B) decrements the temporary pointer. Thus, temporary pointer 212 now points to the one of slots 102 which immediately precedes the slot at position zero, i.e., the slot which stores data packet B1.
- Step 310 Processing transfers to step 310 in which turnstile logic 220 reads the tags of the data packet stored in the slot to which temporary pointer 212 points, which is sometimes referred to herein as the temporary packet.
- data packet B1 is the temporary packet.
- packet zero i.e., data packet B2
- the temporary data packet i.e., data packet B1
- processing transfers to step 316 and turnstile logic 220 rotates turnstile FIFO 100 to consider data packet A2 as packet zero as shown in Figure 2E.
- turnstile logic 220 In a conventional FIFO which stores data packets of multiple ordered sets, data packet A2 would not be considered for dequeuing since data packets B1 and B2 are older and are still stored in the FIFO. However, by rotation of turnstile FIFO 100, data packet A2 can be considered for dequeuing.
- turnstile logic 220 reads the tags of data packet A2.
- turnstile logic 220 determines that data packet A2 is not the head packet. Data packet B1 is still the head packet.
- turnstile logic initializes temporary pointer 212 to point to data packet A2.
- turnstile logic 220 decrements temporary pointer 212 such that data packet B2 is now the temporary data packet.
- turnstile logic 220 determines that packet zero, i.e., data packet A2, and the temporary data packet, i.e., data packet B2, are not of the same ordered set. Accordingly, data packet A2 is still a candidate for dequeuing since no older data packet of the same set has been detected so far in turnstile FIFO 100. Processing therefore transfers to test step 314.
- turnstile logic 220 determines whether the temporary data packet is the head packet. If the temporary packet is the head packet, then all preceding data packets of turnstile FIFO 100 have been checked and, since processing has reached test step 314 each time, no older data packet of the same set as packet zero is stored within turnstile FIFO 100 and packet zero can therefore be safely dequeued. Processing accordingly transfers to test step 305 and step 320 for dequeuing in the manner described above. Conversely, if the temporary data packet is not the head packet, more data packets between packet zero and the head packet must be checked before packet zero can be safely dequeued. In this illustrative example, the temporary data packet is data packet B2 and is not the head packet.
- processing transfers to step 308 in which turnstile logic 220 decrements temporary pointer 212 such that data packet B 1 is now the temporary data packet.
- processing transfers to step 310 and through test step 312 to test step 314. Since the temporary data packet is now the head data packet, all preceding data packets in turnstile FIFO 100 have been checked in test step 312 and packet zero can now be safely dequeued. Processing therefore transfers to test step 305 which is described above.
- the recipient system of data packet A2 is ready to receive data packet A2 and processing transfers to step 320 in which data packet A2 is dequeued despite the presence in turnstile FIFO 100 of older data packets of another ordered set.
- the result of dequeuing data packet A2 in step 320 is shown in Figure 2F.
- Computer systems today are required to perform ever increasing numbers of operations in ever decreasing amounts of time.
- computer system 600 ( Figure 6) includes processors 602A-B and memory 604 which is coupled to processors 602A-B through a crossbar 606.
- Processors 602A-B fetch from memory 604 computer instructions and execute the fetched computer instructions.
- Processors 602A-B also read data from and write data to memory 604 and send data and control signals through crossbar 606 to I/O ports 610A-B and graphics processor 608 and receives data and control signals through crossbar 606 from I/O ports 610A-B and graphics processor 608 in accordance with fetched and executed computer instructions.
- Memory 604 can include any type of computer memory and can include, without limitation, randomly accessible memory (RAM), read-only memory (ROM), and storage devices which include storage media such as magnetic and/or optical disks.
- RAM random accessible memory
- ROM read-only memory
- storage devices which include storage media such as magnetic and/or optical disks.
- I/O port 610A receives input signals generated from a user input device 612 which can be any type of user input device including, without limitation, a keyboard, a numeric keypad, or a pointing device such as an electronic mouse, trackball, lightpen, touch-sensitive pad, digitizing tablet, thumb wheel, or joystick.
- User input devices 612 generates signals in response to physical manipulation by a user and I/O port 610A receives those signals and transmits them through crossbar 606 to processors 602A-B.
- I/O port 610B receives control signals and data from processors 602A-B through crossbar 606 and causes display of the data on computer display device 614.
- graphics processor 608 receives control signals and data from processors 602A-B through crossbar 606 and causes display of the data on computer display device 616.
- Computer display devices can be any type of computer display device including without limitation a printer, a cathode ray tube (CRT), a light emitting diode (LED) display, or a liquid crystal display (LCD).
- crossbar 606 includes turnstile logic 220 and turnstile FIFO 100 which operate in the manner described above to manage multiple ordered sets of data packets.
- each data packet represents a transaction between any of processors 602A-B, memory 604, graphics process 608, and I/O ports 610A-B.
- Turnstile FIFO 100 stores data packets in ordered sets according to the intended recipient of the represented bus transaction. Since all such transactions are represented in a single data structure, transactions intended for one system, e.g., processor 602B, can accumulate significantly without exceeding any maximum limit of queued transactions as long as empty slots in turnstile FIFO 100 remain.
- computer system 600 is the SPARCserver 450 computer system available from Sun Microsystems, Inc. of Mountain View, California.
- Sun, Sun Microsystems, and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
Description
- The present invention pertains to first in, first out memory systems. More particularly, the present invention relates to a method, a computer readable medium, and an apparatus for managing multiple ordered sets in a single memory system.
- A first in, first out memory system (FIFO) is a memory system from which data items are retrieved in the same sequence in which the data items were stored in the memory system. That is, the first data item stored in a FIFO is the first data item that is retrieved from the FIFO.
- FIFO's are commonly used as data rate buffers between systems that transfer data at widely different rates. For example, multiple systems which process and transfer data at widely different rates can be interconnected through an interconnect such as a crossbar. A FIFO can be used to buffer data transferred from a fast device to a slow device, for example, from a computer to a printer. The computer can send character data to a FIFO at a relatively high rate. The printer can then read the data from the FIFO at a much slower rate and in the same order that the data was sent by the computer. Similarly, a FIFO can be used to buffer data transferred from a slow device to a fast device, e.g., from a keyboard to a computer. Here, the keyboard can send character data to a FIFO at a relatively low rate. The computer can then read the data from the FIFO at a much higher rate and in the order that the data was sent by the keyboard. Therefore, the computer may perform other tasks while the FIFO is slowly being filled with data and later retrieve the data from the FIFO in order.
- A FIFO implemented in hardware, e.g., in an integrated computer, typically includes a finite number of memory positions into which data items can be stored. Each memory position can be, for example, a register. In general, each memory position of the FIFO can store a single data item. Each data item typically has a fixed length, but some FIFOs store data items of variable length.
- Many applications require buffering of multiple ordered sets, or multiple sets of data items. In such applications, sequential ordering of data items are generally only important among data items of the same set. One such example is a scheduler that spools task sets for multiple processors. The scheduler can compile an ordered set of packets for each processor and each processor can sequentially execute a task set which includes the ordered set of packets specific to the processor. Therefore, it is important to maintain sequential ordering of packets within each ordered set for each processor. But, it is not necessary to maintain sequential ordering of packets among the plurality of ordered sets.
- EP-369920 discloses a method and apparatus for managing a plurality of circular buffers by subdividing a contiguous block of storage into a plurality of interleaved circular buffers. A table of pointers is used to store and retrieve information in the circular buffers.
- One method of buffering data entries of multiple ordered sets is to sort the data entries into multiple, separate FIFO's, i.e., one for each ordered set. In some applications, e.g., when multiple FIFO's are implemented in hardware, it is necessary to pre-allocate memory space for such FIFO's and therefore to fix a maximum number of FIFO's and a maximum number of memory positions for each such FIFO. In systems which use multiple FIFO's, the number of FIFO's and the maximum requisite length of each FIFO can be particularly difficult to predict and can depend upon the manner in which such systems are used. Fixing the maximum number of FIFO's too low increases the likelihood that such a system finds insufficient FIFO's to operate properly. Fixing the maximum number of FIFO's too high allocates more memory, and therefor more circuitry, than is necessary for implementation of the multiple FIFO's. In addition, one of a number of FIFO's of fixed length can exhaust available memory positions while other FIFO's have a surplus of memory positions. Accordingly, fixing the number of FIFO's and the number-of memory positions for each FIFO can result in a memory position shortage in one FIFO and a simultaneous memory position surplus in other FIFO's.
- Some attempts have been made to implement multiple ordered sets in a single FIFO. However, such can result in a problem known as blocking. Blocking refers to the unavailability of data items of one ordered set stored in a FIFO as a result of storage of a data item of another ordered set in a preceding memory in the order of the FIFO. The following exampleis illustrative. Suppose a scheduler collects packets into respective ordered sets representing respective tasks to be performed by respective processors. Suppose further that the packets are spooled through a single FIFO regardless of the particular processor which is to receive each packet. If packets intended for a first processor follow packets intended for a second processor in the sequence of the single FIFO, the packets intended for the first processor cannot be sent to the first processor until the preceding packets for the second processor are sent. If the second processor is busy and cannot receive the packets from the FIFO, the packets intended for the first processor are blocked. Even if the first processor is ready to receive packets from the FIFO, the packets are blocked pending receipt of the preceding packets by the second processor. Accordingly, the first processor is idle and wasted as long as the second processor is busy. Thus, blocking leads to unnecessarily wasted resources and time.
- What is needed is a method and apparatus for buffering data entries of multiple ordered sets without a need to allocate an excess of FIFO's or slots per FIFO and in a manner such that blocking of an oldest data entry which is a member of one set does not cause excessive delay in release of oldest data entries of other sets from the FIFO.
- Particular and preferred aspects of the invention are set out in the accompanying independent and dependent claims.
- In accordance with the present invention, a method, a computer readable medium, and an apparatus for managing multiple ordered sets of data entries in a circular memory structure is provided as in the independent claims. A circular memory structure according to the present invention is sometimes referred to as a turnstile FIFO. Multiple ordered sets of data packets are stored in the turnstile FIFO. The turnstile FIFO is managed such that blocking of an oldest packet which is a member of one set does not cause excessive delay in dequeuing oldest packets which are members of other sets. Processing multiple ordered sets according to the present invention safely preserve sequential order among packets which are members of a same set.
- Each packet includes a set identifier which specifies one of the multiple ordered sets stored in the turnstile FIFO. Accordingly, the turnstile FIFO can include as few as one ordered set or as many distinct and separate ordered sets as can be uniquely identified by the range of values of the set identifier. Conventional FIFO systems require pre-allocating a number of FIFO's, each of which is pre-allocated at a maximum size. However, storing all packets at a single turnstile FIFO allows a moderately sized turnstile FIFO to store a few long ordered sets, many short ordered sets, or a combination of both.
- Operations performed on the turnstile FIFO include enqueue, dequeue, and rotate. The enqueue operation adds a new packet to the turnstile FIFO in such a way that preserves the sequential order of the packets of the selected set within the turnstile FIFO. The dequeue operation retrieves an oldest packet of a set stored in the turnstile FIFO which is not currently blocked from being dequeued.
- Specifically, a data packet is dequeued from a position within the turnstile FIFO only if the data packet is the oldest data packet stored in the turnstile FIFO of the particular ordered set to which the data packet belongs. Turnstile logic determines whether the data packet is the oldest of its particular ordered set by determining the ordered set to which each older data packets of the turnstile FIFO belongs. Since the data packets of the turnstile FIFO are stored in the same sequence in which the data packets are added to the turnstile FIFO, all data packets which are older than the selected data packet are stored at preceding positions within the turnstile FIFO up to and including the head data packet. The head data packet is the oldest of all data packets stored in the turnstile FIFO regardless of ordered set membership and is tracked by the turnstile logic. For each data packet older than the selected data packet within the turnstile FIFO, the set to which the older data packet belongs is compared to the set to which the selected data packet belongs.
- If one or more of the older data packets belong to the same set to which the selected data packet belongs, the selected data packet is not the oldest data packet of the ordered set and therefore cannot be dequeued without violating the sequence of data packet dequeuing within the ordered set. Conversely, if no older data packet belongs to the same set to which the selected data packet belongs, the selected data packet is the oldest data packet of its particular ordered set and can therefore be dequeued.
- A turnstile FIFO according to the present invention provides the performance efficiencies of separate FIFO's for each of a number of ordered sets while simultaneously providing the flexibility of a single FIFO for storing data packets of multiple ordered sets.
- The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:
- Figure 1A is a block diagram of slots of a circular memory structure according to a first embodiment of the present invention for managing multiple ordered sets.
- Figure 1B is a block diagram of slots of a circular memory structure according to a second embodiment of the present invention for managing multiple ordered sets.
- Figure 2A is a block diagram of a circular memory structure, according to principles of the present invention for managing multiple ordered sets, in an initial state.
- Figure 2B is a block diagram of the circular memory structure of Figure 2A after an enqueue operation in accordance with principles of the present invention
- Figure 2C is a block diagram of the circular memory structure of Figure 2B after a dequeue operation in accordance with principles of the present invention.
- Figure 2D is a block diagram of the circular memory structure of Figure 2C after a first rotate operation in accordance with principles of the present invention.
- Figure 2E is a block diagram of the circular memory structure of Figure 2D after a second rotate operation in accordance with principles of the present invention.
- Figure 2F is a block diagram of the circular memory structure of Figure 2E after a dequeue operation in accordance with principles of the present invention.
- Figure 3 is a logic flow diagram of the management multiple ordered sets in a circular memory structure according to principles of the present invention.
- Figure 4 is a block diagram of the enqueuing data packets of ordered sets in a single circular memory structure in accordance with principles of the present invention.
- Figure 5 is a block diagram of the dequeuing of a particular data packet from the single circular memory structure.
- Figure 6 is a schematic block diagram of a computer system incorporating the invention.
- In the following detailed description of an illustrative embodiment of the present invention, an apparatus and method for managing multiple ordered sets in a turnstile FIFO 100 (Figure 1A), numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be obvious to one skilled in the art that the present invention can be practiced without these specific details or by using alternate elements or processes. In other instances well known processes, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present invention.
- A circular memory structure according to the present invention is sometimes referred to as a
turnstile FIFO 100. Multiple ordered sets of data packets are stored inturnstile FIFO 100. Turnstile logic 220 (Figures 2A-2F) implements a rotate mechanism which enables management of multiple ordered sets such that the presence of an oldest packet which is a member of one set does not cause excessive delay in de-queuing oldest data packets which are members of other sets. According to the present invention,turnstile FIFO 100 safely preserves sequential order among data packets which are members of a same set yet stores packets of multiple ordered sets in the single structure ofturnstile FIFO 100. - Figure 1A shows
turnstile FIFO 100 according to an embodiment of the present invention.Turnstile FIFO 100 is a circular memory structure which includes a number ofslots 102.Turnstile FIFO 100 is circular in thatslots 102 are logically ordered and the first ordered slot, i.e., slot 102A, immediately follows the last ordered slot, i.e., slot 102N. Such is illustrated, for example, in Figures 2A-F. Turnstile FIFO 100 is shown in tabular form in Figures 1A-B to more clearly illustrate each of the fields ofslots 102, each of which includes sufficient memory to store a respective packet. In an embodiment of the present invention, each ofslots 102 is a register. - Each of
slots 102 includes adata field 104, aset identifier field 106, ahead field 108 and avalid field 110. Each of fields 104-110 stores data representing a particular piece of information related to a particular data packet. Fields 104-110 are sometimes collectively, referred to as tags.Data field 104 stores the data packet which is the substantive data stored and managed within a particular one ofslots 102.Set identifier 106 specifies the one of the multiple ordered sets stored inturnstile FIFO 100 to which a particular data packet belongs. Since a single structure stores all packets of multiple ordered sets,turnstile FIFO 100 can store data packets of as few as one ordered set or as many distinct and separate ordered sets as can be uniquely identified by the range of values ofset identifier 106. In addition, each ofslots 102 can store a data packet of any of the distinct and separate ordered sets. Accordingly,turnstile FIFO 100 can be moderately sized yet store a few particularly long ordered sets, many short ordered sets, or a combination of both. -
Header field 108 stores data, e.g., a single bit, which indicates whether a particular one ofslots 102 stores the head data packet. The head data packet is the oldest of all data packets stored inturnstile FIFO 100.Valid field 110 stores data, e.g., a single bit, which indicates whether a particular one ofslots 102 stores a valid data packet and is therefore not available for storage of another data packet. - With reference to Figure 1B, a block diagram representing an alternative embodiment of
turnstile FIFO 100 is shown. In this embodiment, valid tag 110 (Figure 1A) is not required. Instead, a unique ordered set identifier is reserved to represent an invalid packet entry. If setfield 106 of a slot, e.g.,slot 102A, stores data representing the reserved ordered set,slot 102A does not store a valid data packet and is available for storage of a new data packet. - Turnstile logic 220 (Figure 2A) manages one or more ordered sets of data packets stored in
turnstile FIFO 100 using enqueue, dequeue, and rotate operations. Performance of the enqueue operation adds a new packet to turnstileFIFO 100 in such a way that preserves the sequential order of the packets of the selected set withinturnstile FIFO 100. Performance of the dequeue operation retrieves an oldest data packet of a selected ordered set of data packets stored inturnstile FIFO 100 in such a way that data packets of other ordered sets cannot block the retrieval of the oldest data packet of the selected ordered set. - The enqueuing of a data packet into
turnstile FIFO 100 is illustrated as logic flow diagram 400 (Figure 4). Prior to performance of the steps of logic flow diagram 400,turnstile FIFO 100 has a prior state in which turnstileFIFO 100 stores data packets A1, A2, B1, and B2. Data packets A1 and A2 are from a set generally designated as "A," and data packet A1 is older than, i.e., was stored inturnstile FIFO 100 prior to, data packet A2. Similarly, data packets B1 and B2 are from a set generally designated as "B," and data packet B1 is older than, i.e., was stored inturnstile FIFO 100 prior to, data packet B2. In this illustrative example of enqueuing a data packet according to logic flow diagram 400 (Figure 4), turnstile FIFO 100 (Figure 2A) stores the following data packets in the following order: A1, B1, B2, A2. -
Turnstile FIFO 100 generally has three (3) significant slots ofslots 102 which are used byturnstile logic 220 to manage data packets inturnstile FIFO 100. Specifically, a tail slot stores a tail data packet which is the data packet most recently stored inturnstile FIFO 100, a head slot stores a head data packet which is the data packet least recently stored inturnstile FIFO 100, and a slot at position zero. The slot at position zero is the only slot from which a data packet can be dequeued in accordance with an illustrative embodiment of the present invention. In one embodiment, the tail slot is located dynamically byturnstile logic 220 by determining which ofslots 102 is valid and is immediately followed by an invalid slot as indicated byvalid field 110 of each ofslots 102 or is immediately followed by the head slot. Alternatively, atail pointer 210 points to the tail slot. The head slot is the one ofslots 102 in which head field 108 (Figure 1A) of the slot so indicates. Alternatively, ahead pointer 205 points to the head slot. The slot at position zero can be fixed withinturnstile FIFO 100 as shown in Figure 2A or, alternatively, can be identified by a position zero pointer (not shown). - In test step 402 (Figure 4) in which processing according to logic flow diagram 400 begins, turnstile logic 220 (Figure 2A) determines whether the head slot immediately following the tail slot in
turnstile FIFO 100. If so,turnstile FIFO 100 is full and processing transfers to step 404 in which turnstile logic 220 (Figure 2A) refuses to enqueue the subject data packet.Turnstile logic 220 can communicate such refusal to the source of the subject data packet in any conventional manner. Conversely, if the head slot does not immediately follow the tail slot, processing transfers from test step 402 (Figure 4) to step 406. - In
step 406, turnstile logic 220 (Figure 2A) increments the position of the tail slot by one. It should be noted that, sinceturnstile FIFO 100 is circular, the first ofslots 102 immediately follows the last ofslots 102. Thus, the slot at position N immediately precedes the slot at position zero. Accordingly, if the tail slot is at position N, the tail slot is at position zero after performance of step 406 (Figure 4). In one embodiment, turnstile logic 220 (Figure 2A) increments the tail slot position by settingvalid field 110 in the one ofslots 102 immediately following the tail slot to indicate that the slot is now valid and is now the new tail slot. The new tail slot is so identified by the fact that the immediately following slot is either invalid or is the head slot. In an alternative embodiment,turnstile logic 220 increments the position of the tail slot by adjustingtail pointer 210 to point to the slot immediately following the previous tail slot. - In step 408 (Figure 4), turnstile logic 220 (Figure 2A) stores the subject packet in the new tail slot. Specifically,
turnstile logic 220 stores the subject packet indata packet field 104 of the new tail slot. For example, in enqueuing data packet B3 (Figure 2B),turnstile logic 220increments tail pointer 210 and stores data packet B3 in the new tail slot as shown. Since data packets are enqueued ontoturnstile FIFO 100 in the same sequence in which such data packets are received byturnstile logic 220, the sequence of data packets within each ordered set is inherently preserved. - Logic flow diagram 300 (Figure 3) illustrates the dequeuing of data packets from turnstile FIFO 100 (Figure 2B) by
turnstile logic 220 in one embodiment of the present invention. In this illustrative embodiment,turnstile logic 220 does not wait for requests to dequeue data packets from specific ordered sets but instead perpetually attempts to dequeue all data packets fromturnstile FIFO 100 and deliver each such data packet to a recipient identified in the data packet, e.g., by setidentifier field 106. Such is appropriate, for example, ifturnstile logic 220 andturnstile FIFO 100 are used to route traffic between multiple systems coupled through a crossbar switch. In that case,turnstile logic 220 perpetually attempts to deliver data packets stored inturnstile FIFO 100 to respective recipients and generally only fails when the recipient is busy or otherwise unavailable to receive the data packets. - In
step 302 with which processing according to logic flow diagram 300 begins, turnstile control logic 220 (Figure 2B) retrieves the tags of the current packet zero. As used herein, packet zero is the data packet stored in the slot at position zero, e.g., data packet A1 in Figure 2B. Processing transfers to test step 303 (Figure 3) in which turnstile logic 220 (Figure 2B) determines whether packet zero is valid by comparison of data stored in valid field 110 (Figure 1A) to data so indicating. If packet zero is not valid, processing transfers to step 316 (Figure 3) which is described below and in which turnstile logic 220 (Figure 2B) rotatesturnstile FIFO 100 to process the next data packet in the manner described more completely below. Conversely, if packet zero is valid, processing transfers fromtest step 303 to teststep 304. Intest step 304, turnstile logic 220 (Figure 2B) determines whether packet zero is the head packet.Turnstile logic 220 makes such a determination by comparison of data stored in head field 108 (Figure 1A) of packet zero to data so indicating or, alternatively, by determining whetherhead pointer 205 points to position zero. - If packet zero is the head packet, packet zero is necessarily the oldest packet stored in
turnstile FIFO 100 and can therefore be dequeued without violating the particular sequence with which data packets are added toturnstile FIFO 100. Accordingly, processing transfers fromtest step 304 to teststep 305. Conversely, if packet zero is not the head packet, turnstile logic 220 (Figure 2B) must generally first determine that no older data packets of the same set are stored inturnstile FIFO 100 and processing transfers to step 306 (Figure 3) which is described more completely below. - In the context of the state of
turnstile FIFO 100 as shown in Figure 2B, packet zero is data packet A1 and is the head packet. Accordingly, processing transfers to test step 305 (Figure 3). Intest step 305, turnstile logic 220 (Figure 2B) determines whether packet zero can be dequeued. In this illustrative embodiment, a data packet can be dequeued if a recipient system to which the data packet is to be transferred is ready to receive the data packet.Turnstile logic 220 can make such a determination by communicating with the recipient system and identifies the recipient system by reference to data stored in setidentifier field 106 of packet zero. In this illustrative example,turnstile logic 220 determines that packet zero, i.e., data packet A1, can be dequeued and proceeds to dequeue packet zero in step 320 (Figure 3). Step 320 is shown in greater detail as logic flow diagram 320 (Figure 5). - In
step 502, turnstile logic 220 (Figure 2B) retrieves data stored in data packet field 104 (Figure 1A) of packet zero and, in this illustrative embodiment, sends the retrieved data to the recipient which is identified by data stored in setidentifier field 106 of packet zero. In step 504 (Figure 5), turnstile logic 220 (Figure 2B) moves each data packet stored in a slot in a position subsequent to packet zero to and including the tail packet in the direction of arrow R. It should be noted that data packets preceding packet zero up to and including the head packet are not moved. Thus, packet zero is removed fromturnstile FIFO 100 and the subsequent data packets are moved to fill the one ofslots 102 vacated by packet zero. Accordingly, the data packets which remainstored.in turnstile FIFO 100 are stored in contiguous ones ofslots 102. In addition, the data packet immediately following packet zero in the sequence ofturnstile FIFO 100 becomes packet zero to thereby replace the previous packet zero in a subsequent performance of the steps of logic flow diagram 300 (Figure 3). After step 504 (Figure 5), processing according to logic flow diagram 320, and therefore step 320 (Figure 3), completes. The resulting of dequeuing data packet A1 is shown in Figure 2C. - Processing transfers from step 320 (Figure 3) to step 302 which is described above. In this illustrative example, packet zero is now data packet B1 (Figure 2C) as a result of dequeuing data packet A1 in step 320 (Figure 3) as described above. Data packet B 1 (Figure 2C) is also the head packet, so processing transfers through test step 304 (Figure 3) to test
step 305. In this illustrative example, the recipient system of data packet B1 (Figure 2C) is not ready to receivedata packet B 1 which therefore cannot be dequeued. Accordingly, processing transfers from test step 305 (Figure 3) to step 316. - In
step 316, turnstile logic 220 (Figure 2C) rotatesturnstile FIFO 100 in the direction of arrow R such that the data packet immediately following packet zero in the sequence ofturnstile FIFO 100 becomes packet zero. The result of such rotation is shown in Figure 2D. Rotation is accomplished by physically shifting data stored in each packet into the adjacent slot in the direction of arrow R. Alternatively, rotation is accomplished by incrementing a position zero pointer (not shown) to point to the next one ofslots 102 in the direction opposite arrow R. After rotation in step 416, data packet B2 is packet zero and is a candidate for being dequeued in step 320 (Figure 3) in the manner described above. It should be noted that the head packet and tail packet do not change as a result of rotation.Data packet B 1 is still the head packet, and data packet B3 is still the tail packet. - Processing transfers to step 302 and therefrom to test
step 304. Since data packet B2 is not the head packet, must generally verify that no older packet of the same set as packet zero is stored inturnstile FIFO 100. - In steps 306-314, turnstile logic 220 (Figure 2B) determines that no older data packets of the same set as packet zero are stored in
turnstile FIFO 100. Specifically,turnstile logic 220 looks for another data packet which is of the same set as packet zero and which is positioned between position zero and the head slot. In step 306 (Figure 3), turnstile logic 220 (Figure 2B) initializes atemporary pointer 212 to point to position zero withinturnstile FIFO 100. In step 308 (Figure 3), turnstile logic 220 (Figure 2B) decrements the temporary pointer. Thus,temporary pointer 212 now points to the one ofslots 102 which immediately precedes the slot at position zero, i.e., the slot which stores data packet B1. Processing transfers to step 310 in whichturnstile logic 220 reads the tags of the data packet stored in the slot to whichtemporary pointer 212 points, which is sometimes referred to herein as the temporary packet. In this illustrative example, data packet B1 is the temporary packet. - Processing transfers to test step 312 (Figure 3) in which
turnstile logic 220 determines whether packet zero and the temporary packet are of the same set as represented in set identifier field 106 (Figure 1A) of the respective data packets. If so, packet zero is not the oldest data packet of any particular ordered set stored withinturnstile FIFO 100 and therefore cannot be dequeued without violating the sequence of data packets in the ordered set. Accordingly, processing transfers to step 316 in whichturnstile logic 220 rotatesturnstile FIFO 100 to consider the next data packet for dequeuing. Conversely, packet zero is still eligible for dequeuing and processing transfers to teststep 314 which is described above. In this illustrative example, packet zero, i.e., data packet B2, and the temporary data packet, i.e., data packet B1, are of the same order set. Accordingly, processing transfers to step 316 andturnstile logic 220 rotatesturnstile FIFO 100 to consider data packet A2 as packet zero as shown in Figure 2E. - In a conventional FIFO which stores data packets of multiple ordered sets, data packet A2 would not be considered for dequeuing since data packets B1 and B2 are older and are still stored in the FIFO. However, by rotation of
turnstile FIFO 100, data packet A2 can be considered for dequeuing. Instep 302,turnstile logic 220 reads the tags of data packet A2. Intest step 304,turnstile logic 220 determines that data packet A2 is not the head packet. Data packet B1 is still the head packet. Instep 306, turnstile logic initializestemporary pointer 212 to point to data packet A2. Instep 308,turnstile logic 220 decrementstemporary pointer 212 such that data packet B2 is now the temporary data packet. Intest step 312,turnstile logic 220 determines that packet zero, i.e., data packet A2, and the temporary data packet, i.e., data packet B2, are not of the same ordered set. Accordingly, data packet A2 is still a candidate for dequeuing since no older data packet of the same set has been detected so far inturnstile FIFO 100. Processing therefore transfers to teststep 314. - In
test step 314, turnstile logic 220 (Figure 2E) determines whether the temporary data packet is the head packet. If the temporary packet is the head packet, then all preceding data packets ofturnstile FIFO 100 have been checked and, since processing has reachedtest step 314 each time, no older data packet of the same set as packet zero is stored withinturnstile FIFO 100 and packet zero can therefore be safely dequeued. Processing accordingly transfers to teststep 305 and step 320 for dequeuing in the manner described above. Conversely, if the temporary data packet is not the head packet, more data packets between packet zero and the head packet must be checked before packet zero can be safely dequeued. In this illustrative example, the temporary data packet is data packet B2 and is not the head packet. Accordingly, processing transfers to step 308 in whichturnstile logic 220 decrementstemporary pointer 212 such thatdata packet B 1 is now the temporary data packet. Processing transfers to step 310 and throughtest step 312 to teststep 314. Since the temporary data packet is now the head data packet, all preceding data packets inturnstile FIFO 100 have been checked intest step 312 and packet zero can now be safely dequeued. Processing therefore transfers to teststep 305 which is described above. In this example, the recipient system of data packet A2 is ready to receive data packet A2 and processing transfers to step 320 in which data packet A2 is dequeued despite the presence inturnstile FIFO 100 of older data packets of another ordered set. The result of dequeuing data packet A2 instep 320 is shown in Figure 2F. - Computer systems today are required to perform ever increasing numbers of operations in ever decreasing amounts of time. For example, computer system 600 (Figure 6) includes
processors 602A-B andmemory 604 which is coupled toprocessors 602A-B through acrossbar 606.Processors 602A-B fetch frommemory 604 computer instructions and execute the fetched computer instructions.Processors 602A-B also read data from and write data tomemory 604 and send data and control signals throughcrossbar 606 to I/O ports 610A-B andgraphics processor 608 and receives data and control signals throughcrossbar 606 from I/O ports 610A-B andgraphics processor 608 in accordance with fetched and executed computer instructions. -
Memory 604 can include any type of computer memory and can include, without limitation, randomly accessible memory (RAM), read-only memory (ROM), and storage devices which include storage media such as magnetic and/or optical disks. - I/
O port 610A receives input signals generated from auser input device 612 which can be any type of user input device including, without limitation, a keyboard, a numeric keypad, or a pointing device such as an electronic mouse, trackball, lightpen, touch-sensitive pad, digitizing tablet, thumb wheel, or joystick.User input devices 612 generates signals in response to physical manipulation by a user and I/O port 610A receives those signals and transmits them throughcrossbar 606 toprocessors 602A-B. - I/
O port 610B receives control signals and data fromprocessors 602A-B throughcrossbar 606 and causes display of the data oncomputer display device 614. Similarly,graphics processor 608 receives control signals and data fromprocessors 602A-B throughcrossbar 606 and causes display of the data oncomputer display device 616. Computer display devices can be any type of computer display device including without limitation a printer, a cathode ray tube (CRT), a light emitting diode (LED) display, or a liquid crystal display (LCD). - As described above,
crossbar 606 includesturnstile logic 220 andturnstile FIFO 100 which operate in the manner described above to manage multiple ordered sets of data packets. In one embodiment, each data packet represents a transaction between any ofprocessors 602A-B,memory 604,graphics process 608, and I/O ports 610A-B. Turnstile FIFO 100 stores data packets in ordered sets according to the intended recipient of the represented bus transaction. Since all such transactions are represented in a single data structure, transactions intended for one system, e.g.,processor 602B, can accumulate significantly without exceeding any maximum limit of queued transactions as long as empty slots inturnstile FIFO 100 remain. In other words, shortage and surplus of FIFO slots do not exist simultaneously in the manner described above with respect-to multiple, separate FIFO's. Furthermore, in the manner described above, transactions intended for one system does not block transactions for other systems. Accordingly, inefficiencies associated with idle systems incomputer system 600 are reduced significantly. - In one embodiment,
computer system 600 is the SPARCserver 450 computer system available from Sun Microsystems, Inc. of Mountain View, California. Sun, Sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. - It should be noted that the above description is illustrative only and is not limiting.
Claims (9)
- A method for dequeuing a selected data packet from a single circular memory structure in which one or more data packets are stored in the single circular memory structure and in which each of the one or more data packets belongs to a corresponding one of one or more ordered sets wherein the selected data packet belongs to a selected one of the ordered sets, the method characterized in that it preserves, within each ordered set, the sequence in which said data packets are stored, by comprising the steps of:(a) searching for an intervening one of the data packets which in sequence is positioned between the selected data packet and a head one of the data packets and which belongs to the selected ordered set, wherein the head data packet occupies the earliest position in the sequence of data packets stored in the single circular memory structure;(b) dequeuing the selected data packet from the single circular memory structure only upon a determination that such an intervening data packet does not exist,(c) and only upon a determination that such an intervening data packet does exist, determining the data packet, stored in a position following the position of the selected data packet, to be the new selected data packet and returning to step (a).
- The method of Claim 1 wherein the single circular memory structure is a circular list.
- The method of Claim 1 wherein said step (a) comprises the steps of:performing the following steps for each one of the data packets stored in the single circular memory structure in sequence in positions prior to the selected data packet up to and including the head data packet:determining to which one of the one or more ordered sets the data packet belongs; andcomparing that ordered set to the selected ordered set.
- A computer readable medium for use in association with a computer which includes a processor and a memory, the computer readable medium including computer instructions which are configured to cause the computer to dequeue a selected data packet from a single circular memory structure in which one or more data packets are stored in the single circular memory structure and in which each of the one or more data packets belongs to a corresponding one of one or more ordered sets wherein the selected data packet belongs to a selected one of the ordered sets, the method characterized in that it preserves, within each ordered set, the sequence in which said data packets are stored, by comprising the steps of:(a) searching for an intervening one of the data packets which in sequence is positioned between the selected data packet and a head one of the data packets and which belongs to the selected ordered set, wherein the head data packet occupies the earliest position in the sequence of data packets stored in the single circular memory structure;(b) dequeuing the selected data packet from the single circular memory structure only upon a determination that such an intervening data packet does not exist,(c) and only upon a determination that such an intervening data packet does exist, determining the data packet, stored in a position following the position of the selected data packet, to be the new selected data packet and returning to step (a).
- The computer readable medium of Claim 4 wherein the single circular memory structure is a circular list.
- The computer readable medium of Claim 4 wherein said step (a) comprises the steps of:performing th following steps for each one of the data packets stored in the single circular memory structure in sequence in positions prior to the selected data packet up to and including the head data packet:determining to which one of the one or more ordered sets the data packet belongs; andcomparing that ordered set to the selected ordered set.
- A computer system comprising:a processor;a memory in which a single circular memory structure is stored, the single circular memory structure storing one or more data packets in which the data packets are added to the single circular memory structure wherein each of the data packets belong to a corresponding one of one or more ordered sets; andmemory management logic which is operatively coupled between the processor and the memory and which is adapted to dequeue a selected one of the data packets which belongs to a selected one of the ordered sets, the system characterized by being adapted to preserve, within each ordered set, the sequence in which said data packets are stored, by being adapted to perform the steps of:(a) searching for an intervening one of the data packets which in sequence is positioned between the selected data packet and a head one of the data packets and which belongs to the selected ordered set, wherein the head data packet occupies the earliest position in the sequence of data packets stored in the single circular memory structure;(b) dequeuing the selected data packet from the single circular memory structure only upon a determination that such an intervening data packet does not exist,(c) and only upon a determination that such an intervening data packet does exist, determining the data packet, stored in a position following the position of the selected data packet, to be the new selected data packet and returning to step (a).
- The computer system of Claim 7 wherein the single circular memory structure is a circular list.
- The computer system of Claim 7 wherein said step (a) comprises the steps of:performing the following steps for each one of the data packets stored in the single circular memory structure in sequence in positions prior to the selected data packet up to and including the head data packet:determining to which one of the one or more ordered sets the data packet belongs; andcomparing that ordered set to the selected ordered set.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US885010 | 1997-06-30 | ||
US08/885,010 US6035348A (en) | 1997-06-30 | 1997-06-30 | Method for managing multiple ordered sets by dequeuing selected data packet from single memory structure |
Publications (3)
Publication Number | Publication Date |
---|---|
EP0889392A2 EP0889392A2 (en) | 1999-01-07 |
EP0889392A3 EP0889392A3 (en) | 1999-06-09 |
EP0889392B1 true EP0889392B1 (en) | 2007-05-23 |
Family
ID=25385929
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP98305110A Expired - Lifetime EP0889392B1 (en) | 1997-06-30 | 1998-06-29 | Data structure and method for managing multiple ordered sets |
Country Status (3)
Country | Link |
---|---|
US (2) | US6035348A (en) |
EP (1) | EP0889392B1 (en) |
DE (1) | DE69837798D1 (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6035348A (en) * | 1997-06-30 | 2000-03-07 | Sun Microsystems, Inc. | Method for managing multiple ordered sets by dequeuing selected data packet from single memory structure |
US6480927B1 (en) * | 1997-12-31 | 2002-11-12 | Unisys Corporation | High-performance modular memory system with crossbar connections |
US6581116B1 (en) * | 1999-11-09 | 2003-06-17 | International Business Machines Corporation | Method and apparatus for high performance transmission of ordered packets on a bus within a data processing system |
US7088731B2 (en) * | 2001-06-01 | 2006-08-08 | Dune Networks | Memory management for packet switching device |
SG155038A1 (en) * | 2001-09-28 | 2009-09-30 | Consentry Networks Inc | A multi-threaded packet processing engine for stateful packet processing |
US7130936B1 (en) * | 2002-02-22 | 2006-10-31 | Teja Technologies, Inc. | System, methods, and computer program product for shared memory queue |
US20070079077A1 (en) * | 2002-04-29 | 2007-04-05 | Baines Mandeep S | System, method, and computer program product for shared memory queue |
US7272144B2 (en) * | 2002-06-26 | 2007-09-18 | Arris International, Inc. | Method and apparatus for queuing data flows |
US7751325B2 (en) * | 2003-08-14 | 2010-07-06 | At&T Intellectual Property Ii, L.P. | Method and apparatus for sketch-based detection of changes in network traffic |
US7660939B2 (en) * | 2004-07-30 | 2010-02-09 | Virinci Technologies, Inc. | Operating system arrangement for flexible computer system design |
US9031079B1 (en) * | 2004-08-06 | 2015-05-12 | Juniper Networks, Inc. | Hierarchical shaping of network traffic |
US7830901B2 (en) * | 2007-03-15 | 2010-11-09 | International Business Machines Corporation | Reliable network packet dispatcher with interleaving multi-port circular retry queue |
US20140250252A1 (en) * | 2013-03-04 | 2014-09-04 | Silicon Graphics International Corp. | First-in First-Out (FIFO) Modular Memory Structure |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4835738A (en) * | 1986-03-31 | 1989-05-30 | Texas Instruments Incorporated | Register stack for a bit slice processor microsequencer |
EP0369920A3 (en) * | 1988-11-18 | 1992-01-15 | Rolm Company | Interleaving circular buffers |
US5226126A (en) * | 1989-02-24 | 1993-07-06 | Nexgen Microsystems | Processor having plurality of functional units for orderly retiring outstanding operations based upon its associated tags |
US5136582A (en) * | 1990-05-29 | 1992-08-04 | Advanced Micro Devices, Inc. | Memory management system and method for network controller |
US5043981A (en) * | 1990-05-29 | 1991-08-27 | Advanced Micro Devices, Inc. | Method of and system for transferring multiple priority queues into multiple logical FIFOs using a single physical FIFO |
US5333276A (en) * | 1991-12-27 | 1994-07-26 | Intel Corporation | Method and apparatus for priority selection of commands |
US5363485A (en) * | 1992-10-01 | 1994-11-08 | Xerox Corporation | Bus interface having single and multiple channel FIFO devices using pending channel information stored in a circular queue for transfer of information therein |
US5673427A (en) * | 1994-03-01 | 1997-09-30 | Intel Corporation | Packing valid micro operations received from a parallel decoder into adjacent locations of an output queue |
US5572698A (en) * | 1994-04-18 | 1996-11-05 | Rolm Company | System and method for allocating memory resources where the category of a memory resource determines where on a circular stack a pointer to the memory resource is placed |
US5936967A (en) * | 1994-10-17 | 1999-08-10 | Lucent Technologies, Inc. | Multi-channel broadband adaptation processing |
JPH08223181A (en) * | 1995-02-17 | 1996-08-30 | Hitachi Ltd | Atm exchange and inter-network connection device |
US5666494A (en) * | 1995-03-31 | 1997-09-09 | Samsung Electronics Co., Ltd. | Queue management mechanism which allows entries to be processed in any order |
US5898688A (en) * | 1996-05-24 | 1999-04-27 | Cisco Technology, Inc. | ATM switch with integrated system bus |
US6035348A (en) * | 1997-06-30 | 2000-03-07 | Sun Microsystems, Inc. | Method for managing multiple ordered sets by dequeuing selected data packet from single memory structure |
-
1997
- 1997-06-30 US US08/885,010 patent/US6035348A/en not_active Expired - Lifetime
-
1998
- 1998-06-29 DE DE69837798T patent/DE69837798D1/en not_active Expired - Lifetime
- 1998-06-29 EP EP98305110A patent/EP0889392B1/en not_active Expired - Lifetime
-
2000
- 2000-02-25 US US09/513,298 patent/US6324601B1/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
DE69837798D1 (en) | 2007-07-05 |
EP0889392A2 (en) | 1999-01-07 |
US6035348A (en) | 2000-03-07 |
EP0889392A3 (en) | 1999-06-09 |
US6324601B1 (en) | 2001-11-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7337275B2 (en) | Free list and ring data structure management | |
US7269179B2 (en) | Control mechanisms for enqueue and dequeue operations in a pipelined network processor | |
US7197043B2 (en) | Method for allocating memory space for limited packet head and/or tail growth | |
EP0889392B1 (en) | Data structure and method for managing multiple ordered sets | |
US6470415B1 (en) | Queue system involving SRAM head, SRAM tail and DRAM body | |
US7099328B2 (en) | Method for automatic resource reservation and communication that facilitates using multiple processing events for a single processing task | |
US7327674B2 (en) | Prefetching techniques for network interfaces | |
EP1856623B1 (en) | Including descriptor queue empty events in completion events | |
US7715410B2 (en) | Queueing system for processors in packet routing operations | |
US8861515B2 (en) | Method and apparatus for shared multi-bank memory in a packet switching system | |
US7330927B1 (en) | Apparatus and methodology for a pointer manager | |
US7610413B2 (en) | Queue depth management for communication between host and peripheral device | |
US7676588B2 (en) | Programmable network protocol handler architecture | |
US7765554B2 (en) | Context selection and activation mechanism for activating one of a group of inactive contexts in a processor core for servicing interrupts | |
US8266344B1 (en) | Recycling buffer pointers using a prefetch buffer | |
US20030110166A1 (en) | Queue management | |
US7219198B2 (en) | Facilitating communication within shared memory environments using lock-free queues | |
US7058065B2 (en) | Method and apparatus for preventing undesirable packet download with pending read/write operations in data packet processing | |
EP1398922B1 (en) | Balanced linked lists for high performance data buffers in a network device | |
JPS63168732A (en) | Non-locking queue mechanism | |
US6944863B1 (en) | Queue bank repository and method for sharing limited queue banks in memory | |
EP2171934B1 (en) | Method and apparatus for data processing using queuing | |
EP2383659B1 (en) | Queue depth management for communication between host and peripheral device | |
US6895454B2 (en) | Method and apparatus for sharing resources between different queue types | |
US8156265B2 (en) | Data processor coupled to a sequencer circuit that provides efficient scalable queuing and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
AK | Designated contracting states |
Kind code of ref document: A2 Designated state(s): DE FR GB IT NL SE |
|
AX | Request for extension of the european patent |
Free format text: AL;LT;LV;MK;RO;SI |
|
PUAL | Search report despatched |
Free format text: ORIGINAL CODE: 0009013 |
|
AK | Designated contracting states |
Kind code of ref document: A3 Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LI LU MC NL PT SE |
|
AX | Request for extension of the european patent |
Free format text: AL;LT;LV;MK;RO;SI |
|
17P | Request for examination filed |
Effective date: 19991116 |
|
AKX | Designation fees paid |
Free format text: DE FR GB IT NL SE |
|
RAP1 | Party data changed (applicant data changed or rights of an application transferred) |
Owner name: SUN MICROSYSTEMS, INC. |
|
GRAP | Despatch of communication of intention to grant a patent |
Free format text: ORIGINAL CODE: EPIDOSNIGR1 |
|
GRAS | Grant fee paid |
Free format text: ORIGINAL CODE: EPIDOSNIGR3 |
|
17Q | First examination report despatched |
Effective date: 20041208 |
|
GRAJ | Information related to disapproval of communication of intention to grant by the applicant or resumption of examination proceedings by the epo deleted |
Free format text: ORIGINAL CODE: EPIDOSDIGR1 |
|
GRAL | Information related to payment of fee for publishing/printing deleted |
Free format text: ORIGINAL CODE: EPIDOSDIGR3 |
|
GRAP | Despatch of communication of intention to grant a patent |
Free format text: ORIGINAL CODE: EPIDOSNIGR1 |
|
GRAS | Grant fee paid |
Free format text: ORIGINAL CODE: EPIDOSNIGR3 |
|
GRAA | (expected) grant |
Free format text: ORIGINAL CODE: 0009210 |
|
AK | Designated contracting states |
Kind code of ref document: B1 Designated state(s): DE FR GB IT NL SE |
|
REG | Reference to a national code |
Ref country code: GB Ref legal event code: FG4D |
|
REF | Corresponds to: |
Ref document number: 69837798 Country of ref document: DE Date of ref document: 20070705 Kind code of ref document: P |
|
PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: SE Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20070823 |
|
NLV1 | Nl: lapsed or annulled due to failure to fulfill the requirements of art. 29p and 29m of the patents act | ||
EN | Fr: translation not filed | ||
PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: NL Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20070523 Ref country code: DE Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20070824 |
|
PLBE | No opposition filed within time limit |
Free format text: ORIGINAL CODE: 0009261 |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: NO OPPOSITION FILED WITHIN TIME LIMIT |
|
GBPC | Gb: european patent ceased through non-payment of renewal fee |
Effective date: 20070823 |
|
26N | No opposition filed |
Effective date: 20080226 |
|
PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: IT Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20070523 |
|
PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: FR Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20080118 |
|
PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: GB Free format text: LAPSE BECAUSE OF NON-PAYMENT OF DUE FEES Effective date: 20070823 |