# US 10,313,477 B2 · System and method for use of a non-blocking process with a resource pool in a computing environment

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

- Number: US 10,313,477 B2
- Document ID: US10313477B2
- Status: Granted
- Kind: B2
- Application number: 15/215,372
- Filed: 2016-07-20
- Published: 2017-01-26
- Granted: 2019-06-04
- Earliest claimed: 2015-07-20
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Yuri Dolgov; Douglas Surber; Jean De Lavarene
- Web page: https://patentgrep.com/patent/US10313477B2

## CPC

- H04L 67/60: Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources (admission control or resource allocation H04L47/70)
- H04L 67/14: Session management (for real-time applications in data packet communications networks H04L65/1066)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In accordance with an embodiment, described herein is a system and method for use of a non-blocking process with a resource pool, for example a connection pool, or another type of computing environment. A generic wait-free approach can be used with a variety of different types of resource pools and pool elements. Threads which require access to a collection of resources do not have to wait for a lock on that collection of resources to become available. Although a borrowing thread may still be required to wait for a particular resource to be released, the wait-free approach allows the thread to browse through a list of available resources. The approach can be used with connection pools, or with other types of computing environments, to provide improved scalability in such systems.

## Claims

### Claim 1

A system for use of a non-blocking process in a computing environment, comprising:
one or more computers, including a processor and a non-blocking process executing thereon, that provides access to a resource pool associated with a plurality of pool elements, by a plurality of threads, including
enabling pool elements to be selectively reserved, so that a reserving thread has access to a particular pool element for a duration of a reservation period, and
during the reservation period, preventing other threads, of the plurality of threads, from accessing the particular pool element, and allowing the other threads to navigate through a remainder of the pool elements, reserving others of the plurality of pool elements;
wherein each pool element is associated with a data or other resource; and
wherein each of the plurality of threads access the resource pool using the non-blocking process to selectively reserve pool elements, including
wherein each pool element is associated with an iterator queue that contains references of threads that will revisit the pool element, and
wherein each thread is associated with a revisit queue, for use by the thread in examining pool elements and determining whether to use the data or other resource associated with those pool elements.

### Claim 2 (depends on 1)

The system of claim 1, wherein each pool element is associated with a flag that indicates whether that pool element is reserved for use by a thread, and a pointer to the data or other resource associated with that pool element, that is usable by a thread to access the data or other resource associated with that pool element.

### Claim 3 (depends on 1)

The system of claim 1, wherein the system uses atomic compare and set operations to check availability of and to reserve pool elements for use by the threads.

### Claim 4 (depends on 1)

The system of claim 1, wherein during iteration of the resource pool by a thread to locate the particular pool element, if the particular pool element is reserved by another thread, then the particular pool element is added to the revisit queue associated with that thread.

### Claim 5 (depends on 1)

The system of claim 1, wherein the system is used in a connection pool environment, including that each pool element is associated with a connection.

### Claim 6 (depends on 1)

The system of claim 1, wherein the particular pool element is reserved by a thread to perform a check to determine whether the pool element should be borrowed by the thread for further use.

### Claim 7 (depends on 1)

The system of claim 1, wherein the system is used in a connection pool environment, including that each pool element is associated with a connection usable by a software application.

### Claim 8

A method for use of a non-blocking process in a computing environment, comprising:
providing, at one or more computers, access to a resource pool associated with a plurality of pool elements, by a plurality of threads, using a non-blocking process, including
enabling one or more pool elements to be selectively reserved, so that a reserving thread has access to a particular pool element for a duration of a reservation period, and
during the reservation period, preventing other threads, of the plurality of threads, from accessing the particular pool element, and allowing the other threads to navigate through a remainder of the pool elements, reserving others of the plurality of pool elements;
wherein each pool element is associated with a data or other resource; and
wherein each of the plurality of threads access the resource pool using the non-blocking manner process to selectively reserve pool elements, including
wherein each pool element is associated with an iterator queue that contains references of threads that will revisit the pool element, and
wherein each thread is associated with a revisit queue, for use by the thread in determining whether to use the data or other resource associated with those pool elements.

### Claim 9 (depends on 8)

The method of claim 8, wherein each pool element is associated with a flag that indicates whether that pool element is reserved for use by a thread, and a pointer to the data or other resource associated with that pool element, that is usable by a thread to access the data or other resource associated with that pool element.

### Claim 10 (depends on 8)

The method of claim 8, further comprising using atomic compare and set operations to check availability of and to reserve pool elements for use by the threads.

### Claim 11 (depends on 8)

The method of claim 8, wherein during iteration of the resource pool by a thread to locate the particular pool element, if the particular pool element is reserved by another thread, then the particular pool element is added to the revisit queue associated with that thread.

### Claim 12 (depends on 8)

The method of claim 8, wherein the method is performed in a connection pool environment, including that each pool element is associated with a connection.

### Claim 13 (depends on 8)

The method of claim 8, wherein the particular pool element is reserved by a thread to perform a check to determine whether the pool element should be borrowed by the thread for further use.

### Claim 14 (depends on 8)

The method of claim 8, wherein the method is performed in a connection pool environment, including that each pool element is associated with a connection usable by a software application.

### Claim 15

A non-transitory computer readable storage medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform a method comprising:
providing access to a resource pool associated with a plurality of pool elements, by a plurality of threads, using a non-blocking process, including
enabling one or more pool elements to be selectively reserved, so that a reserving thread has access to a particular pool element for a duration of a reservation period, and
during the reservation period, preventing other threads, of the plurality of threads, from accessing the particular pool element, and allowing the other threads to navigate through a remainder of the pool elements, reserving others of the plurality of pool elements;
wherein each pool element is associated with a data or other resource; and
wherein each of the plurality of threads access the resource pool using the non-blocking process to selectively reserve pool elements, including
wherein each pool element is associated with an iterator queue that contains references of threads that will revisit the pool element, and
wherein each thread is associated with a revisit queue, for use by the thread in determining whether to use the data or other resource associated with those pool elements.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein each pool element is associated with a flag that indicates whether that pool element is reserved for use by a thread, and a pointer to the data or other resource associated with that pool element, that is usable by a thread to access the data or other resource associated with that pool element.

### Claim 17 (depends on 15)

The non-transitory computer readable storage medium of claim 15, further comprising using atomic compare and set operations to check availability of and to reserve pool elements for use by the threads.

### Claim 18 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein during iteration of the resource pool by a thread to locate the particular pool element, if the particular pool element is reserved by another thread, then the particular pool element is added to the revisit queue associated with that thread.

### Claim 19 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the system is used in a connection pool environment, including that each pool element is associated with a connection.

### Claim 20 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the particular pool element is reserved by a thread to perform a check to determine whether the pool element should be borrowed by the thread for further use.
