Detecting race conditions with a software transactional memory system
AssigneeMicrosoft Corporation
InventorsDavid L. Detlefs, Michael M. Magruder, Yosseff Levanoni
Life of this patent
Estimating the term…
Abstract
A dynamic race detection system is provided that detects race conditions in code that executes concurrently in a computer system. The dynamic race detection system uses a modified software transactional memory (STM) system to detect race conditions. A compiler converts portions of the code that are not configured to operate with the STM system into pseudo STM code that operates with the STM system. The dynamic race detection system detects race conditions in response to either a pseudo STM transaction in the pseudo STM code failing to validate when executed or an actual STM transaction failing to validate when executed because of conflict with a concurrent pseudo STM transaction.
Claims12
A method of compiling code, the method comprising:
- identifying a first portion of the code that does not include a software transactional memory (STM) designator;
- converting the first portion of the code into a first pseudo STM transaction including a sequence of instructions configured to execute atomically with an STM system;
- ensuring that the first portion of the code does not include a synchronization operation;
- and
- configuring the first pseudo STM transaction prior to a synchronization operation so that the first pseudo STM transaction commits before the synchronization operation starts.
A method of compiling code, the method comprising:
- identifying a non-transaction portion of the code that does not include a software transactional memory (STM) designator;
- dividing the non-transaction portion of the code into a plurality of pseudo STM transactions that each includes a sequence of instructions configured to execute atomically with an STM system;
- ensuring that each of the plurality of pseudo STM transactions does not include a synchronization operation;
- and
- configuring the plurality of pseudo STM transactions prior to synchronization operations so that the plurality of pseudo STM transactions commit before the synchronization operations start.
Dependencies are inferred from the claim text.