System and method for optimizing a code section by forcing a code section to be executed atomically
Abstract
Systems and methods for optimizing code may use transactional memory to optimize one code section by forcing another code section to execute atomically. Application source code may be analyzed to identify instructions in one code section that only need to be executed if there exists the possibility that another code section (e.g., a critical section) could be partially executed or that its results could be affected by interference. In response to identifying such instructions, alternate code may be generated that forces the critical section to be executed as an atomic transaction, e.g., using best-effort hardware transactional memory. This alternate code may replace the original code or may be included in an alternate execution path that can be conditionally selected for execution at runtime. The alternate code may elide the identified instructions (which are rendered unnecessary by the transaction) by removing them, or by including them in the alternate execution path.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 19 · Forward citations: 18.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method, comprising: performing by a computer: beginning execution of an application that comprises two alternative execution paths for performing a sequence of operations, wherein the sequence of operations comprises one or more operations that access a shared resource; and a thread of the application selecting, at runtime, a given one of the two execution paths; wherein one of the two execution paths comprises one or more operations that facilitate detecting that a result of the sequence of operations has been affected by interference from another executing thread, recovering from interfere
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 18 total)
References Cited — Backward Prior Art (19)
Non-Patent Literature (5)
- Dice et al., "Early Experience with a Commercial Hardware Transactional Memory Implementation," Sun, ASPLOS'09, Mar. 7-11, 2009, Washington, DC, USA. AC M 978-1-60558-406-5/09/03.
- Early Experience with a Commercial Hardware Transactional Memory Implementation. Dave Dice, Yossi Lev, Mark Moir and Dan Nussbaum. ASPLOS, 2009, 12 pages.
- M. M. Waliullah, "Schemes to Improve the Efficiency of Hardware Transactional Memory Systems," Division of Computer Engineering Department of Computer Science and Engineering Chalmers University of Technology Göteborg, Sweden 2007.
- Michael et al., "Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms," ACM Symposium on Principles of Distributed Computing, 1996, 9 pages.
- Moir et al., "The Adaptive Transactional Memory Test Platform: A Tool for Experimenting with Transactional Code for Rock," Sun 2007.