Efficient locking mechanism for multiple operations rights
First Claim
Patent Images
1. A method of controlling access to a common resource, wherein a plurality of operations are configured to be performed on the common resource, comprising:
- providing an operation lock (OPLOCK), which is a bitmap comprising a plurality of bit fields;
providing a first set of bitmaps, where the first set of bitmaps correspond to a first operation that can be performed on the common resource, wherein the first set of bitmaps comprises a first mask bitmap and a first policy bitmap, wherein the first mask bitmap defines a first bit field in the operation lock that is associated with the first operation, and the first policy bitmap defines a compatibility between the first operation and each of the plurality of operations;
providing a second set of bitmaps, where the second set of bitmaps correspond to a second operation that can be performed on the common resource, wherein the second set of bitmaps comprises a second mask bitmap and a second policy bitmap, wherein the second mask bitmap defines a second bit field in the operation lock that is associated with the second operation, and the second policy bitmap defines a compatibility between the second operation and each of the plurality of operations; and
determining whether a task is permitted to perform a first operation on the common resource based on values of the operation lock and the first set of bitmaps,wherein a number of tasks configured to simultaneously access the common resource to perform the first operation is determined by a size of the first bit field; and
wherein access to a task to perform the first operation is granted or denied based on a result of a bitwise AND of the operation lock and the first policy bitmap.
1 Assignment
0 Petitions
Accused Products
Abstract
A novel method of providing a locking mechanism which supports multiple operations rights is disclosed. The locking mechanism includes a policy aspect which defines which operations are allowed to access the common resource concurrently. The locking mechanism also includes the ability to allow predetermined number of tasks to access the common resource simultaneously. Furthermore, additional operations can be easily and quickly added to the mechanism.
4 Citations
19 Claims
-
1. A method of controlling access to a common resource, wherein a plurality of operations are configured to be performed on the common resource, comprising:
-
providing an operation lock (OPLOCK), which is a bitmap comprising a plurality of bit fields; providing a first set of bitmaps, where the first set of bitmaps correspond to a first operation that can be performed on the common resource, wherein the first set of bitmaps comprises a first mask bitmap and a first policy bitmap, wherein the first mask bitmap defines a first bit field in the operation lock that is associated with the first operation, and the first policy bitmap defines a compatibility between the first operation and each of the plurality of operations; providing a second set of bitmaps, where the second set of bitmaps correspond to a second operation that can be performed on the common resource, wherein the second set of bitmaps comprises a second mask bitmap and a second policy bitmap, wherein the second mask bitmap defines a second bit field in the operation lock that is associated with the second operation, and the second policy bitmap defines a compatibility between the second operation and each of the plurality of operations; and determining whether a task is permitted to perform a first operation on the common resource based on values of the operation lock and the first set of bitmaps, wherein a number of tasks configured to simultaneously access the common resource to perform the first operation is determined by a size of the first bit field; and
wherein access to a task to perform the first operation is granted or denied based on a result of a bitwise AND of the operation lock and the first policy bitmap. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A non-transitory storage medium, comprising:
-
an operation lock (OPLOCK), which is a bitmap comprising a plurality of bit fields, each representing one of a plurality of operations that are configured to be performed on a common resource; a first mask bitmap, wherein the first mask bitmap defines a first bit field in the operation lock that is associated with a first operation; a first policy bitmap, wherein the first policy bitmap defines a compatibility between the first operation and each of the plurality of operations; a second mask bitmap wherein the second mask bitmap defines a second bit field in the operation lock that is associated with a second operation; a second policy bitmap, wherein the second policy bitmap defines a compatibility between the second operation and each of the plurality of operations; and a software application, where the software application uses the operation lock to determine whether a task is to be granted access to the common resource to perform a particular function, wherein access to a task to perform the first operation is granted or denied based on a result of a bitwise AND of the operation lock and the first policy bitmap and wherein a number of tasks configured to simultaneously access the common resource to perform the first operation is determined by a size of the first bit field. - View Dependent Claims (12, 13, 14, 15, 16, 17)
-
-
18. A method of controlling access to a common resource, wherein read operations and write operations are configured to be performed on the common resource, and wherein a plurality of tasks are configured to simultaneously perform read operations on the common resource, comprising:
-
providing an operation lock (OPLOCK), which is a bitmap comprising a read bit field and a write bit field, wherein the read bit field is greater than one bit and the write bit field is exactly one bit; providing a set of read bitmaps, where the read bitmaps correspond to the read operation, wherein the read bitmaps comprise a read mask bitmap and a read policy bitmap, wherein the read mask bitmap defines the read bit field in the operation lock, and the read policy bitmap defines a compatibility between the read operation and the read and write operations; providing a set of write bitmaps, where the set of write bitmaps correspond to the write operation, wherein the set of write bitmaps comprises a write mask bitmap and a write policy bitmap, wherein the write mask bitmap defines the write bit field in the operation lock, and the write policy bitmap defines a compatibility between the write operation and the read and write operations; and determining whether a task is configured to perform a read or write operation on the common resource based on values of the operation lock, the set of read bitmaps and the set of write bitmaps, wherein a number of tasks configured to simultaneously access the common resource to perform the read operations is determined by a size of the read bit field and wherein access to the task to perform the read operation is granted or denied based on the result of a bitwise AND of the operation lock and the read policy bitmap. - View Dependent Claims (19)
-
Specification