Process-safe read/write locks
First Claim
1. A non-transitory processor-readable medium storing code representing instructions to cause a processor to:
- obtain exclusive access to a first mutual exclusion object, the first mutual exclusion object associated with a shared resource;
obtain, at a first time, exclusive access to a second mutual exclusion object, the second mutual exclusion object associated with an object manager module configured to instantiate a read event object in response to obtaining exclusive access to the second mutual exclusion object, the object manager module configured to add the read event object to a set of read event objects associated with the shared resource;
release the first mutual exclusion object and the second mutual exclusion object after the read event object has been instantiated;
obtain, at a second time, exclusive access to the first mutual exclusion object and the second mutual exclusion object;
receive, from the object manager module and after obtaining exclusive access to the second mutual exclusion object at the second time, a count value calculated, by the object manager module, based on a number of read event objects in the set of read event objects;
release the second mutual exclusion object;
write one or more bits to the shared resource when the count value satisfies a criterion; and
release the first mutual exclusion object in response to writing the one or more bits to the shared resource.
13 Assignments
0 Petitions
Accused Products
Abstract
In one embodiment, a non-transitory processor-readable medium stores code representing instructions that when executed cause a processor to obtain a first mutual exclusion object. The first mutual exclusion object can be a write mutual exclusion object associated with a shared resource. The code can further represent instructions that when executed cause the processor to obtain a second mutual exclusion object associated with an object manager module and define a read event object with a name conforming to a predetermined format. The code can further represent instructions that when executed cause the processor to release the second mutual exclusion object, release the first mutual exclusion object, read at least a portion of the shared resource, obtain the second mutual exclusion object, destroy the read event object and release the second mutual exclusion object.
21 Citations
15 Claims
-
1. A non-transitory processor-readable medium storing code representing instructions to cause a processor to:
-
obtain exclusive access to a first mutual exclusion object, the first mutual exclusion object associated with a shared resource; obtain, at a first time, exclusive access to a second mutual exclusion object, the second mutual exclusion object associated with an object manager module configured to instantiate a read event object in response to obtaining exclusive access to the second mutual exclusion object, the object manager module configured to add the read event object to a set of read event objects associated with the shared resource; release the first mutual exclusion object and the second mutual exclusion object after the read event object has been instantiated; obtain, at a second time, exclusive access to the first mutual exclusion object and the second mutual exclusion object; receive, from the object manager module and after obtaining exclusive access to the second mutual exclusion object at the second time, a count value calculated, by the object manager module, based on a number of read event objects in the set of read event objects; release the second mutual exclusion object; write one or more bits to the shared resource when the count value satisfies a criterion; and release the first mutual exclusion object in response to writing the one or more bits to the shared resource. - View Dependent Claims (2, 3, 4, 5, 6, 7, 15)
-
-
8. An apparatus, comprising:
-
an object manager module implemented in at least one of a memory or a processing device, the object manager module configured to instantiate at least one read event object in response to receiving a read request for a shared resource from at least one application process, the object manager module configured to calculate a count value based at least in part on a number of instantiated read event objects; and a lock module configured to provide an application module exclusive access to a write mutual exclusion object associated with the shared resource in response to receiving a request for exclusive access to the shared resource from the application module, the lock module configured to provide the application module exclusive access to an object manager mutual exclusion object associated with the object manager module in response to receiving a request for exclusive access to the object manager module from the application module, the object manager module configured to send, to the application module and based on the application module having exclusive access to the object manager mutual exclusion object at a time, the count value such that the application module writes one or more bits to the shared resource when the count value satisfies a criterion, the lock module configured to release exclusive access of the application module to the object manager mutual exclusion object in response to receiving an indication that the application module received the count value, the lock module configured to release exclusive access of the application module to the write mutual exclusion object in response to receiving an indication that the application module has written the one or more bits to the shared resource. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification