# US 8,578,218 B2 · Method and system for implementing a scalable, high-performance, fault-tolerant locking mechanism in a multi-process environment

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

- Number: US 8,578,218 B2
- Document ID: US8578218B2
- Status: Granted
- Kind: B2
- Application number: 12/418,588
- Filed: 2009-04-04
- Published: 2010-10-07
- Granted: 2013-11-05
- Earliest claimed: 2009-04-04
- Assignees: Oracle International Corporation
- Applicants: Atul Singh; Maneesh Joshi; Ashwin Patel; Rakesh Saha
- Inventors: Atul Singh; Maneesh Joshi; Ashwin Patel; Rakesh Saha
- Web page: https://patentgrep.com/patent/US8578218B2

## CPC

- G06F 11/0715: {in a system implementing multitasking (multitasking per se G06F9/46)}
- G06F 11/0757: {by exceeding a time limit, i.e. time-out, e.g. watchdogs}
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F 16/29: Geographical information databases
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Described is an improved method, system, and computer program product for preventing concurrent access and processing of data by multiple threads. The inventive approach may be applied to prevent concurrent access in resequencers.

## Claims

### Claim 1

A method for monitoring the health of a processing entity in a computing system, comprising:
using at least one processor to perform a process, the process comprising:
initializing the processing entity;
locking a resource that is to be operated upon by the processing entity, wherein
the processing entity is associated with a time point, and
on periodic basis, the processing entity both refreshes the time point and monitors health status of oilier processing entities by checking time points associated with the other processing entities;
determining whether the processing entity is unhealthy by identifying an overdue time point associated with the processing entity, wherein
the overdue time point exceeds a designated time period for being updated by the processing entity, and
determination of whether the processing entity is unhealthy is performed by the other processing entities rather than by a central processing entity tasked with centrally monitoring the health status of the processing entity; and
performing one or more actions to release one or more locks on the resource held by the processing entity.

### Claim 2 (depends on 1)

The method of claim 1 in which the time point comprises a timestamp.

### Claim 3 (depends on 1)

The method of claim 1 in which the processing entity comprises a process, thread, or container.

### Claim 4 (depends on 1)

The method of claim 1 further comprising performing error handling to address failure of the processing entity.

### Claim 5 (depends on 4)

The method of claim 4 in which the error handling comprises releasing locks held by the processing entity or rolling back uncommitted operations performed by the processing entity.

### Claim 6 (depends on 5)

The method of claim 5 in which a database column is employed as a lock, wherein an identifier for the processing entity is inserted into the database column to implement the lock upon a resource associated with a row corresponding to the lock.

### Claim 7 (depends on 1)

The method of claim 1 in which the processing entity is initialized by creating a unique identifier for the processing entity.

### Claim 8 (depends on 7)

The method of claim 7 in which the unique identifier and the time point are inserted into a database table that is used to track initialized processing entities.

### Claim 9 (depends on 1)

The method of claim 1 in which the processing entity comprises a thread that performs the act of refreshing the time point and an act of determining whether at least one of the other processing entities is unhealthy.

### Claim 10 (depends on 1)

The method of claim 1 in which the processing entity performs resequencing operations upon a group of messages.

### Claim 11 (depends on 1)

The method of claim 1 in which multiple resources data items are locked to amortize costs of database operations.

### Claim 12 (depends on 1)

The method of claim 1 in which locking and processing of data are performed in separate transactions.

### Claim 13 (depends on 12)

The method of claim 12 in which database locks are acquired in a first transaction and application processing is performed in a second transaction.

### Claim 14 (depends on 1)

The method of claim 1, in which the action of locking the one or more resources is performed to lock one or more rows of a data structure for the processing entity, rather than to lock the data structure in its entirety for the processing entity.

### Claim 15 (depends on 14)

The method of claim 14, in which the action of locking the one or more resources is performed to lock multiple resources for the processing entity in one trip to access the data structure.

### Claim 16 (depends on 1)

The method of claim 1, the action of locking the one or more resources comprising:
using a first transaction to perform the action of locking the one or more resources; and
using a second transaction to process the one or more resources.

### Claim 17 (depends on 16)

The method of claim 16, the process further comprising:
determining whether the error or another error occurs with respect to a data structure that comprises the one or more resources; and
restoring the data structure by rolling back the first second transaction without releasing a lock on the one or more resources for the processing entity.

### Claim 18

