IP Library Granted Patent US 9,535,759
Granted Patent B2
US 9,535,759 · App. 14/286,694 · Granted Jan 3, 2017

Work queue thread balancing

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,535,759
App. No.
14/286,694
Granted
Jan 3, 2017
Kind
B2
Abstract

Various embodiments are directed to systems and methods for work queue thread balancing. A global thread pool manager may be configured to receive a request to add a work item to a constituent work queue. The constituent work queue may be described by a work queue thread property. The global thread pool manager may add the work item to the constituent work queue and match the work item to a global thread selected from a global thread pool. The global thread may be configured according to the work queue thread property to generate a configured global thread. The configured global thread may execute the work item.

Claims (73)

1. A computer-implemented system comprising:

at least one processor; and

a data storage operatively associated with the at least one processor, wherein the at least one processor is programmed to execute a global queue manager, wherein the global queue manager is configured to:

receive a request to add a first work item to a constituent work queue, wherein the constituent work queue is described by a plurality of work queue thread properties;

write an entry for the first work item to the constituent work queue, wherein the entry for the first work item comprises a reference to first computer program instructions for executing the first work item;

determine that a dedicated thread from a dedicated thread pool of the constituent work queue is available to execute the first work item, wherein the dedicated thread is configured to logically link to the constituent work queue and to exclusively execute a work item added to the constituent work queue;

execute the first work item with the dedicated thread, wherein thread properties of the dedicated thread match at least a portion of the thread properties of the work queue;

receive a request to add a second work item to the constituent work queue;

write an entry for the second work item to the constituent work queue, wherein the entry for the second work item comprises a reference to second computer program instructions for executing the second work item;

determine that a dedicated thread is not available to execute the second work item;

add the second work item to a global queue;

determine that the second work item has reached a front of the global queue;

determine that a global thread is available;

configure the global thread according to the plurality of work queue thread properties to generate a configured global thread; and

execute the second work item with the configured global thread.

2. The system of claim 1 , wherein executing the second work item with the configured global thread comprises executing the second computer program instructions for executing the second work item by the configured global thread.

3. The system of claim 1 , wherein the global queue manager is also configured to:

receive a request to create the constituent work queue, wherein the request comprises an indication of a plurality of work queue properties for the constituent work queue; and

initiate the constituent work queue.

4. The system of claim 3 , wherein the plurality of work queue properties includes an indication that the constituent work queue is to comprise the dedicated thread pool, and wherein initiating the constituent work queue comprises initiating at least one dedicated thread.

5. A computer-implemented system for work queue thread balancing comprising:

at least one processor; and

a data storage operatively associated with the at least one processor, wherein the at least one processor is programmed to execute a constituent queue manager and a global queue manager, wherein the constituent queue manager is programmed to:

receive a request to add a first work item to a constituent work queue, wherein the constituent work queue is described by a work queue thread property;

determine that it is necessary to initiate a dedicated thread selected from a dedicated thread pool of the constituent work queue;

initiate a dedicated thread;

add the first work item to the constituent work queue;

execute the first work item with the dedicated thread;

receive a request to add a second work item to the constituent work queue;

add the second work item to the constituent work queue;

request that a global queue manager match the second work item to a global thread selected from a global thread pool;

configure, by the global queue manager, the global thread according to the work queue thread property to generate a configured global thread; and

execute the second work item with the configured global thread.

6. The system of claim 5 , wherein the work queue thread property comprises a process context.

7. The system of claim 5 , wherein adding the second work item to the constituent work queue comprises creating a constituent work queue entry corresponding to the second work item at the constituent work queue.

8. The system of claim 7 , wherein matching the second work item to the global thread comprises:

creating a global work queue entry corresponding to the second work item at a global work queue, wherein the global work queue entry comprises a reference to the second work item and a reference to the constituent work queue;

determine that the global work queue entry has reached a front of the global work queue;

determine that the global thread is available to take on a work item; and

assign the global thread to the work item.

9. The system of claim 8 , wherein the reference to the constituent work queue comprises a reference to the constituent work queue entry.

10. The system of claim 5 , wherein the at least one processor is further programmed to:

before matching the second work item to the global thread, determine that at least one dedicated thread for the constituent work queue is in a wait state.

11. A computer-implemented system comprising:

at least one processor; and

a data storage operatively associated with the at least one processor, wherein the at least one processor is programmed to execute a global queue manager, wherein the global queue manager is configured to:

receive a request to execute a first work item from a constituent work queue selected from a plurality of constituent work queues, wherein the constituent work queue is described by a plurality of work queue thread properties;

match the first work item to a dedicated thread selected from a dedicated thread pool of the constituent work queue, wherein the dedicated thread is configured to logically link to the constituent work queue and to exclusively execute a work item added to the constituent work queue;

instruct the dedicated thread to execute the first work item, wherein thread properties of the dedicated thread match at least a portion of the thread properties of the work queue;

receive a request to execute a second work item from the constituent work queue;

write an entry for the second work item to a global queue, wherein the entry for the second work item comprises a reference to second computer program instructions to execute the second work item and a reference to the constituent work queue;

determine that the second work item has reached a front of the global queue;

determine that a global thread is available;

match the second work item to a global thread selected from a global thread pool wherein the global thread pool comprises a plurality of global threads;

configure the global thread according to at least one work queue thread property of the constituent work queue to generate a configured global thread; and

instruct the configured global thread to execute the second work item.

12. The system of claim 11 , wherein the global queue manager is also configured to:

receive a request to execute a third work item from a second constituent work queue selected from the plurality of constituent work queues;

match the third work item to a second global thread selected from the global thread pool;

configure the second global thread according to at least one property of the second constituent work queue to generate a second configured global thread; and

instruct the configured global thread to execute the third work item.

13. The system of claim 11 , wherein the global queue manager is also configured to:

determine, based on at least a portion of the plurality of constituent work queues, to initiate an additional global thread; and

initiate the additional global thread.

14. The system of claim 13 , wherein determining to initiate an additional global thread comprises at least one action selected from the group consisting of:

determining whether any of the plurality of constituent work queues has a queue depth greater than a queue depth threshold for the constituent work queue; and

determining whether any of the plurality of constituent work queues has a queue wait time greater than a queue wait time for the constituent work queue.

15. The system of claim 11 , wherein the global queue manager is also configured to:

determine, based on a state of at the global thread pool, to reduce a size of the global thread pool; and

terminate at least one global thread selected from the plurality of global threads.

16. The system of claim 15 , wherein determining to reduce the size of the global thread pool comprises determining whether any of the plurality of global threads has been idle for greater than a threshold idle time.

17. The system of claim 11 , wherein the global queue manager is a component of an operating system of the system.

18. The system of claim 11 , wherein the global queue manager executes as an operating system plug-in that executes in a kernel address space of the system.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2018
From: MASON, W. ANTHONY
To: OPEN INVENTION NETWORK LLC
Reel/Frame 047874/0766 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 11, 2017
From: OSR OPEN SYSTEM RESOURCES, INC.
To: MASON, W. ANTHONY
Reel/Frame 042975/0522 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 1, 2014
From: MASON, W. ANTHONY
To: OSR OPEN SYSTEMS RESOURCES, INC.
Reel/Frame 033221/0156 →