×

Concurrency Control Using Slotted Read-Write Locks

  • US 20100332770A1
  • Filed: 06/26/2009
  • Published: 12/30/2010
  • Est. Priority Date: 06/26/2009
  • Status: Active Grant
First Claim
Patent Images

1. A computer-readable storage medium storing program instructions executable by one or more processors to implement:

  • assigning a plurality of threads to respective slots of a data structure, wherein each one of the plurality of threads is assigned a different slot in the data structure such that at most only a single thread is assigned to any given one of the slots, wherein the data structure indicates whether any thread has a read lock for a shared memory area and whether any thread has a write lock for the shared memory area, wherein multiple threads can concurrently have the read lock but only one thread can have the write lock at any given time; and

    one of the plurality of threads attempting to acquire the read lock for the shared memory area, wherein said attempting to acquire the read lock comprises;

    performing a store operation to set the thread'"'"'s assigned slot in the data structure for the read lock; and

    performing a load operation from the data structure to determine whether any thread has the write lock for the shared memory area, wherein the thread acquires the read lock for the shared memory area if no other thread has the write lock for the shared memory area.

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