×

MANAGING LOCK AND UNLOCK OPERATIONS USING ACTIVE SPINNING

  • US 20180293113A1
  • Filed: 05/31/2017
  • Published: 10/11/2018
  • Est. Priority Date: 04/05/2017
  • Status: Active Grant
First Claim
Patent Images

1. A method for managing instructions on a processor comprising a plurality of processor cores, the method comprising:

  • executing a plurality of threads on the processor cores, each thread having access to a stored library of operations including at least one lock operation and at least one unlock operation; and

    managing instructions that are issued on a first processor core of the plurality of processor cores, for a first thread executing on the first processor core, the managing including;

    for each instruction included in the first thread and identified as being associated with a lock operation corresponding to a particular lock, determining if the particular lock has already been acquired for another thread executing on a processor core other than the first processor core, and if the particular lock has already been acquired, continuing to perform the lock operation for a plurality of attempts using a hardware lock operation different from the lock operation in the stored library, and if the particular lock has not already been acquired, acquiring the particular lock for the first thread, wherein the hardware lock operation performs a modified atomic operation that changes a result of the hardware lock operation for failed attempts to acquire the particular lock relative to a result of the lock operation in the stored library, andfor each instruction included in the first thread and identified as being associated with an unlock operation corresponding to a particular lock, releasing the particular lock from the first thread.

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