×

Method for implementing a double-ended queue in a memory arrangement

  • US 20020116568A1
  • Filed: 12/10/2001
  • Published: 08/22/2002
  • Est. Priority Date: 06/10/1999
  • Status: Active Grant
First Claim
Patent Images

1. A method for implementing a double-ended queue (deque) in a memory where information is stored as data units and each element is allocated its own memory space, in which method data units are added to and removed from the queue according to the LIFO or FIFO principle in such a way that data units are added to or removed from either the beginning or the end of the queue, characterised in that a three-element node is used in the memory on the highest level of hierarchy, with its one element pointing to the buffer forming the beginning of the queue, and with its other element pointing to the buffer forming the tail end of the queue. the middle of the queue is formed of nodes on successive levels of hierarchy so that a pointer contained in the third element of the three-element node on each level of hierarchy points to the next lower level of hierarchy so that the said pointer points to a node on the next lower level of hierarchy which is a similar three-element node, with the exception of the lowest level of hierarchy, where the said node can also be a buffer, and with the exception of the highest level of hierarchy, where the said buffer can also be a NIL pointer, when the two pre-determined elements of the three-element node in the middle of the queue contain a pointer to the buffer, adding elements to the queue is done to a buffer forming either the head or tail end of the queue, and when the buffer being pointed to from the elements of a three-element node becomes full, it is moved to become an element in a buffer on the next lower level of hierarchy, and removing elements from the queue is done to a buffer forming either the head or tail end of the queue, and when the buffer being pointed to from the elements of a three-element node becomes empty, a full buffer, being an element of a buffer on the next lower level of hierarchy, is fetched up from the said lower level of hierarchy to replace it.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×