×

Techniques for accessing a shared resource using an improved synchronization mechanism

  • US 7,644,409 B2
  • Filed: 06/04/2004
  • Issued: 01/05/2010
  • Est. Priority Date: 06/04/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method for accessing a shared resource of a computerized system, the method comprising:

  • running a first portion of a first thread within the computerized system, the first portion (i) requesting a lock on the shared resource and (ii) directing the computerized system to make operations of a second thread visible in a correct order, the correct order preventing an exclusion failure, the first portion of the thread representing at least instructions that perform the steps of requesting and directing;

    making operations of the second thread visible in the correct order in response to the first portion of the first thread running within the computerized system, the second thread visible to at least one other processor; and

    running a second portion of the first thread within the computerized system to determine whether the first thread has obtained the lock on the shared resource, the second portion of the thread representing at least one instruction that performs the step of determining whether the first thread has obtained the lock on the shared resource;

    wherein running the first portion of the first thread includes;

    performing a store operation which stores a lock request value in a memory variable which is accessible by both the first and second threads;

    performing a memory barrier operation which guarantees execution of the store operation before a next operation; and

    performing, as the next operation, a system call which directs the computerized system to make operations of the second thread visible in the correct order;

    wherein performing the system call includes;

    executing operating system code to change protection of a page of memory of the computerized system.

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