Patent ID: 8407674

Claim:
A method for detecting thread starvation in a running program under test, comprising: determining whether recorded events are currently listed for a least frequently used active thread in a list of thread tracking structures; determining whether more than a predetermined percentage of recorded events took place while other threads were waiting for a synchronization object held by the least frequently used active thread, responsive to determining that recorded events are currently listed for the least frequently used active thread; and indicating detection of thread starvation while the program under test is running responsive to determining that more than the predetermined percentage of recorded events took place while other threads were waiting for the synchronization object held by the least frequently used active thread; for the remaining threads in the list of thread tracking structures, iteratively performing the steps of: identifying a next least frequently used active thread in the list of thread tracking structures; determining whether recorded events are currently listed for the next least frequently used active thread, determining whether more than a predetermined percentage of recorded events took place while other threads were waiting for the synchronization objects held by the next least frequently used active thread for which recorded events are currently listed for the next least frequently used active thread, and indicating detection of thread starvation if more than the predetermined percentage of recorded events took place while other threads were waiting for the synchronization objects held by the next least frequently used active thread; wherein a cause of the thread starvation indicated is a low-priority thread holding a lock while a high-priority thread is waiting.