Compiling join patterns using software transactional memories
First Claim
1. A method for executing a choice join pattern that is a choice between a first join pattern branch and a second join pattern branch, the first join pattern branch performing a first set of changes on a first set of channels stored in a memory, the second join pattern branch performing a second set of changes on a second set of channels stored in the memory, the method comprising:
- (a) using a processor to designate a randomly selected one of the first join pattern branch and the second join pattern branch as a selected join pattern branch and the other of the first join pattern branch and the second join pattern branch as an unselected join pattern branch;
(b) determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch;
(c) if so, then attempting to execute a first software transactional memory code associated with the selected join pattern branch;
(d) if not, then determining whether each channel in the set of channels operated upon by the unselected join pattern branch is accessible to the unselected join pattern branch;
(e) if so, then attempting to execute a second software transactional memory code associated with the unselected join pattern branch; and
(f) if not, then returning to step (b),wherein attempting to execute the first software transactional memory code associated with the selected join pattern branch comprises;
if the first software transactional memory code is successfully executed, then committing the set of changes performed by the selected join pattern branch; and
if the first software transactional memory code is not successfully executed, then rolling back the set of changes performed by the selected join pattern branch and returning to the step of determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch.
2 Assignments
0 Petitions
Accused Products
Abstract
Join patterns may be compiled using software transactional memories (STM'"'"'s) without the use of locks or other low level constructs. In particular, any number of STM threads may each perform a corresponding change set on a corresponding channel set. Each such STM thread may perform its corresponding change set by acquiring non-exclusive access to its corresponding channel set. Once each of the STM threads has performed its corresponding change set, a comparison is made to determine whether any two or more of the change sets are inconsistent with one another. The consistent change sets may be committed to memory. The inconsistent change sets may be either committed or rolled back.
-
Citations
4 Claims
-
1. A method for executing a choice join pattern that is a choice between a first join pattern branch and a second join pattern branch, the first join pattern branch performing a first set of changes on a first set of channels stored in a memory, the second join pattern branch performing a second set of changes on a second set of channels stored in the memory, the method comprising:
-
(a) using a processor to designate a randomly selected one of the first join pattern branch and the second join pattern branch as a selected join pattern branch and the other of the first join pattern branch and the second join pattern branch as an unselected join pattern branch; (b) determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch; (c) if so, then attempting to execute a first software transactional memory code associated with the selected join pattern branch; (d) if not, then determining whether each channel in the set of channels operated upon by the unselected join pattern branch is accessible to the unselected join pattern branch; (e) if so, then attempting to execute a second software transactional memory code associated with the unselected join pattern branch; and (f) if not, then returning to step (b), wherein attempting to execute the first software transactional memory code associated with the selected join pattern branch comprises; if the first software transactional memory code is successfully executed, then committing the set of changes performed by the selected join pattern branch; and if the first software transactional memory code is not successfully executed, then rolling back the set of changes performed by the selected join pattern branch and returning to the step of determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch. - View Dependent Claims (2)
-
-
3. A computer-readable storage medium for executing a choice join pattern that is a choice between a first join pattern branch and a second join pattern branch, the first join pattern branch performing a first set of changes on a first set of channels stored in a memory, the second join pattern branch performing a second set of changes on a second set of channels stored in the memory, the computer-readable storage medium having stored thereon instructions comprising:
-
(a) using a processor to designate a randomly selected one of the first join pattern branch and the second join pattern branch as a selected join pattern branch and the other of the first join pattern branch and the second join pattern branch as an unselected join pattern branch; (b) determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch; (c) if so, the attempting to execute a first software transactional memory code associated with the selected join pattern branch; (d) if not, then determining whether each channel in the set of channels operate upon by the unselected join pattern branch is accessible to the unselected join pattern branch; (e) if so, then attempting to execute a second software transactional memory code associated with the unselected join pattern branch; and (f) if not, then returning to step (b), wherein attempting to execute the first software transactional memory code associated with the selected join pattern branch comprises; if the first software transactional memory code is successfully executed, then committing the set of changes performed by the selected join pattern branch; and if the first software transactional memory code is not successfully executed, then rolling back the set of changes performed by the selected join pattern branch and returning to the step of determining whether each channel in the set of channels operated upon by the selected join pattern branch is accessible to the selected join pattern branch. - View Dependent Claims (4)
-
Specification