×

Highly scalable tree-based trylock

  • US 9,396,226 B2
  • Filed: 06/24/2013
  • Issued: 07/19/2016
  • Est. Priority Date: 06/24/2013
  • Status: Active Grant
First Claim
Patent Images

1. A multiprocessor system, comprising:

  • two or more processors;

    a memory coupled to said processors, said memory including a computer useable medium tangibly embodying at least one program of instructions executable by said processors to perform tree-based trylock operations that reduce contention on a root trylock, said operations comprising;

    providing a lock hierarchy which plural trylocks are distributed among nodes of a tree-based node structure having a plurality of leaf nodes, one or more internal nodes, and a root node;

    assigning said processors to said leaf nodes in a distributed and balanced manner in order to minimize memory contention on said trylocks;

    implementing a trylock acquisition operation on a selected one of said processors for acquiring a root trylock associated with said root node;

    said trylock acquisition operation including attempting to acquire one of said trylocks at each node of said node structure that lies on a traversal path beginning at one of said leaf nodes, passing through one or more of said internal nodes, and ending at said root node;

    said trylock acquisition operation succeeding if each trylock on said traversal path is acquired, and failing if any trylock on said traversal path cannot be acquired; and

    performing a trylock housekeeping operation that releases all non-root trylocks visited by said trylock acquisition operation, such that if said trylock acquisition operation succeeds, only said root trylock will be remain acquired at the end of said operation, and if said trylock acquisition operation fails, none of said trylocks will be remain acquired at the end of said operation.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×