Method and apparatus for sharing a time quantum
AssigneeSun Microsystems, Inc.
InventorsKelvin K. Yue, Daniel A. Stein, Michael A. Sebrée
Life of this patent
Estimating the term…
Loading patent…
AssigneeSun Microsystems, Inc.
InventorsKelvin K. Yue, Daniel A. Stein, Michael A. Sebrée
Estimating the term…
A method and apparatus for allowing a first thread to “share” its remaining time quantum with a second thread when the first thread is blocked. A thread may be blocked, for example, if it is waiting for a resource such as a data file or a lock. A thread may also be blocked if it is waiting for an event, such as a user keystroke. If there is a thread on the run queue that “owns” the resource needed by the consumer thread, the blocked consumer thread transfers its right to execute for a remaining time quantum to the owner thread, and the owner thread executes next. If the threads are in a same process, this transfer means that no process context switch is required, since the consumer thread and the owner thread are threads of the same process. In addition, this transfer means that the time before the resource becomes available to the blocked consumer thread will be short. Similarly, if a consumer thread is blocked to await an event, such as a user keystroke, the blocked consumer thread's remaining time quantum are transferred to another thread in that is waiting on the run queue for its turn to execute. Again, if the threads are in a same process, this transfer avoids having to perform a context switch between processes.
A method of sharing a time quantum between threads, comprising the steps, performed by the data processing system, of:
A method of sharing a time quantum between a plurality of threads in a data processing system, comprising the steps, performed by the data processing system, of:
An apparatus to allow sharing a time quantum between threads in a process, comprising:
A computer program product, comprising:
A computer data signal embodied in a carrier wave and representing sequences of instructions which, when executed by a processor, cause the processor to share a time quantum between threads in a process by performing the steps of:
Dependencies are inferred from the claim text.