IP Library Granted Patent US 7,814,494
Granted Patent B1
US 7,814,494 · App. 11/212,253 · Granted Oct 12, 2010

Method and system for performing reliable resource locking

Assignee: Oracle America, Inc.
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,814,494
App. No.
11/212,253
Granted
Oct 12, 2010
Kind
B1
Abstract

A method for performing reliable resource locking for a requested resource that includes determining whether the requested resource is locked, and, if the requested resource is not locked, then obtaining a lock for the requested resource, determining whether a resource entry associated with the requested resource is in a log object, wherein the log object is associated with a container performing a process requesting the requested resource, and if the resource entry is not in the log object, then adding the resource entry associated with the requested resource to the log object, and accessing the requested resource by the process.

Claims (43)

1. A method for performing reliable resource locking for a requested resource comprising:

determining, by a first process executed by a hardware processor, that the requested resource is not locked by a second process executing within a first container, wherein the first process and a third process executes within a second container;

obtaining a lock for the requested resource;

determining, by the first process after obtaining the lock and prior to releasing the lock, that a resource entry associated with the requested resource is in a log object, wherein the log object is associated with the second container, wherein the resource entry is in the log object when, while the first process has the lock, the third process has the lock and has added the resource entry to the log object without removing the resource entry;

waiting until after the resource entry associated with the requested resource is removed from the log object by the third process when the third process completes accessing the requested resource based on determining that the resource entry is in the log object; and

after the resource entry associated with the requested resource is removed from the log object:

adding, by the first process, the resource entry associated with the requested resource to the log object, and

accessing the requested resource by the first process.

2. The method of claim 1 , further comprising:

releasing the lock for the requested resource when the first process completes accessing the requested resource.

3. The method of claim 1 , further comprising removing the resource entry from the log object when the first process completes accessing the requested resource.

4. The method of claim 1 , wherein the log object is a logger object.

5. The method of claim 1 , wherein obtaining the lock for the requested resource comprises:

creating a lock file associated with the requested resource.

6. The method of claim 1 , wherein the resource entry is stored in a handler object of the log object.

7. The method of claim 6 , wherein the resource entry is stored in the header of the handler object.

8. The method of claim 1 , wherein the resource entry comprises the full path name and the file name of the requested resource.

9. The method of claim 1 , wherein the second container is a Virtual Machine.

10. The method of claim 1 , wherein the requested resource is a file.

11. A computer system for performing reliable resource locking for a requested resource comprising:

a lock for the requested resource, wherein the lock is obtained by a first process accessing the requested resource after determining that the requested resource is not locked by a second process executing within a first container, wherein the first process and a third process executes within a second container; and

a log object associated with the second container, wherein the log object is adapted to:

determine, by the first process after obtaining the lock and prior to releasing the lock, that a resource entry associated with the requested resource is in the log object, wherein the resource entry is in the log object when, while the first process has the lock, the third process has the lock and has added the resource entry to the log object without removing the resource entry;

waiting until after the resource entry associated with the requested resource is removed from the log object by the third process when the third process completes accessing the requested resource based on determining that the resource entry is in the log object; and

after the resource entry associated with the requested resource is removed from the log object:

adding, by the first process, the resource entry associated with the requested resource to the log object; and

allowing access to the requested resource by the first process.

12. The computer system of claim 11 , wherein the lock is released when the first process completes accessing the requested resource.

13. The computer system of claim 11 , wherein the resource entry is removed from the log object when the first process completes accessing the requested resource.

14. The computer system of claim 11 , wherein the log object is a logger object.

15. The computer system of claim 11 , wherein the lock is a lock file.

16. The computer system of claim 11 , wherein the resource entry is stored in a handler object of the log object.

17. The computer system of claim 16 , wherein the resource entry is stored in the header of the handler object.

18. The computer system of claim 11 , wherein the resource entry comprises the full path name and the file name of the requested resource.

19. The computer system of claim 11 , wherein the second container is a Virtual Machine.

20. A computer readable medium comprising software instructions for performing reliable resource locking, which, when executed by a processor, cause a computer system to:

determine, by a first process, that the requested resource is not locked by a second process executing within a first container, wherein the first process and a third process executes within a second container;

obtain a lock for the requested resource;

determine, by the first process after obtaining the lock and prior to releasing the lock, that a resource entry associated with the requested resource is in a log object, wherein the log object is associated with the second container, wherein the resource entry is in the log object when, while the first process has the lock, the third process has the lock and has added the resource entry to the log object without removing the resource entry;

wait until after the resource entry associated with the requested resource is removed from the log object by the third process when the third process completes accessing the requested resource based on determining that the resource entry is in the log object; and

after the resource entry associated with the requested is removed from the log object:

add, by the first process, the resource entry associated with the requested resource to the log object, and

access the requested resource by the first process.

Assignments (3)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037306/0530 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 15, 2006
From: MORE, SANDHYA; GOEL, RUCHI
To: SUN MICROSYSTEMS, INC.
Reel/Frame 017341/0984 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 26, 2005
From: MORE, SANDHYA; GOEL, RUCHI
To: SUN MICROSYSTEMS INDIA PRIVATE LIMITED
Reel/Frame 016935/0455 →