Patent ID: 7051192

Claim:
A method that predicts a result produced by a section of code in order to support speculative program execution, the section of code including a plurality of program instructions, the method comprising: executing the section of code within a program using a head thread, wherein executing the section of code produces the result; before the head thread produces the result, generating a predicted result to be used in place of the result; using a speculative thread to speculatively execute subsequent code within the program using the predicted result, wherein the subsequent code follows the section of code in an execution stream of the program; and after the head thread finishes executing the section of code, checking a read bit, wherein the read bit indicates whether a field within a data region associated with the section of code has been read by the speculative thread, and, if so advancing the current time in the time dimension of the system, and determining if a difference between the predicted result and the result generated by the head thread affected execution of the speculative thread; if the difference affected execution of the speculative thread, performing a rollback operation for the speculative thread to undo actions performed by the speculative thread; and if the difference did not affect execution of the speculative thread, performing a join operation to merge state associated with the speculative thread with state associated with the head thread.