Patent ID: 7168076

Claim:
A computer implemented method that facilitates efficient join operations between a head thread and a speculative thread in a system that supports speculative program execution, wherein the head thread operates on primary versions of memory elements and accesses a primary version of a stack and the speculative thread operates on space-time dimensioned versions of the memory elements and accesses a speculative version of the stack, the method comprising: executing a primary version of a program using the head thread; executing a speculative version of the program using the speculative thread; and performing a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing, wherein performing the join operation involves, merging the space-time dimensioned versions of the memory elements into the primary versions of the memory elements so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements, and merging the speculative version of the stack into the primary version of the stack; wherein performing the join operation involves causing the speculative thread to act as a new head thread by performing a switching operation to switch from executing the speculative version of the program to executing the primary version of the program; wherein performing the switching operation involves performing a lookup to determine where the new head thread is to commence executing the primary version of the program based upon where the speculative thread is currently executing within the speculative version of the program; and wherein if the speculative thread performs a write operation to a memory element, the method further comprises: determining if the space-time dimensioned version of the memory element exists, if the space-time dimensioned version of the memory element does not exist, creating the space-time dimensioned version of the memory element, and performing the write operation to the space-time dimensioned version of the memory element.