Patent ID: 7493400

Claim:
A method for mastering resources within a system that includes a plurality of nodes, the method comprising: using an affinity-independent assignment mechanism to determine which nodes, of said plurality of nodes, master resources that belong to a first set of resources; wherein resources within said first set of resources belong to objects for which no affinity relationship has been established; using an affinity-based assignment mechanism to determine which nodes, of said plurality of nodes, master resources that belong to a second set of resources; wherein resources within the second set of resources belong to objects for which an affinity relationship has been established; wherein an affinity relationship has been established between a particular object and a particular node based on a set of factors; wherein the set of factors includes at least one of: how many locks the particular node has opened on the particular object relative to how many locks other nodes have opened on the particular object; a comparison between a first cost of executing a particular command without establishing the affinity relationship, and a second cost of executing said particular command after establishing the affinity relationship; the type of the operation specified in a command that accesses the object; knowledge, about the object, known by the system; user-specified affinity information; and existence of a relationship between the particular object and another object that is in an affinity relationship with the particular node; wherein the method is executed by a computer system.