Patent ID: 6708198
Filing Date: 2004-03-16
Classification: G06F,Y10S

Abstract:
A method for allocating a resource in a system that includes a plurality of processes executing on a plurality of nodes, the method comprising the steps of:causing a process to obtain, prior to accessing the resource in a particular way, a first lock that grants permission for the process to access the resource in the particular way, wherein the process requests the first lock from a shadow resource object located on the same node as the process; causing the shadow resource object to obtain, prior to granting the first lock to the process, a second lock that grants permission for the shadow resource object to grant locks that grant permission for processes to access the resource in the particular way, wherein the shadow resource object requests the second lock from a master resource object stored on a different node than said shadow resource object; causing the process to transmit a first message to the shadow resource object to request the first lock if the process does not currently hold a lock that permits the process to access the resource in the particular way; causing the shadow resource object to transmit a second message to the master resource object to request the second lock if the shadow resource object does not currently hold a lock that permits the shadow resource object to grant the first lock to the process; in response to said master resource object receiving said second message, causing said master resource object to determine whether any lock currently granted by said master resource object or previously received lock request prevents said master resource object from granting said second lock to said shadow resource object; if any locks currently granted by said master resource object prevent said master resource object from granting said second lock to said shadow resource object, then causing said master resource object to perform the steps of: determining owners of the locks currently granted by said master resource object that prevent said master resource object from granting said second lock; and transmitting to said owners a third message that informs said owners that a lock that has been requested is blocked by a lock owned by said owners; one of said owners transmitting a fourth message to said master resource object to downgrade the lock on the resource held by said owner; in response to receiving said fourth message, said master resource object performing the steps of: downgrading the lock on the resource held by said owner; determining whether all of the locks currently granted by said master resource object that prevent said master resource object from granting said second lock have been downgraded; if all of the locks currently granted by said master resource object that prevent said master resource object from granting said second lock have been downgraded, then granting lock requests including said request for said second lock; and transmitting to said shadow resource object a fifth message to inform said shadow resource object that said request for the second lock has been granted; wherein said master resource object includes a convert queue; placing a first lock request corresponding to said request for said second lock on said convert queue; wherein said steps of determining owners and transmitting to said owners are performed when said first lock request is at a head of said convert queue; wherein the step of granting lock requests includes granting other lock requests on said convert queue other than said first lock request; wherein the convert queue includes a second lock request and a third lock request; wherein said second lock request is closer to said head of said convert queue than the third lock request; wherein the step of granting lock requests includes granting said third lock request without granting said second lock request; and wherein the step of granting said third lock request is performed while said second lock request remains in said convert queue.