发明名称 System and method for reducing synchronization overhead in multithreaded code
摘要 A system and method for implementing mutual exclusion locks (mutexes) is provided. Mutexes of the present invention designate whether they are to be synchronized using fast nonatomic load/store sequences or, alternatively, expensive atomic hardware instructions. When a requesting thread requests a target mutex, the target mutex is synchronized using the method designated by the target mutex. In some embodiments, the designated synchronization method may be changed to the atomic method when the requesting thread is not the thread associated with the target mutex. In other embodiments, the designated synchronization method may be determined by a heuristic function. For example, the synchronization method may be changed to the atomic method when a mutex request counter, which penalizes thread changes, underflows. Other possible heuristic functions may consider factors such as whether the recursion overflow bit of the target mutex has been set, the percentage of mutexes, created by a predetermined call state, that have been converted to the atomic method, and/or the overall percentage of mutexes in the system that have been converted to the atomic method.
申请公布号 US6662364(B1) 申请公布日期 2003.12.09
申请号 US19990434831 申请日期 1999.11.05
申请人 HEWLETT-PACKARD COMPANY, L.P. 发明人 BURROWS MICHAEL;VANDERVOORDE MARK THIERRY;GHEMAWAT SANJAY
分类号 G06F9/00;G06F9/46;(IPC1-7):G06F9/00 主分类号 G06F9/00
代理机构 代理人
主权项
地址