Patent attributes
A system and method that detects that a group of threads has executed a spin-inducing branch in a single-instruction multithreaded processor and scheduling groups of threads based on the detection, marking the group as backed-off and deprioritizing the group for scheduling. When the group is scheduled a back-off counter is initialized and decremented each clock cycle. The group of threads is prevented from being scheduled if the spin-inducing branch is executed again before the counter reaches zero. A hardware system and method for labeling spin-inducing branches that determines that a profiled thread is in a spinning state and detects that a backward branch is executed while spinning. The detection is based on executions of a loop where the operand values for the exit condition don't change. A confidence level can be used that increases with each execution of a backward branch while in the spinning state.