Automatic lock removal method for scalable synchronization in dynamic data structures

US10078653B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10078653-B2
Application numberUS-201514741247-A
CountryUS
Kind codeB2
Filing dateJun 16, 2015
Priority dateJun 16, 2015
Publication dateSep 18, 2018
Grant dateSep 18, 2018

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

In one embodiment, a set of lock and unlock instructions in a read phase of a computer-readable program is replaced with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions. A second set of tracking instructions is inserted into the read phase of the computer-readable program, wherein the second set of tracking instructions track a set of read objects indicating versions of objects that are read. Validation instructions are inserted into the computer-readable program, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read and lock the set of locked objects that would have been locked upon completing execution of the set of lock and unlock instructions. Update instructions are added to an update phase of the computer-readable program, where the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: replacing, by a processor, a set of lock and unlock instructions in a read phase of source code with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions; inserting, by a processor, a second set of tracking instructions into the read phase of the source code, wherein the second set of tracking instructions track a set of read objects indicating versions of objects that are read; inserting, by a processor, validation instructions into the source code, wherein the validation instructions lock objects in the set of locked objects and validate that the versions of objects in the set of read objects have not changed since they were last read; and adding, by a processor, update instructions to an update phase of the source code, wherein the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released. 2. The method as recited in claim 1 , wherein replacing the set of lock and unlock instructions comprises: for each lock instruction in the read phase of the source code, inserting an instruction that adds the object to the set of locked objects; and for each unlock instruction in the read phase of the source code, inserting an instruction that removes the object from the set of locked objects. 3. The method as recited in claim 1 , wherein validating that the versions of objects in the set of read objects have not changed since they were last read comprises determining, for each object in the read set, whether the current version of the object is identical to the version of the object in the read set. 4. The method as recited in claim 1 , wherein the validation instructions restart execution of an operation of the source code at a beginning of the read phase upon failure of the validation. 5. The method as recited in claim 4 , wherein the validation instructions limit the number of times execution of the operation is restarted such that an unmodified version of the operation is executed upon determining that the number of times execution has been restarted has reached a particular threshold. 6. The method as recited in claim 1 , wherein the validation instructions determine, for each object in the set of read objects, whether another thread has locked the object. 7. The method as recited in claim 1 , further comprising: cloning the source code such that an unmodified version of the source code is maintained, wherein cloning the source code is performed prior to replacing the set of lock and unlock instructions with the first set of tracking instructions, inserting the second set of tracking instructions, inserting the validation instructions, and adding the update instructions. 8. A non-transitory computer-readable storage medium storing thereon computer-readable instructions, comprising: instructions for removing a set of lock and unlock instructions from a read phase of source code; instructions for inserting tracking instructions into the read phase of the source code, wherein the tracking instructions track a set of read objects indicating versions of objects that are read; instructions for inserting validation instructions into the source code, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read; and instructions for adding update instructions to an update phase of the source code, wherein the update instructions increment a version of an object each time a value of the object is updated or a lock of the object is released. 9. The non-transitory computer-readable storage medium as recited in claim 8 , wherein the validation instructions are inserted into the source code such that the validation instructions are executed after the read phase of the source code. 10. The non-transitory computer-readable storage medium as recited in claim 8 , wherein upon failure of the validation, execution of an operation of the source code is restarted. 11. The non-transitory computer-readable storage medium as recited in claim 10 , wherein the validation instructions limit the number of times execution of the operation is restarted such that an unmodified version of the operation of the source code is executed upon determining that the number of times execution has been restarted has reached a particular threshold. 12. The non-transitory computer-readable storage medium as recited in claim 8 , wherein the tracking instructions further maintain a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions; wherein the validation instructions lock objects identified in the set of locked objects after execution of the tracking instructions. 13. The non-transitory computer-readable storage medium as recited in claim 8 , wherein the validation instructions determine, for each object in the set of read objects, whether another thread has locked the object. 14. The non-transitory computer-readable storage medium as recited in claim 8 , further comprising; inserting switching instructions into the source code, wherein the switching instructions switch execution to a pessimistic lock-based version of the source code upon detection of a failure during execution of the source code. 15. An apparatus, comprising: a processor; and a memory, at least one of the processor or the memory being configured to: remove a set of lock and unlock instructions from a read phase of source code; insert tracking instructions into the read phase of the source code, wherein the tracking instructions track a set of read objects indicating versions of objects that are read; insert validation instructions into the source code, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read; and add update instructions to an update phase of the source code, wherein the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released. 16. The apparatus as recited in claim 15 , wherein the tracking instructions further track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions; wherein the validation instructions lock objects remaining in the set of locked objects. 17. The apparatus as recited in claim 15 , wherein the validation instructions are further configured to determine whether another thread has locked any objects in the set of read objects. 18. The apparatus as recited in claim 15 , wherein the validation instructions determine whether the version of any objects in the set of read objects have changed since they were last read by ascertaining, for each object in the read set, whether the current version of the object is identical to the version of the object in the read set. 19. The apparatus as recited in claim 15 , wherein the validation instructions restart execution of an operation of the source code at a beginning of the read phase upon failure of the validation. 20. The apparatus as recited in claim 19 , wherein the validation instructions limit the number of times execution of the operation is restarted such that an unmodified version of the operation is executed upon determining t

Assignees

Inventors

Classifications

  • G06F8/71Primary

    Version control (security arrangements therefor G06F21/57); Configuration management · CPC title

  • Physics · mapped topic

  • Physics · mapped topic

  • Ensuring data consistency and integrity · CPC title

  • Locking methods, e.g. distributed locking or locking implementation details · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10078653B2 cover?
In one embodiment, a set of lock and unlock instructions in a read phase of a computer-readable program is replaced with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions. A second set of tracking instructions is inserted into the …
Who is the assignee on this patent?
Yahoo Inc, Oath Inc
What technology area does this patent fall under?
Primary CPC classification G06F8/71. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Sep 18 2018 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).