Task swap out in a multithreaded environment
First Claim
1. A method in a computer system for preparing a task to be swapped out from processor utilization, the computer system having multiple processors and an operating system, each processor having multiple streams for simultaneously executing threads of the task, the task having one or more teams of threads, each team representing threads executing on a single processor, the method comprising:
- raising an exception for each stream of each processor currently executing a thread of the task; and
in response to the raising of the exception, for each stream executing a thread, saving a state of the stream;
determining whether the stream is a team master stream;
when the stream is not the team master stream, quitting the stream;
when the stream is the team master stream, waiting for all other streams executing threads in the same team to quit;
determining whether the stream is a task master stream, when the stream is not the task master stream, notifying the operating system that the team for this processor is ready to be swapped out;
when the stream is the task master stream, waiting for all other teams to notify the operating system that the team is ready to be swapped out; and
notifying the operating system that the task is ready to be swapped out.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system that prepares a task for being swapped out from processor utilization that is executing on a computer with multiple processors that each support multiple streams. The task has one or more teams of threads, where each team represents threads executing on a single processor. The task designates, for each stream that is executing a thread, one stream as a team master stream and one stream as a task master stream. For each team master stream, the task notifies the operating system that the team is ready to be swapped out when each other thread of the team has saved its state and has quit its stream. Finally, for the task master stream, the task notifies the operating system that the task is ready to be swapped when it has saved its state and each other team has notified that it is ready to be swapped out.
99 Citations
47 Claims
-
1. A method in a computer system for preparing a task to be swapped out from processor utilization, the computer system having multiple processors and an operating system, each processor having multiple streams for simultaneously executing threads of the task, the task having one or more teams of threads, each team representing threads executing on a single processor, the method comprising:
-
raising an exception for each stream of each processor currently executing a thread of the task; and
in response to the raising of the exception, for each stream executing a thread, saving a state of the stream;
determining whether the stream is a team master stream;
when the stream is not the team master stream, quitting the stream;
when the stream is the team master stream, waiting for all other streams executing threads in the same team to quit;
determining whether the stream is a task master stream, when the stream is not the task master stream, notifying the operating system that the team for this processor is ready to be swapped out;
when the stream is the task master stream, waiting for all other teams to notify the operating system that the team is ready to be swapped out; and
notifying the operating system that the task is ready to be swapped out. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for preparing a task to be swapped out from processor utilization, the system having multiple processors and an operating system, each processor having multiple streams for executing threads of the task, the task having one or more teams of threads, each team representing threads executing on a single processor, each thread having a state, the system comprising:
-
a component that raises an exception for each stream of each processor currently executing a thread of the task; and
an exception handler for each thread that, in response to the raising of an exception for the stream upon which the thread is executing, saves the state of the thread;
determines whether it is a team master stream;
when the stream is not the team master stream, quits;
when the stream is the team master stream, waits for all other streams executing threads in the same team to quit;
determines whether it is a task master stream; and
when it is not the task master stream, notifies the operating system that the team for this processor is ready to be swapped out; and
when the stream is the task master stream, waits for all other teams to notify the operating system that the team is ready to be swapped out; and
notifies the operating system that the task is ready to be swapped out. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A method in a computer system for preparing a task to be swapped out from processor utilization, the computer system having multiple processors and an operating system, each processor having multiple streams for executing threads of the task, the task having one or more teams of threads, each team representing threads executing on a single processor, the method comprising:
-
for each team, designating one stream that is executing a thread as a team master stream;
designating one stream that is executing a thread as a task master stream for the task;
for each team master stream, notifying the operating system that the team is ready to be swapped out when each other thread of the team has quit its stream; and
for the task master stream, notifying the operating system that the task is ready to be swapped when each of the other teams have notified the operating system that that team is ready to be swapped out. - View Dependent Claims (12, 13, 14, 15, 16)
-
-
17. A system for preparing a task to be swapped out from processor utilization, the system having multiple processors and an operating system, each processor having multiple streams for executing threads of the task, the task having one or more teams of threads, each team representing threads executing on a single processor, the system comprising:
-
a component that, for each team, designates one stream that is executing a thread as a team master stream; and
designates one stream that is executing a thread as a task master stream for the task;
a component that, for each team master stream, notifies the operating system that the team is ready to be swapped out when each other thread of the team has quit its stream; and
a component that, for the task master stream, notifies the operating system that the task is ready to be swapped out when each of the other teams have notified the operating system that that team is ready to be swapped out. - View Dependent Claims (18, 19, 20, 21, 22)
-
-
23. A method in a computer system for preparing a task to be swapped out from processor utilization, the computer system having a processor and an operating system, the method comprising:
-
saving state information of each stream of the processor that is executing a thread;
under control of each stream that is not a master stream, quitting the stream; and
under control of the master stream, waiting for each stream that is not a master stream to quit; and
providing a notification that the task is ready to be swapped out. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. A system for preparing a task in a computer system to be swapped out, the computer system having a processor and an operating system, the processor having streams for executing threads of the task, each stream having a state, the system comprising:
-
means for saving the state of each stream that is executing a thread;
means for quitting each stream that is not a master stream; and
means for, when the stream is the master stream, waiting for each stream that is not a master stream to quit; and
notifying the operating system that the task is ready to be swapped out. - View Dependent Claims (30, 31, 32, 33, 34)
-
-
35. A method in a computer system for restarting execution of a task that has been swapped out of processor utilization, the method comprising:
-
starting execution of a master stream; and
under control of the master stream, creating a stream corresponding to each stream that quit when the task was swapped out; and
initializing each created stream based on state information saved when the stream quit. - View Dependent Claims (36, 37, 38, 39, 40)
-
-
41. A method in a computer system for restarting execution of a task that has been swapped out of processor utilization, the method comprising:
-
starting execution of a task master stream;
initializing the task master stream based on information saved when the task master stream quit;
under control of the task master stream, starting team master streams; and
under control of each team master stream, creating a stream corresponding to each stream associated with the master stream that quit when the task was swapped out; and
initializing each created stream based on state information saved when the stream quit. - View Dependent Claims (42, 43)
-
-
44. A method in a computer system for preparing a task to be swapped out from utilization of processors, the method comprising:
-
saving state information for each stream of the task; and
for each processor, when no stream of the task executing on the processor is a task master stream, providing notification that the streams of the processor are ready to be swapped out; and
when a stream of the task executing on the processor is a task master stream, waiting for a stream of each other processor to provide notification; and
providing notification that the task is ready to be swapped. - View Dependent Claims (45, 46, 47)
-
Specification