×

System and method for reducing synchronization overhead in multithreaded code

  • US 6,662,364 B1
  • Filed: 11/05/1999
  • Issued: 12/09/2003
  • Est. Priority Date: 11/05/1999
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for controlling a request from a requesting thread to acquire a target mutex, said target mutex capable of specifying a first synchronization mode, a second synchronization mode, and a thread associated with said target mutex, the method comprising the steps of:

  • determining whether said target mutex is in said first synchronization mode or said second synchronization mode; and

    (a) when said target mutex is in said first synchronization mode, said method additionally comprises querying whether said requesting thread is the thread associated with said target mutex;

    wherein;

    (i) when said requesting thread is the thread associated with said target mutex, said request to acquire said target mutex is granted without using atomic machine instructions to assure that no thread is operating on said target mutex; and

    (ii) when said requesting thread is not the thread associated with said target mutex, said method additionally includes executing a verification procedure that ensures that no thread is operating on said target mutex; and

    (b) when said target mutex is in said second synchronization mode, said method additionally comprises the steps of;

    assuring, with atomic machine instructions, that no thread is operating on said target mutex; and

    granting said request to acquire said target mutex;

    wherein said thread associated with said target mutex is associated with said target mutex even when said target mutex is not held by any thread.

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