×

MANAGING A LOCK TO A RESOURCE SHARED AMONG A PLURALITY OF PROCESSORS

  • US 20140108728A1
  • Filed: 10/12/2012
  • Published: 04/17/2014
  • Est. Priority Date: 10/12/2012
  • Status: Active Grant
First Claim
Patent Images

1. A computer program product for managing a lock for a shared resource accessed by a plurality of processors in communication with a memory, wherein the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that executes to cause operations operations, the operations comprising:

  • maintaining slots in the memory to implement the lock on the shared resource, wherein the slots correspond to counter values that are consecutively numbered and indicate one of busy and free;

    fetching, by a requesting processor comprising one of the processors requesting the lock for the shared resource, a counter value comprising a fetched counter value;

    determining whether the slot corresponding to the fetched counter value indicates free;

    inserting a processor identifier of the requesting processor into the slot corresponding to the fetched counter value in response to determining that the slot corresponding to the fetched counter value indicates not free; and

    accessing, by the requesting processor, the shared resource in response to determining that the slot corresponding to the fetched counter value indicates free.

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