发明名称 Read Concurrency using Hardware Transactional Lock Elision
摘要 Threads using hardware transactions and executing instrumented critical sections that do not perform any writes may complete as long as the thread holding the lock has not yet executed its first write operation. If the thread executing the instrumented critical section performs any writes, or if the thread holding the lock performs any writes during its critical section, the hardware transaction may be aborted. A write flag may be used to determine whether the thread holding the lock performs any writes. The thread holding the lock may set the flag before performing any write operation. The thread executing the hardware transaction may subscribe to that flag and abort the transaction if the flag is set to true, indicating that the thread holding the lock performed a write operation.
申请公布号 US2016246527(A1) 申请公布日期 2016.08.25
申请号 US201615050396 申请日期 2016.02.22
申请人 Oracle International Corporation 发明人 Kogan Alex;Lev Yosef
分类号 G06F3/06;G06F9/46 主分类号 G06F3/06
代理机构 代理人
主权项 1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform: acquiring, by a first thread of a multi-threaded application, a lock associated with a portion of shared memory accessible by threads of the multi-threaded application, wherein while the lock is acquired by the first thread, the lock is unavailable to one or more other threads of the multi-threaded application; in response to determining, by another thread of the one or more other threads of the multi-threaded application, that the lock is to be elided and is unavailable: executing, by the other thread, an instrumented version of a critical section of code using a hardware transaction;wherein write operations, but not read operations, of the instrumented version of the critical section are instrumented to detect data conflicts when accessing the portion of shared memory; andwherein the multi-threaded application includes both the instrumented version and an unmodified version of the critical section.
地址 Redwood City CA US