System and method for supporting cooperative concurrency in a middleware machine environment
First Claim
1. A method for supporting cooperative concurrency in a priority queue of a middleware system, the priority queue including a calendar ring area that queues requests according to target response time and a lane area that queues requests moved from the calendar ring area to the lane area due to contention between consumers, the method comprising, with the middleware system, performing the method of:
- detecting that a first thread that is associated with a first consumer and a second thread that is associated with a second consumer contend to claim a request in the priority queue; and
handling the contention without locks to expose the contention, the handling including;
placing, by the first thread, the request from the calendar ring area that is under contention into the lane area of the priority queue;
releasing, by the first thread, the second thread; and
consuming the request in the lane area, by the second thread that is associated with the second consumer.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method can support cooperative concurrency in a priority queue. The priority queue, which includes a calendar ring and a fast lane, can detect one or more threads that contend to claim one or more requests in the priority queue. Then, a victim thread can place a request in the fast lane in the priority queue, and release a contending thread, which proceeds to consume the request in the fast lane.
84 Citations
20 Claims
-
1. A method for supporting cooperative concurrency in a priority queue of a middleware system, the priority queue including a calendar ring area that queues requests according to target response time and a lane area that queues requests moved from the calendar ring area to the lane area due to contention between consumers, the method comprising, with the middleware system, performing the method of:
-
detecting that a first thread that is associated with a first consumer and a second thread that is associated with a second consumer contend to claim a request in the priority queue; and handling the contention without locks to expose the contention, the handling including; placing, by the first thread, the request from the calendar ring area that is under contention into the lane area of the priority queue; releasing, by the first thread, the second thread; and consuming the request in the lane area, by the second thread that is associated with the second consumer. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system for supporting cooperative concurrency in a priority queue, comprising:
-
one or more microprocessors of a middleware system; a priority queue that runs on the one or more microprocessors, wherein the priority queue includes a calendar ring area that queues requests according to target response time and a lane area that queues requests moved from the calendar ring area to the lane area due to contention between consumers, and the priority queue operates to; detect that a first thread that is associated with a first consumer and a second thread that is associated with a second consumer contend to claim a request in the priority queue; and handle the contention without locks to expose the contention, the handling including; placing, by the first thread, the request from the calendar ring area that is under contention into the lane area of the priority queue; releasing, by the first thread, the second thread; and consuming the request in the lane area, by the second thread that is associated with the second consumer. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A non-transitory machine readable storage medium having instructions stored thereon that when executed cause a middleware system having a priority queue, the priority queue including a calendar ring area that queues requests according to target response time and a lane area that queues requests moved from the calendar ring area to the lane area due to contention between consumers, to perform the method comprising:
-
detecting that a first thread that is associated with a first consumer and a second thread that is associated with a second consumer contend to claim a request in the priority queue; and handling the contention without locks to expose the contention, the handling including; placing, by the first thread, the request from the calendar ring area that is under contention into the lane area of the priority queue; releasing, by the first thread, the second thread; and consuming the request in the lane area, by the second thread that is associated with the second consumer.
-
Specification