System and method for reducing synchronization overhead in multithreaded code
AssigneeHewlett-Packard Company
InventorsMichael Burrows, Mark Thierry Vandervoorde, Sanjay Ghemawat
Life of this patent
Estimating the term…
Loading patent…
AssigneeHewlett-Packard Company
InventorsMichael Burrows, Mark Thierry Vandervoorde, Sanjay Ghemawat
Estimating the term…
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.
A method for controlling a request from a requesting thread to acquire a target mutex, said target mutex capable of specifying a first synchronization mode, a second synchronization mode, and a thread associated with said target mutex, the method comprising the steps of:
A computer program product for use in conjunction with a computer system, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising:
A computer system for controlling acquisition of a target mutex that is capable of specifying a first synchronization mode, a second synchronization mode, and a thread associated with said target mutex, the computer system comprising:
A method for controlling a request from a requesting thread to acquire a target mutex capable of specifying a thread associated with said target mutex, the method comprising the step of querying, without use of atomic machine instructions, whether said requesting thread is the thread associated with said target mutex, wherein:
A computer program product for use in conjunction with a computer system, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising a mutex control procedure for controlling a request from a requesting thread to acquire a target mutex capable of specifying a thread associated with said target mutex, the mutex control procedure including instructions for:
A computer system for controlling acquisition of a target mutex capable of specifying a thread associated with said target mutex, the computer system comprising:
A computer system, comprising:
Dependencies are inferred from the claim text.