×

Lock mechanism to enable atomic updates to shared memory

  • US 8,055,856 B2
  • Filed: 03/24/2008
  • Issued: 11/08/2011
  • Est. Priority Date: 03/24/2008
  • Status: Active Grant
First Claim
Patent Images

1. A method for performing atomic updates to a shared memory, the method comprising:

  • receiving a memory request for accessing an entry of the shared memory corresponding to an address;

    determining a lock address of a lock entry that stores a lock flag using the address;

    computing a lock result for the lock address that indicates whether or not a lock is acquired for the entry of the shared memory corresponding to the address;

    setting the lock flag to indicate that the entry is locked by the memory request to prevent another memory request from writing the entry of the shared memory corresponding to the address; and

    reading data stored in the entry of the shared memory corresponding to the address,wherein the steps of determining, computing, setting, and reading are performed in parallel for multiple execution threads of a program, and the execution of the threads diverges when lock results for the multiple threads indicate that at least one of the multiple threads did not acquire a lock.

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