×

Facilitating biased synchronization in an object-based system

  • US 7,519,967 B1
  • Filed: 06/17/2005
  • Issued: 04/14/2009
  • Est. Priority Date: 06/17/2005
  • Status: Active Grant
First Claim
Patent Images

1. A method for facilitating biased locking of objects within an object-based computing system, comprising:

  • encountering a lock-acquisition operation while executing a current thread, wherein the lock-acquisition operation attempts to acquire a lock for an object;

    in response to the lock-acquisition operation, examining synchronization information associated with the object, wherein the process of examining the synchronization information does not involve atomic operations;

    if the synchronization information indicates that the lock is biasable and that the lock is biased toward the current thread, allowing the current thread to acquire the lock without updating the synchronization information; and

    if the synchronization information indicates that the lock is biasable and that the lock is biased toward another thread revoking the bias toward the other thread by;

    stopping all threads in the object-based computing system at a safe point;

    determining whether the lock is held by the other thread;

    if not, resetting the synchronization information to indicate that the lock is biasable but unbiased whereby the lock can be subsequently rebiased; and

    if the lock is held, resetting the synchronization information to indicate that the lock is not biasable, and falling back to an underlying synchronization technique to acquire the lock, and also updating the synchronization information to reflect the locking state of the object in the underlying synchronization technique;

    wherein acquiring the lock for the object without atomic operations reduces the number of hardware operations the current thread needs to execute on the object-based computing system to acquire the lock.

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