IP Library Granted Patent US 7,886,113
Granted Patent B2
US 7,886,113 · App. 11/591,196 · Granted Feb 8, 2011

Method and system for managing access to a data element in a multithreaded environment

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,886,113
App. No.
11/591,196
Granted
Feb 8, 2011
Kind
B2
Abstract

A method for managing access to a data element involves storing a first copy of the data element in a cache location, obtaining a request to modify the data element, where the request to modify the data element is associated with a first execution thread, marking the cache location as dirty based on the request to modify the data element, modifying the cache location according to the request to modify the data element once the cache location is marked as dirty, obtaining a request to read the data element while the cache location is marked as dirty, where the request to read the data element is associated with a second execution thread, providing a second copy of the data element in response to the request to read the data element based on the cache location being marked as dirty, and marking the cache location as clean after modifying the cache location is complete.

Claims (68)

1. A method for managing access to a data element, comprising:

storing a first copy of the data element in a first cache location;

obtaining a first request to modify the data element, wherein the first request to modify the data element is associated with a first execution thread;

marking the first cache location as dirty based on the first request to modify the data element;

modifying the first cache location according to the first request to modify the data element once the first cache location is marked as dirty;

obtaining a first request to read the data element, wherein the first request to read the data element is associated with a second execution thread, and wherein the first request to read the data element is obtained after the modifying begins and before the modifying is complete;

determining, in response to obtaining the first request to read the data element, that the first cache location is marked dirty;

creating, in response to the determination that the first cache location is marked dirty, a second copy of the data element;

storing the second copy of the data element in a second cache location;

providing, to the second execution thread, read access to the second cache location;

obtaining a second request to modify the data element while the first cache location is marked as dirty;

queuing the second request to modify the data element until modifying the first cache location according to the first request to modify the data element is complete;

modifying the first cache location according to the second request to modify the data element once modifying the first cache location according to the first request to modify the data element is complete; and

marking the first cache location as clean after modifying the first cache location is complete.

2. The method of claim 1 , further comprising:

obtaining a second request to modify the data element while the first cache location is marked as clean; and

providing the first copy of the data element in response to the second request to read the data element based on the first cache location being marked as clean.

3. The method of claim 1 , further comprising:

obtaining a second request to read the data element, wherein the second request to read the data element is associated with a third execution thread;

providing the first copy of the data element in response to the second request to read the data element when the first cache location is marked as clean; and

providing a third copy of the data element in response to the second request to read the data element when the first cache location is marked as dirty.

4. The method of claim 1 , further comprising:

updating a master copy of the data element using the first cache location after modifying the first cache location according to the first request to modify the data element is complete.

5. The method of claim 1 , further comprising:

discarding the second cache location once all requests to read the data element are handled.

6. The method of claim 1 , wherein marking the first cache location as dirty and marking the first cache location as clean comprise modifying a Boolean variable.

7. The method of claim 1 , wherein marking the first cache location as dirty and marking the first cache location as clean are performed by one selected from a group consisting of an operating system, a file system, a volume manager, and a storage device driver.

8. The method of claim 1 , wherein the first cache location comprises a location in random access memory.

9. The method of claim 1 , wherein storing the first copy of the data element in the first cache location is performed in response to the first request to modify the data element.

10. A system comprising:

a first cache location storing a first copy of a data element;

a second cache location; and

a data manager configured to:

obtain a first request to modify the data element, wherein the first request to modify the data element is associated with a first execution thread;

mark the first cache location as dirty based on the first request to modify the data element;

modify the first cache location according to the first request to modify the data element once the first cache location is marked as dirty;

obtain a first request to read the data element, wherein the first request to read the data element is associated with a second execution thread, and wherein the first request to read the data element is obtained after the modifying begins and before the modifying is complete;

determine, in response to obtaining the first request to read the data element, that the first cache location is marked dirty;

create, in response to the determination that the first cache location is marked dirty, a second copy of the data element; store the second copy of the data element in the second cache location;

provide, to the second execution thread, read access to the second cache location;

obtain a second request to modify the data element while the first cache location is marked as dirty,

queue the second request to modify the data element until modifying the first cache location according to the first request to modify the data element is complete, and

modify the first cache location according to the second request to modify the data element once modifying the first cache location according to the first request to modify the data element is complete; and

mark the first cache location as clean after modifying the first cache location is complete.

11. The system of claim 10 , wherein the data manager is further configured to:

obtain a second request to read the data element, wherein the second request to read the data element is associated with a third execution thread,

provide the first copy of the data element in response to the second request to read the data element when the first cache location is marked as clean, and

provide a third copy of the data element in response to the second request to read the data element when the first cache location is marked as dirty.

12. The system of claim 10 , wherein the data manager is further configured to:

update a master copy of the data element using the first cache location after modifying the first cache location according to the first request to modify the data element is complete.

13. The system of claim 10 , wherein the data manager is further configured to:

discard the second cache location once all requests to read the data element are handled.

14. The system of claim 10 , wherein marking the first cache location as dirty and marking the first cache location as clean comprise modifying a Boolean variable.

15. The system of claim 10 , wherein the data manager comprises one selected from a group consisting of an operating system, a file system, a volume manager, and a storage device driver.

16. A computer readable medium comprising executable instructions for managing access to a data element by:

storing a first copy of the data element in a first cache location;

obtaining a first request to modify the data element, wherein the first request to modify the data element is associated with a first execution thread;

marking the first cache location as dirty based on the first request to modify the data element;

modifying the cache location according to the first request to modify the data element once the first cache location is marked as dirty;

obtaining a first request to read the data element, wherein the first request to read the data element is associated with a second execution thread, and wherein the first request to read the data element is obtained after the modifying begins and before the modifying is complete;

determining, in response to obtaining the first request to read the data element, that the first cache location is marked dirty;

creating, in response to the determination that the first cache location is marked dirty, a second copy of the data element;

storing the second copy of the data element in a second cache location;

providing, to the second execution thread, read access to the second cache location;

obtaining a second request to modify the data element while the first cache location is marked as dirty;

queuing the second request to modify the data element until modifying the first cache location according to the first request to modify the data element is complete;

modifying the first cache location according to the second request to modify the data element once modifying the first cache location according to the first request to modify the data element is complete; and

marking the cache location as clean after modifying the first cache location is complete.

Assignments (2)
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 037311/0056 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 31, 2006
From: BELLATON, GILLES; EXCOFFIER, KARINE; CRAIG, MARK
To: SUN MICROSYSTEMS, INC.
Reel/Frame 018502/0214 →
Continuity (1)
Related Publication 20080104334A1 · May 1, 2008