Direct switching of software threads by selectively bypassing run queue based on selection criteria
First Claim
Patent Images
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.
4 Assignments
0 Petitions
Accused Products
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.
11 Citations
17 Claims
-
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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
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. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
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.
-
Specification