×

Scalable thread locking with customizable spinning

  • US 8,683,470 B2
  • Filed: 11/24/2009
  • Issued: 03/25/2014
  • Est. Priority Date: 11/24/2009
  • Status: Active Grant
First Claim
Patent Images

1. At a computer system including at least one processor and system memory, a computer-implemented method for dynamically controlling the number of spins for a selected processing thread among a plurality of processing threads, the method comprising:

  • an act of tracking both the number of waiting processing threads and each thread'"'"'s turn, wherein a selected thread'"'"'s turn comprises the total number of waiting processing threads after the selected thread'"'"'s arrival at the at least one processor;

    an act of determining, based the selected thread'"'"'s turn, the number of spins that are to occur before the selected thread checks for an available thread lock;

    based on the selected thread'"'"'s turn, an act of changing the number of spins for the selected thread, such that the number of spins for the selected thread is changed as a function of the number of waiting processing threads and processors in the computer system; and

    wherein if the selected thread'"'"'s turn is greater than the number of processors in the computer system, the selected thread yields directly and does not spin.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×