发明授权
US07930695B2 Method and apparatus for synchronizing threads on a processor that supports transactional memory
有权
用于在支持事务性存储器的处理器上同步线程的方法和装置
- 专利标题: Method and apparatus for synchronizing threads on a processor that supports transactional memory
- 专利标题(中): 用于在支持事务性存储器的处理器上同步线程的方法和装置
-
申请号: US11418652申请日: 2006-05-05
-
公开(公告)号: US07930695B2公开(公告)日: 2011-04-19
- 发明人: Shailender Chaudhry , Marc Tremblay , Paul Caprioli
- 申请人: Shailender Chaudhry , Marc Tremblay , Paul Caprioli
- 申请人地址: US CA Redwood Shores
- 专利权人: Oracle America, Inc.
- 当前专利权人: Oracle America, Inc.
- 当前专利权人地址: US CA Redwood Shores
- 代理机构: Park, Vaughan, Fleming & Dowler LLP
- 主分类号: G06F9/46
- IPC分类号: G06F9/46
摘要:
One embodiment of the present invention provides a system that synchronizes threads on a multi-threaded processor. The system starts by executing instructions from a multi-threaded program using a first thread and a second thread. When the first thread reaches a predetermined location in the multi-threaded program, the first thread executes a Start-Transactional-Execution (STE) instruction to commence transactional execution, wherein the STE instruction specifies a location to branch to if transactional execution fails. During the subsequent transactional execution, the first thread accesses a mailbox location in memory (which is also accessible by the second thread) and then executes instructions that cause the first thread to wait. When the second thread reaches a second predetermined location in the multi-threaded program, the second thread signals the first thread by accessing the mailbox location, which causes the transactional execution of the first thread to fail, thereby causing the first thread to resume non-transactional execution from the location specified in the STE instruction. In this way, the second thread can signal to the first thread without the first thread having to poll a shared variable.
公开/授权文献
信息查询