×

Methods for single-owner multi-consumer work queues for repeatable tasks

  • US 8,266,394 B2
  • Filed: 07/14/2008
  • Issued: 09/11/2012
  • Est. Priority Date: 07/14/2008
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method, comprising:

  • permitting a single owner thread of a single owner, multi-consumer, work queue to access the work queue using atomic instructions limited to only a single access and using non-atomic operations;

    restricting the single owner thread from accessing the work queue using atomic instructions involving more than one access; and

    synchronizing amongst other threads with respect to their respective accesses to the work queue,wherein operations performed by the single owner thread comprise an insertion operation that involves atomically reading at least two integer values from a single shared variable having at least two integer components respectively relating to a head of the work queue and a number of items in the work queue into a first and a second local variable respectively, writing an item into a work queue entry having an index based on a sum of the first and the second local variables, and atomically writing at least two values to the single shared variable, the at least two values respectively comprising the first local variable and a sum of the second local variable plus one.

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