A computer program product that includes a non-transitory computer readable storage medium, the non-transitory computer readable storage medium comprising a plurality of computer instructions which, when executed by at least one processor, cause the at least one processor to execute a method for monitoring the health of a processing entity in a computing system, the method comprising:
using al least one processor to perform a process, the process comprising:
initializing the processing entity;
locking a resource that is to be operated upon by the processing entity, wherein
the processing entity is associated with a time point, and
on periodic basis, the processing entity both refreshes the time point and monitors health status of other processing entities by checking time points associated with the other processing entities;
determining whether the processing entity is unhealthy by identifying an overdue time point associated with the processing entity, wherein
the overdue time point exceeds a designated time period for being updated by the processing entity, and
determination of whether the processing entity is unhealthy is performed by the other processing entities rather than by a central processing entity tasked with centrally monitoring the health status of the processing entity; and
performing one or more actions to release one or more locks on the resource held by the processing entity.

### Claim 19 (depends on 18)

The computer program product of claim 18 in which the time point comprises a time stamp.

### Claim 20 (depends on 18)

The computer program product of claim 18 in which the processing entity comprises a process, thread, or container.

### Claim 21 (depends on 18)

The computer program product of claim 18 further comprising performing error handling to address failure of the processing entity.

### Claim 22 (depends on 21)

The computer program product of claim 21 in which the error handling comprises releasing locks held by the processing entity or rolling back uncommitted operations performed by the processing entity.

### Claim 23 (depends on 22)

The computer program product of claim 22 in which a database column is employed as a lock, wherein an identifier for the processing entity is inserted into the database column to implement the lock upon a resource associated with a row corresponding to the lock.

### Claim 24 (depends on 18)

The computer program product of claim 18 in which the processing entity is initialized by creating a unique identifier for the processing entity.

### Claim 25 (depends on 24)

The computer program product of claim 24 in which the unique identifier and the time point are inserted into a database table that is used to track initialized processing entities.

### Claim 26 (depends on 18)

The computer program product of claim 18 in which the processing entity comprises a thread that performs the act of refreshing the time point and an act of determining whether at least one of the other processing entities is unhealthy.

### Claim 27 (depends on 18)

The computer program product of claim 18 in which the processing entity performs resequencing operations upon a group of messages.

### Claim 28 (depends on 18)

The computer program product of claim 18 in which multiple resources data items are locked to amortize costs of database operations.

### Claim 29 (depends on 18)

The computer program product of claim 18 in which locking and processing of data are performed in separate transactions.

### Claim 30 (depends on 29)

The computer program product of claim 29 in which database locks are acquired in a first transaction and application processing is performed in a second transaction.

### Claim 31

A system for monitoring the health of a processing entity in a computing system, comprising:
at least one processor executing a sequence of computing instructions to: initialize the processing entity;
lock a resource that is to be operated upon by the processing entity, wherein
the processing entity is associated with a time point, and
on periodic basis, the processing entity both refreshes the time point and monitors health status of other processing entities by checking time points associated with the other processing entities:
determine whether the processing entity is unhealthy by identifying an overdue time point associated with the processing entity, wherein
the overdue time point exceeds a designated time period for being updated by the processing entity, and
determination of whether the processing entity is unhealthy is performed by the other processing entities rather than by a central processing entity tasked with centrally monitoring the health status of the processing entity; and
perform one or more actions to release one or more locks on the resource held by the processing entity.

### Claim 32 (depends on 31)

The system of claim 31 in which the time point comprises a timestamp.

### Claim 33 (depends on 31)

The system of claim 31 in which the processing entity comprises a process, thread, or container.

### Claim 34 (depends on 31)

The system of claim 31 in which error handling is addressed to address failure of the processing entity.

### Claim 35 (depends on 34)

The system of claim 34 in which the error handling comprises releasing locks held by the processing entity or rolling back uncommitted operations performed by the processing entity.

### Claim 36 (depends on 35)

The system of claim 35 in which a database column is employed as a lock. wherein an identifier for the processing entity is inserted into the database column to implement the lock upon a resource associated with a row corresponding to the lock.

### Claim 37 (depends on 31)

The system of claim 31 in which the processing entity is initialized by creating a unique identifier for the processing entity.

### Claim 38 (depends on 37)

The system of claim 37 in which the unique identifier and the time point are inserted into a database table that is used to track initialized processing entities.

### Claim 39 (depends on 31)

The system of claim 31 in which the processing entity comprises a thread that is to refresh the time point and to determine whether at least one of the other processing entities is unhealthy.

### Claim 40 (depends on 31)

The system of claim 31 in which the processing entity performs resequencing operations upon a group of messages.

### Claim 41 (depends on 31)

The system of claim 31 in which multiple resources are locked to amortize costs of database operations.

### Claim 42 (depends on 31)

The system of claim 31 in which locking and processing of data are performed in separate transactions.

### Claim 43 (depends on 42)

The system of claim 42 in which database locks are acquired in a first transaction and application processing is performed in a second transaction.
