# US 2012/0254302 A1 · System and Method for Resource Locking

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254302 A1
- Document ID: US20120254302A1
- Status: Published application
- Kind: A1
- Application number: 13/487,073
- Filed: 2012-06-01
- Published: 2012-10-04
- Earliest claimed: 2004-09-30
- Assignees: Google Inc.
- Inventors: Joshua A. Redstone; Sean Quinlan; Michael Burrows
- Web page: https://patentgrep.com/patent/US20120254302A1

## CPC

- G06F 9/526: {Mutual exclusion algorithms}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A server system includes a processor and a data structure having an entry for a resource, the entry including a first sequence number. The server has communication procedures for receiving a request from a client to access the resource, where the request includes a second sequence number obtained from a service, and a resource request handling program. Upon receiving the request, the resource request handling program determines whether the server has any record of having previously received a request to access the resource. If not, the server returns a provisional rejection to the client, requiring the client to verify that it holds a lock on the specified resource. A provisional bit in the entry is initially set to indicate that the resource has not been accessed since the system was last initialized. The provisional bit is reset when a request to access the resource is granted.

## Claims

### Claim 1

A method for locking a resource, the method performed by a server having one or more processors and memory storing one or more programs for execution by the one or more processors so as to perform the method, the method comprising:
initializing the server including initializing a resource table configured to store entries corresponding to requests to access respective resources in the server;
receiving at the server a request from a client to access a particular resource on the server, wherein the client and server are distinct systems interconnected by a communications network;
determining that since initializing the server, the server has not received a request to access the particular resource; and
in response to the request and a positive result from the determining, returning a provisional rejection to the client, requiring the client to verify that it holds a lock on the particular resource.

### Claim 2 (depends on 1)

The method of claim 1, wherein said initializing comprises creating a default entry having a first sequence number set to a value lower than a lowest valid sequence number received by the server, and having a provisional bit set to true.

### Claim 3 (depends on 2)

The method of claim 2, wherein said request contains a second sequence number given to said client by a service comprising a system distinct from the client and server and that is coupled to the client by the communications network.

### Claim 4 (depends on 1)

The method of claim 1, further comprising, after the determining, storing an entry in a data structure for the particular resource, where the entry includes a first sequence number set to a second sequence number received with the request, and a provisional bit set to true; where the second sequence number was provided to the client by a service.

### Claim 5 (depends on 1)

The method of claim 1, further comprising, when the determining produces a positive result, storing an entry in a data structure for the particular resource, where the entry includes:
a first sequence number set to a value lower than a lowest valid sequence number received by the server; and
a provisional bit set to true.

### Claim 6 (depends on 5)

The method of claim 5, further comprising, after storing the entry for the particular resource, setting the first sequence number in the entry to a second sequence number received with the request, where the second sequence number was given to the client by a service.

### Claim 7 (depends on 1)

The method of claim 1, further comprising, when the determining produces a positive result, storing an entry in a data structure for the particular resource, where the entry includes a first sequence number set to a second sequence number received with the request, where the second sequence number was given to the client by a service, and a provisional bit set to true;
the method further including: receiving at the server an additional request from the client to access the particular resource on the server, the additional request including a third sequence number, and comparing the third sequence number with the first sequence number.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
determining whether the third sequence number is less than the first sequence number; and
when the determination is affirmative, rejecting the request to access the particular resource.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
determining whether the third sequence number is higher than the first sequence number; and
determining whether the provisional bit is false.

### Claim 10

A server system, comprising:
a processor;
at least one resource;
a data structure comprising an entry for a particular resource of said at least one resource, said entry including a first sequence number;
communication procedures, executable by the processor, for receiving a request from a client to access the particular resource, where the request includes a second sequence number obtained from a service that is interconnected to the server system and the client by a communications network and is distinct from the server system and the client;
a resource request handling program, executable by the processor, comprising:
instructions for initializing a resource table in response to an initializing event, the resource table being configured to store entries corresponding to requests to access respective resources in the server system;
instructions for determining that since the initializing event, the server system has not received a request to access the particular resource; and
instructions returning a provisional rejection to the client when the determining produces a positive result, the provisional rejection requiring the client to verify that it holds a lock on the particular resource.

