Patent ID: 7886113

Claim:
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.