Method, system, program, and data structure for implementing a locking mechanism for a shared resource
First Claim
1. A method for implementing a locking mechanism to control access to a shared resource, comprising:
- receiving a request to access the shared resource;
determining whether a first file has a first name;
renaming the first file to a second name if the first file has the first name;
updating a second file to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request;
reading and buffering a checksum from the second file before updating the second file; and
renaming the first file to the first name after the second file is updated.
2 Assignments
0 Petitions
Accused Products
Abstract
Provided are a method, system, program, and data structure for implementing a locking mechanism to control access to a shared resource. A request is received to access the shared resource. A determination is made of whether a first file has a first name. The first file is renamed to a second name if the first file has the first name. A second file is updated to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name. An ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request. The first file is renamed to the first name after the second file is updated.
59 Citations
63 Claims
-
1. A method for implementing a locking mechanism to control access to a shared resource, comprising:
-
receiving a request to access the shared resource; determining whether a first file has a first name; renaming the first file to a second name if the first file has the first name; updating a second file to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request; reading and buffering a checksum from the second file before updating the second file; and renaming the first file to the first name after the second file is updated. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A system for implementing a locking mechanism to control access to a shared resource, comprising;
-
a file system; a processor in communication with a first computer readable medium and file system; code implemented in the first computer readable medium executed by the processor to cause the processor to perform; (i) receiving a request to access the shared resource; (ii) determining whether a first file in the file system has a first name; (iii) renaming the first file to a second name if the first file has the first name; (iv) updating a second file in the file system to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request; (v) reading and buffering a checksum from the second file the computer readable medium before updating the second file; and (vi) renaming the first file to the first name after the second file is updated. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27)
-
-
28. A system for implementing a locking mechanism to control access to a shared resource, comprising:
-
a file system implemented including a first file and a second file; means for receiving a request to access the shared resource; means for determining whether the first file has a first name; means for renaming the first file to a second name if the first file has the first name; means for updating the second file to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request and wherein the means for updating the second file further performs reading and buffering a checksum from the second file in the computer readable medium before updating the second file; and means renaming the first file to first name after the second file is updated. - View Dependent Claims (29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
-
-
40. An article of manufacture including code for implementing a locking mechanism to control access to a shared resource, wherein the code causes operations to be performed comprising:
-
receiving a request to access the shared resource; determining whether a first file has a first name; renaming the first file to a second name if the first file has the first name; updating a second file to indicate the received request in a queue of requests to the shared resource if the first file is renamed to the second name, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request; reading and buffering a checksum from the second file before updating the second file; and renaming the first file to the first name after the second file is updated. - View Dependent Claims (41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58)
-
-
59. A computer readable medium including data structures for implementing a locking mechanism to control access to a shared resource, comprising:
-
a first file having one of a first name or a second name, wherein in response to receiving a request to access the shared resource, the first file is renamed to the second name if the first file has the first name; a second file indicating a queue of requests to the shared resource, wherein an ordering of the requests in the queue is used to determine whether access to the shared resource is granted to the request, and wherein the second file is updated to indicate the received request in the queue when the first file is renamed to the second name, wherein the first file is renamed to the first name alter the second file is updated; and a checksum field in the second file, wherein the checksum is buffered before updating the second file. - View Dependent Claims (60, 61, 62, 63)
-
Specification