Method and system for reducing context switch times
First Claim
Patent Images
1. A method comprising:
- detecting a context switch request;
in response to detecting the context switch request, performing the operations;
halting a master thread from creating new worker threads,estimating a retirement rate of a state associated with a plurality of worker threads; and
determining, based upon the estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and the state of the worker threads saved to a memory;
wherein in response to the determining, halting and saving the state of the worker threads to the memory if the rate of saving is greater than the estimated state retirement rate, and wherein the rate of saving is determined based on a portion of a bandwidth available to write to the memory.
2 Assignments
0 Petitions
Accused Products
Abstract
An apparatus for managing resource in a multithreaded system, and attempting to increase the speed in which task switching occurs by controlling when thread state is stored to memory. The apparatus includes a thread dispatcher circuit capable of determining, based upon an estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and saved the state of the worker threads.
15 Citations
32 Claims
-
1. A method comprising:
-
detecting a context switch request; in response to detecting the context switch request, performing the operations; halting a master thread from creating new worker threads, estimating a retirement rate of a state associated with a plurality of worker threads; and determining, based upon the estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and the state of the worker threads saved to a memory; wherein in response to the determining, halting and saving the state of the worker threads to the memory if the rate of saving is greater than the estimated state retirement rate, and wherein the rate of saving is determined based on a portion of a bandwidth available to write to the memory. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An article comprising a machine storage medium having a plurality of machine accessible instructions, wherein when the instructions are executed, the instructions provide for:
-
detecting a context switch request; and in response to detecting the context switch request, performing the steps of; halting a master thread from creating new worker threads, estimating a retirement rate of a state associated with a plurality of worker threads, and determining, based upon the estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and the state of the worker threads saved to a memory, wherein in response to the determining, halting and saving the state of the worker threads to the memory if the rate of saving is greater than the estimated state retirement rate, and wherein the rate of saving is determined based on a portion of a bandwidth available to write to the memory. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. An apparatus comprising:
-
a processor executing a plurality of worker threads having state information; a thread monitoring circuit perform; estimating a retirement rate of a state associated with the worker threads; and a thread dispatcher circuit perform; detecting a context switch request, in response to detecting the context switch request, perform; determining, based upon the estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and the state of the worker threads saved to a memory, and in response to the determining, halting and saving the state of the worker threads to the memory if the rate of saving is greater than the estimated state retirement rate, and wherein the rate of saving is determined based on a portion of a bandwidth available to write to the memory. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24)
-
-
25. A system comprising:
-
a processor executing a plurality of worker threads having state information; a memory storing the state information of the worker threads when the threads are not being executed by the processor a thread monitoring circuit perform; estimating a retirement rate of a state associated with the worker threads; and a thread dispatcher circuit perform; detecting a context switch request, in response to detecting the context switch request, determining, based upon the estimated state retirement rate associated with the worker threads and a rate of saving state of the worker threads, if the worker threads should be halted and the state of the worker threads saved to a memory, and in response to the determining, halting and saving the state of the worker threads to the memory if the rate of saving is greater than the estimated state retirement rate, and wherein the rate of saving is determined based on a portion of a bandwidth available to write to the memory. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32)
-
Specification