Patent ID: 7860847
Filing Date: 2010-12-28
Classification: G06F

Abstract:
1. A method for handling exceptions in sequential statements being executed speculatively in parallel comprising the steps of: providing a transactional memory system for managing a plurality of transactions, wherein the transactional memory system is a mechanism for controlling access to shared memory in concurrent computing; interacting with a sequential program that has a plurality of statements that are ordered in an original sequential order; creating a plurality of separate ordered transactions to execute the plurality of statements; executing at least a portion of the plurality of separate transactions speculatively in parallel; and providing a contention manager that ensures that any exceptions that are thrown from one or more speculatively executed blocks while the plurality of separate transactions execute are handled in the original sequential order, wherein the contention manager ensures that if any statement of the plurality of statements in a first transaction of the plurality of separate transactions finishes successfully and any statement of the plurality of statements in a second transaction of the plurality of separate transactions has an exception thrown from a particular speculatively executed block, that the first transaction is committed, and that the second transaction is committed and the exception is raised for the second transaction, wherein the contention manager ensures that if any statement of the plurality of statements in the first transaction in the plurality of separate transactions has an exception thrown from a particular speculatively executed block, that the first transaction is committed and the exception is raised for the first transaction, and that any additional transactions of the plurality of separate transactions are rolled back.