Address level log-based synchronization of shared data
First Claim
1. A computer-implemented method, comprising:
- a given thread of a plurality of concurrently executing threads attempting to acquire a lock on a shared data object to be modified by the given thread; and
in response to the thread'"'"'s attempt to acquire the lock being unsuccessful, the given thread;
assuming the role of a slave thread;
logging at a synchronization log one or more data access operations directed to the shared data object, wherein the one or more data access operations comprise at least one write access operation, and wherein said logging comprises recording addresses and modified data values of data locations targeted for modification by the at least one write access operation;
waiting for a notification from a thread holding the lock on the shared data object, wherein the thread holding the lock on the shared data object acts as a master thread with respect to the shared data object, wherein the notification indicates whether or not the one or more data access operations logged by the given thread succeeded, wherein a notification indicating that the one or more data access operations logged by the given thread succeeded indicates that the at least one write access operation logged by the given thread was performed on a particular one of two or more versions of the shared data object by the thread holding the lock on the shared data object; and
wherein the particular one of the two or more versions of the shared data object is accessible as a writable version of the shared data object by the thread holding the lock; and
receiving the notification from the thread holding the lock on the shared data object.
2 Assignments
0 Petitions
Accused Products
Abstract
A method of address-level log-based synchronization comprises a thread attempting to acquire a lock on an object. If its lock attempt fails, a thread logs, at a synchronization log, data access operations directed at the shared data object, and waits for a notification from the lock-owning thread indicating whether the logged operations succeeded. If its lock attempt succeeds, the lock-owning thread performs data access operations on the shared data object, and arbitrates among requests logged by other threads in the synchronization log, applying the modifications logged in the requests that do not conflict with other modification operations, and rejecting the requests that conflict. The master sends a success notification to the logging threads whose requests were accepted, and a failure notification to the logging threads whose requests were rejected.
-
Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
a given thread of a plurality of concurrently executing threads attempting to acquire a lock on a shared data object to be modified by the given thread; and in response to the thread'"'"'s attempt to acquire the lock being unsuccessful, the given thread; assuming the role of a slave thread; logging at a synchronization log one or more data access operations directed to the shared data object, wherein the one or more data access operations comprise at least one write access operation, and wherein said logging comprises recording addresses and modified data values of data locations targeted for modification by the at least one write access operation; waiting for a notification from a thread holding the lock on the shared data object, wherein the thread holding the lock on the shared data object acts as a master thread with respect to the shared data object, wherein the notification indicates whether or not the one or more data access operations logged by the given thread succeeded, wherein a notification indicating that the one or more data access operations logged by the given thread succeeded indicates that the at least one write access operation logged by the given thread was performed on a particular one of two or more versions of the shared data object by the thread holding the lock on the shared data object; and
wherein the particular one of the two or more versions of the shared data object is accessible as a writable version of the shared data object by the thread holding the lock; andreceiving the notification from the thread holding the lock on the shared data object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system, comprising:
-
a processor; and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor to implement a code generator that when operating generates code executable by the processor to implement a mechanism to coordinate concurrent accesses to shared data objects by a plurality of threads, wherein according to the mechanism; a given thread of a plurality of concurrently executing threads attempts to acquire a lock on a shared data object to be modified by the given thread; in response to the thread'"'"'s attempt to acquire the lock being unsuccessful, the given thread; assumes the role of a slave thread; logs at a synchronization log one or more data access operations directed to the shared data object, wherein the one or more data access operations comprise at least one write access operation, and wherein said logging comprises recording addresses and modified data values of data locations targeted for modification by the at least one write access operation; waits for a notification from a thread holding the lock on the shared data object, wherein the thread holding the lock on the shared data object acts as a master thread with respect to the shared data object, wherein the notification indicates whether or not the one or more data access operations logged by the given thread succeeded, and wherein a notification indicating that the one or more data access operations logged by the given thread succeeded indicates that the at least one write access operation logged by the given thread was performed on a particular one of two or more versions of the shared data object by the thread holding the lock on the shared data object, and wherein the particular one of the two or more versions of the shared data object is accessible as a writable version of the shared data object by the thread holding the lock; and receives the notification from the thread holding the lock on the shared data object. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A non-transitory, computer readable storage medium storing program instructions, wherein the instructions are computer-executable to implement a mechanism to coordinate concurrent accesses to shared data objects by a plurality of threads, wherein according to the mechanism:
-
a given thread of a plurality of concurrently executing threads attempts to acquire a lock on a shared data object to be modified by the given thread; in response to the thread'"'"'s attempt to acquire the lock being unsuccessful, the given thread; assumes the role of a slave thread; logs at a synchronization log one or more data access operations directed to the shared data object, wherein the one or more data access operations comprise at least one write access operation, and wherein said logging comprises recording addresses and modified data values of data locations targeted for modification by the at least one write access operation; waits for a notification from a thread holding the lock on the shared data object, wherein the thread holding the lock on the shared data object acts as a master thread with respect to the shared data object, wherein the notification indicates whether or not the one or more data access operations logged by the given thread succeeded, and wherein a notification indicating that the one or more data access operations logged by the given thread succeeded indicates that the at least one write access operation logged by the given thread was performed on a particular one of two or more versions of the shared data object by the thread holding the lock on the shared data object, and wherein the particular one of the two or more versions of the shared data object is accessible as a writable version of the shared data object by the thread holding the lock; and receives the notification from the thread holding the lock on the shared data object. - View Dependent Claims (17, 18, 19, 20)
-
Specification