×

READER/WRITER LOCK WITH REDUCED CACHE CONTENTION

  • US 20100275209A1
  • Filed: 04/28/2009
  • Published: 10/28/2010
  • Est. Priority Date: 04/28/2009
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for acquiring a read lock in a multiple processor system, the method comprising:

  • receiving a request to acquire a read lock;

    inspecting a queue of waiting reader and writer nodes to identify a current queue tail, wherein a node at the head of the queue represents one or more threads that currently hold the lock and wherein new requests to acquire the lock are added at the current queue tail;

    upon determining that the current queue tail is a reader node, incrementing a reader count by performing the following;

    determining a distribution index associated with a current thread;

    incrementing an indexed reader count based on the determined distribution index; and

    waiting for the reader node to become the head of the queue, and in response to the reader node becoming the head of the queue responding to the request indicating the lock is acquired,wherein the preceding steps are performed by at least one processor.

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