×

Spin-yielding in multi-threaded systems

  • US 7,234,143 B2
  • Filed: 06/20/2002
  • Issued: 06/19/2007
  • Est. Priority Date: 06/20/2002
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for use in a multi-threaded system, comprising the steps of:

  • dedicating a processor identified as a spin-yield processor to run a thread while the thread is waiting for a lock acquired by another thread;

    a first thread acquiring a first lock to run a program portion on a first processor, wherein running the program portion requires the first lock; and

    a second thread, while waiting to acquire the first lock based on a relationship between a context switching threshold and a number of context switches experienced by the second thread within a first defined time period, performs the steps of;

    running on the spin-yield processor;

    trying to acquire the first lock, wherein the second thread acquires the first lock if the first thread yields the first processor; and

    if the second thread does not acquire the first lock, then the second thread repeats the steps of running and trying;

    wherein the second thread, before running on the spin-yield processor the first time, performs the steps of;

    running on the first processor; and

    trying to acquire the first lock;

    if the second thread does not acquire the first lock, then the second thread repeats the steps of running on the first processor and trying to acquire the first lock.

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