IP Library Granted Patent US 8,584,138
Granted Patent B2
US 8,584,138 · App. 11/888,232 · Granted Nov 12, 2013

Direct switching of software threads by selectively bypassing run queue based on selection criteria

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 8,584,138
App. No.
11/888,232
Granted
Nov 12, 2013
Kind
B2
Abstract

An embodiment of the invention provides an apparatus and a method for direct switching of software threads. The apparatus and method include performing acts including: issuing a wakeup call from a first thread to a second thread in a sleep state; removing the second thread from the sleep state; switching out the first thread from the resource; switching in the second thread to the resource; and running the second thread on the resource.

Claims (53)

1. A method comprising:

providing a run queue to establish an order for a scheduler to schedule software threads for execution;

using a first thread to work on a resource;

using the first thread to issue a wakeup call to a second thread that is in a sleep state in a sleep queue;

removing the second thread from the sleep state;

switching out the first thread from working on the resource;

checking predetermined selection criteria to determine if direct switching of the second thread into the resource is permissible;

using the wakeup call to trigger the scheduler to selectively bypass the ordering established by the run queue and switch in the second thread to allow the second thread to work on the resource based on the predetermined selection criteria; and

running the second thread on the resource for a remaining timeslice value that is not used by the first thread.

2. The method of claim 1 , wherein the switching out the first thread comprises: placing the first thread in the run queue.

3. The method of claim 1 , further comprising:

checking the selection criteria to determine if direct switching of the second thread into the resource is permissible.

4. The method of claim 1 , wherein the resource comprises a processor resource.

5. The method of claim 1 , further comprising:

switching out the first thread and switching in the second thread to the resource if the first thread and second thread are bound to a same locality domain.

6. The method of claim 1 , further comprising:

switching out the first thread and switching in the second thread to the resource if the first thread and second thread are bound to different locality domains and the second thread has been in the sleep state beyond a threshold time value.

7. The method of claim 1 , further comprising:

avoiding in switching out the first thread and avoiding in switching in the second thread to the resource if the first thread and second thread are bound to different locality domains and the second thread has not been in the sleep state beyond a threshold time value.

8. The method of claim 1 , further comprising:

switching out the first thread and switching in the second thread to the resource based on particular resources held by the first thread and resources that the second thread is waiting to obtain.

9. An apparatus comprising:

a processor;

a run queue to establish an order to execute software threads;

a first thread to work on a resource;

a second thread, to be placed in a sleep state in a sleep queue and being issued a wakeup call by the first thread; and

a scheduler configured to, in direct response to the wakeup call, remove the second thread from the sleep state, switch out the first thread from working on the resource, check the selection criteria to determine if direct switching of the second thread into the resource is permissible, selectively bypass the ordering established by the run queue, and switch in the second thread to allow the second thread to work on the resource based on the predetermined selection criteria,

wherein the second thread is configured to run on the resource for a remaining timeslice value that is not used by the first thread.

10. The apparatus of claim 9 , wherein the scheduler is configured to switch out the first thread by placing the first thread in the run queue.

11. The apparatus of claim 9 , wherein the resource comprises a processor resource.

12. The apparatus of claim 9 , wherein the scheduler is configured to switch out the first thread and switch in the second thread to the resource if the first thread and second thread are bound to a same locality domain.

13. The apparatus of claim 9 , wherein the scheduler is configured to switch out the first thread and switch in the second thread to the resource if the first thread and second thread are bound to different locality domains and the second thread has been in the sleep state beyond a threshold time value.

14. The apparatus of claim 9 , wherein the scheduler is configured to avoid in switching out the first thread and avoid in switching in the second thread to the resource if the first thread and second thread are bound to different locality domains and the second thread has not been in the sleep state beyond a threshold time value.

15. The apparatus of claim 9 , wherein the scheduler is configured to switch out the first thread and switch in the second thread to the resource based on particular resources held by the first thread and resources that the second thread is waiting to obtain.

16. An apparatus for direct switching of software threads, the apparatus comprising:

a processor;

means for providing a run queue to establish an order for a scheduler to schedule software threads for execution;

means for using a first thread to work on a resource;

means for using the first thread to issue a wakeup call to a second thread that is in a sleep state in a sleep queue;

means for removing the second thread from the sleep state;

means for switching out the first thread from working on the resource;

means for using the scheduler to directly respond to the wakeup call by checking a selection criteria to determine if direct switching of the second thread into the resource is permissible, selectively bypassing the ordering established by the run queue and switching in the second thread to allow the second thread to work on the resource based on the predetermined selection criteria; and

means for running the second thread on the resource for a remaining timeslice value that is not used by the first thread.

17. An article of manufacture comprising:

a machine-readable non-transitory storage medium having stored thereon instructions to when executed by at least one processor cause said at least one processor to:

provide a run queue to establish an order for a scheduler to schedule software threads for execution;

use a first thread to work on a resource;

use the first thread to issue a wakeup call to a second thread that is in a sleep state in a sleep queue;

remove the second thread from the sleep state;

switch out the first thread from working on the resource;

check predetermined selection criteria to determine if direct switching of the second thread into the resource is permissible;

use the wakeup call to trigger the scheduler to selectively bypass the ordering established by the run queue and switch in the second thread to allow the second thread to work on the resource based on the predetermined selection criteria; and

run the second thread on the resource for a remaining timeslice value that is not used by the first thread.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2021
From: OT PATENT ESCROW, LLC
To: VALTRUS INNOVATIONS LIMITED
Reel/Frame 058897/0262 →
PATENT ASSIGNMENT, SECURITY INTEREST, AND LIEN AGREEMENT Recorded Jan 26, 2021
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP; HEWLETT PACKARD ENTERPRISE COMPANY
To: OT PATENT ESCROW, LLC
Reel/Frame 055269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 30, 2007
From: SANGILI, VASUDEVAN; SHARPE, EDWARD J.; PAREKH, HARSHADRAI
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 019689/0512 →