# US 10,372,682 B2 · Maintaining data integrity

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

- Number: US 10,372,682 B2
- Document ID: US10372682B2
- Status: Granted
- Kind: B2
- Application number: 12/700,861
- Filed: 2010-02-05
- Published: 2010-08-12
- Granted: 2019-08-06
- Earliest claimed: 2009-02-06
- Assignees: International Business Machines Corporation
- Applicants: Andrew John Schofield
- Inventors: Andrew John Schofield
- Web page: https://patentgrep.com/patent/US10372682B2

## CPC

- G06F 16/1774: {Locking methods, e.g. locking methods for file systems allowing shared and concurrent access to files}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Data integrity is maintained in an environment in which multiple instances of a software component each can include multiple processes capable of accessing a shared resource. Each instance of the software component can be either an “active” instance (which is allowed to update data) or a “standby” instance (which is not allowed to update data). At any point in time, the environment does not comprise more than one active instance. There can, however, be more than one standby instance. Preferably, a single standby instance can become a new active instance in the event of a complete failure of the active instance, i.e. a failure associated with every process of the current active instance.

## Claims

### Claim 1

A computer-implemented method for maintaining data integrity of a shared resource accessible by a first instance of a software component and a second instance of the software component, comprising:
determining, by a first monitoring process of the first instance executing on a first computer, that an exclusive mode of a master lock for the shared resource is obtainable;
determining, by the first monitoring process and after the exclusive mode of the master lock has been obtained by the first instance, that an exclusive mode of an active lock for the shared resource is obtainable; and
designating, after the exclusive mode of the active lock has been obtained by the first instance, the first process as an active instance and the second instance as a standby instance, wherein
the second instance executes on a second computer, and
the active lock, configurable between a shared mode and the exclusive mode, and the master lock are stored in the shared resource.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
unlocking, after the first instance is the active instance and by the first instance, the exclusive mode of the active lock; and
locking, after the unlocking, the active lock in the shared mode.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
validating, by a first child process of the first instance, that a first parent process of the first instance is a holder of the active lock.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
determining, by the first child process, that the shared mode of the active lock is obtainable, and
obtaining, by the first child process, the shared mode of the active lock, wherein
the first parent process is the holder of the master lock in the exclusive mode while the first child process is a holder of the active lock in the shared mode.

### Claim 5 (depends on 4)

The method of claim 4, wherein
another child process of the first parent process is a holder of the active in the shared mode while the first child process is a holder of the active lock in the shared mode.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
determining, by a second monitoring process of the second instance, that the exclusive mode of the master lock is obtainable;
determining, by the second monitoring process and after the exclusive mode of the master lock has been obtained by the second instance, that the exclusive mode of the active lock is not obtainable; and
releasing, by the second monitoring process and based upon the exclusive mode of the active lock not being obtainable, the exclusive mode of the master lock.

### Claim 7

A computer hardware system configured to maintaining data integrity of a shared resource accessible by a first instance of a software component and a second instance of the software component, comprising
a computer configured to perform:
determining, by a first monitoring process of the first instance executing on a first computer, that an exclusive mode of a master lock for the shared resource is obtainable;
determining, by the first monitoring process and after the exclusive mode of the master lock has been obtained by the first instance, that an exclusive mode of an active lock for the shared resource is obtainable; and
designating, after the exclusive mode of the active lock has been obtained by the first instance, the first process as an active instance and the second instance as a standby instance, wherein
the second instance executes on a second computer, and
the active lock, configurable between a shared mode and the exclusive mode, and the master lock are stored in the shared resource.

### Claim 8 (depends on 7)

The system of claim 7, wherein the computer is further configured to perform:
unlocking, after the first instance is the active instance and by the first instance, the exclusive mode of the active lock; and
locking, after the unlocking, the active lock in the shared mode.

### Claim 9 (depends on 7)

The system of claim 7, wherein the computer is further configured to perform:
validating, by a first child process of the first instance, that a first parent process of the first instance is a holder of the active lock.

### Claim 10 (depends on 9)

The system of claim 9, wherein the computer is further configured to perform:
determining, by the first child process, that the shared mode of the active lock is obtainable, and
obtaining, by the first child process, the shared mode of the active lock, wherein
the first parent process is the holder of the master lock in the exclusive mode while the first child process is a holder of the active lock in the shared mode.

### Claim 11 (depends on 10)

The system of claim 10, wherein
another child process of the first parent process is a holder of the active in the shared mode while the first child process is a holder of the active lock in the shared mode.

### Claim 12 (depends on 7)

The system of claim 7, wherein the computer is further configured to perform:
determining, by a second monitoring process of the second instance, that the exclusive mode of the master lock is obtainable;
determining, by the second monitoring process and after the exclusive mode of the master lock has been obtained by the second instance, that the exclusive mode of the active lock is not obtainable; and
releasing, by the second monitoring process and based upon the exclusive mode of the active lock not being obtainable, the exclusive mode of the master lock.

### Claim 13

A computer program product, comprising:
a computer readable hardware storage device having stored therein computer readable program code for maintaining data integrity of a shared resource accessible by a first instance of a software component and a second instance of the software component,
the computer readable program code, which when executed by a computer hardware system, causes the computer hardware system to perform:
determining, by a first monitoring process of the first instance executing on a first computer, that an exclusive mode of a master lock for the shared resource is obtainable;
determining, by the first monitoring process and after the exclusive mode of the master lock has been obtained by the first instance, that an exclusive mode of an active lock for the shared resource is obtainable; and
designating, after the exclusive mode of the active lock has been obtained by the first instance, the first process as an active instance and the second process as a standby instance, wherein
the second instance executes on a second computer, and
the active lock, configurable between a shared mode and the exclusive mode, and the master lock are stored in the shared resource.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the computer readable program code further causes the computer hardware system to perform:
unlocking, after the first instance is the active instance and by the first instance, the exclusive mode of the active lock; and
locking, after the unlocking, the active lock in the shared mode.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the computer readable program code further causes the computer hardware system to perform:
validating, by a first child process of the first instance, that a first parent process of the first instance is a holder of the active lock.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the computer readable program code further causes the computer hardware system to perform:
determining, by the first child process, that the shared mode of the active lock is obtainable, and
obtaining, by the first child process, the shared mode of the active lock, wherein
the first parent process is the holder of the master lock in the exclusive mode while the first child process is a holder of the active lock in the shared mode.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein
another child process of the first parent process is a holder of the active in the shared mode while the first child process is a holder of the active lock in the shared mode.

### Claim 18 (depends on 13)

The computer program product of claim 13, wherein the computer readable program code further causes the computer hardware system to perform:
determining, by a second monitoring process of the second instance, that the exclusive mode of the master lock is obtainable;
determining, by the second monitoring process and after the exclusive mode of the master lock has been obtained by the second instance, that the exclusive mode of the active lock is not obtainable; and
releasing, by the second monitoring process and based upon the exclusive mode of the active lock not being obtainable, the exclusive mode of the master lock.
