×

Non-blocking concurrent queues with direct node access by threads

  • US 20030196010A1
  • Filed: 05/05/2003
  • Published: 10/16/2003
  • Est. Priority Date: 09/09/1998
  • Status: Active Grant
First Claim
Patent Images

1. A method for one thread in a system capable of running plural threads to enqueue a new node onto a selected FIFO queue, said system capable of supporting plural FIFO queues, each queue comprising a succession of enqueued nodes and having a head pointer pointing to a head node of said succession of nodes and a tail pointer pointing to a tail node of said succession of nodes, each of said nodes having a next pointer, the next pointer of each of said enqueued nodes pointing to the next node in said succession from said head node to said tail node, said method comprising:

  • obtaining a queue-specific number unique to said selected queue relative to said plural queues;

    setting the next pointer of said new node to the queue-specific number of said selected queue;

    determining whether another one of said threads has preempted said one thread in said selected queue and, if so, updating said tail pointer of said selected queue if needed and then re-starting said method;

    otherwise, setting said next pointer of said tail node of said selected queue to point to said new node; and

    setting said tail pointer of said selected queue to point to said new node if it has not been updated by another thread during the performance of said method.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×