### Claim 11 (depends on 10)

The server system of claim 10, wherein said initializing comprises creating a default entry having a first sequence number set to a value lower than a lowest valid sequence number received by the server, and having a provisional bit set to true.

### Claim 12 (depends on 11)

The server system of claim 11, wherein said request contains a second sequence number given to said client by a service comprising a system distinct from the client and server and that is coupled to the client by the communications network.

### Claim 13 (depends on 10)

The server system of claim 10, said resource request handling program further comprising instructions that, when executed by the processor after the determining, cause the server system to store an entry in a data structure for the particular resource, where the entry includes a first sequence number set to a second sequence number received with the request, and a provisional bit set to true; where the second sequence number was provided to the client by a service.

### Claim 14 (depends on 10)

The server system of claim 10, said resource request handling program further comprising instructions that, when executed by the processor after the determining produces a positive result, cause the server system to store an entry in a data structure for the particular resource, where the entry includes:
a first sequence number set to a value lower than a lowest valid sequence number received by the server; and
a provisional bit set to true.

### Claim 15 (depends on 14)

The server system of claim 14, said resource request handling program further comprising instructions that, when executed by the processor after storing the entry for the particular resource, cause the server system to set the first sequence number in the entry to a second sequence number received with the request, where the second sequence number was given to the client by a service.

### Claim 16

A non-transitory computer readable storage medium storing one or more programs configured to be executed by a computer system, the one or more programs comprising instructions for:
initializing a server including initializing a resource table configured to store entries corresponding to requests to access respective resources in the server;
receiving at the server a request from a client to access a particular resource on the server, wherein the client and server are distinct systems interconnected by a communications network;
determining that since initializing the server, the server has not received a request to access the particular resource; and
in response to the request and a positive result from the determining, returning a provisional rejection to the client, requiring the client to verify that it holds a lock on the particular resource.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein said initializing comprises creating a default entry having a first sequence number set to a value lower than a lowest valid sequence number received by the server, and having a provisional bit set to true.

### Claim 18 (depends on 2)

The method of claim 2, wherein said request contains a second sequence number given to said client by a service comprising a system distinct from the client and server and that is coupled to the client by the communications network.

### Claim 19 (depends on 16)

The non-transitory computer readable storage medium of claim 16, said resource request handling program further comprising instructions that, when executed by the processor after the determining, cause the server system to store an entry in a data structure for the particular resource, where the entry includes a first sequence number set to a second sequence number received with the request, and a provisional bit set to true; where the second sequence number was provided to the client by a service.

### Claim 20 (depends on 16)

The non-transitory computer readable storage medium of claim 16, said resource request handling program further comprising instructions that, when executed by the processor after the determining produces a positive result, cause the server system to store an entry in a data structure for the particular resource, where the entry includes:
a first sequence number set to a value lower than a lowest valid sequence number received by the server; and
a provisional bit set to true.

### Claim 21 (depends on 20)

The non-transitory computer readable storage medium of claim 20, said resource request handling program further comprising instructions that, when executed by the processor after storing the entry for the particular resource, cause the server system to set the first sequence number in the entry to a second sequence number received with the request, where the second sequence number was given to the client by a service.

### Claim 22 (depends on 16)

The non-transitory computer readable storage medium of claim 16, said resource request handling program further comprising instructions that, when executed by the processor after the determining produces a positive result for the particular resource, cause the server system to store an entry in a data structure for the particular resource, where the entry includes a first sequence number set to a second sequence number received with the request, where the second sequence number was given to the client by a service, and a provisional bit set to true;
said resource request handling program further comprising instructions for receiving at the server an additional request from the client to access the particular resource on the server, the additional request including a third sequence number, and comparing the third sequence number with the first sequence number.

### Claim 23 (depends on 22)

The non-transitory computer readable storage medium of claim 22, said resource request handling program further comprising instructions for:
determining whether the third sequence number is less than the first sequence number; and
when the determination is affirmative, rejecting the request to access the particular resource.

### Claim 24 (depends on 22)

The non-transitory computer readable storage medium of claim 22, said resource request handling program further comprising instructions for:
determining whether the third sequence number is higher than the first sequence number; and
determining whether the provisional bit is false.
