IP Library Granted Patent US 7,073,176
Granted Patent B1
US 7,073,176 · App. 09/798,617 · Granted Jul 4, 2006

Deadlock detection based on information stored in distributed objects that participate in a distributed lock management system

Assignee: Oracle International Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,073,176
App. No.
09/798,617
Granted
Jul 4, 2006
Kind
B1
Abstract

A system for managing locks that give permission to access resources in a computer system are disclosed. The lock management system is distributed and provides deadlock protection. The lock management system is distributed in that information about which locks have been granted for a resource is stored at both a master node and at the nodes on which are located processes that desire to access to the resource. A master resource object located on the master node grants locks to shadow resource objects located on the nodes on which are located the processes that desire to access the resource. Each shadow resource object grants locks on the resource to the processes that are located on the same node as the shadow resource object. Each shadow lock holds lock information that is used to detect deadlocks. The information may be used to generate bipartite directed graphs that include nodes representing resources and nodes representing transactions.

Claims (47)

1. 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; and

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; and

using lock information from said shadow resource object to detect deadlocks that involve said resource;

wherein the step of causing the shadow resource object to obtain includes the master resource object granting the second lock to the shadow resource object.

2. The method of claim 1 , where said lock information includes information about locks that have been granted by the shadow resource object for the resource.

3. The method of claim 1 , wherein the step of detecting deadlocks is based on lock information from at least one other shadow resource object.

4. 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; and

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; and

using lock information from said shadow resource object to detect deadlocks that involve said resource, wherein the step of detecting deadlocks includes generating a bipartite directed graph that includes nodes representing resources and nodes representing transactions.

5. A computer system, comprising

a plurality of nodes configured to execute a plurality of processes; and

a resource;

said computer system configured to perform the method of claim 4 .

6. A computer-readable medium carrying one or more sequences of instructions for allocating a resource in a system that includes a plurality of first processes executing on a plurality of nodes, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform 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; and

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; and

using lock information from said shadow resource object to detect deadlocks that involve said resource;

wherein the step of causing the shadow resource object to obtain includes the master resource object granting the second lock to the shadow resource object.

7. The computer-readable medium of claim 6 , wherein said lock information includes information about locks that have been granted by the shadow resource object for the resource.

8. The computer-readable medium of claim 6 , wherein the step of detecting deadlocks is based on lock information from at least one other shadow resource object.

9. A computer-readable medium carrying one or more sequences of instructions for allocating a resource in a system that includes a plurality of first processes executing on a plurality of nodes, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform 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; and

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; and

using lock information from said shadow resource object to detect deadlocks that involve said resource, wherein the step of detecting deadlocks includes generating a bipartite directed graph that includes nodes representing resources and nodes representing transactions.

10. A computer system, comprising

a plurality of nodes configured to execute a plurality of processes;

a resource;

said computer system configured to perform 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; and

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; and

using lock information from said shadow resource object to detect deadlocks that involve said resource;

wherein the step of causing the shadow resource object to obtain includes the master resource object granting the second lock to the shadow resource object.

11. The computer system of claim 10 , wherein the step of detecting deadlocks includes generating a bipartite directed graph that includes nodes representing resources and nodes representing transactions.

12. The computer system of claim 10 , wherein said lock information includes information about locks that have been granted by the shadow resource object for the resource.

13. The computer system of claim 10 , wherein the step of detecting deadlocks is based on lock information from at least one other shadow resource object.

14. A computer system, comprising

a plurality of nodes configured to execute a plurality of processes;

a resource;

means for 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; and

means for 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; and

means for using lock information from said shadow resource object to detect deadlocks that involve said resource;

wherein the means for causing the shadow resource object to obtain causes the master resource object to grant the second lock to the shadow resource object.

15. The computer system of claim 10 , wherein detecting deadlocks includes generating a bipartite directed graph that includes nodes representing resources and nodes representing transactions.

16. The computer system of claim 10 , wherein said lock information includes information about locks that have been granted by the shadow resource object for the resource.

17. The computer system of claim 10 , wherein the detecting deadlocks is based on lock information from at least one other shadow resource object.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2003
From: ORACLE CORPORATION
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 013944/0938 →
Continuity (1)
Division 0866968900 · Jun 24, 1996