×

Task swap out in a multithreaded environment

  • US 20040088711A1
  • Filed: 09/10/2003
  • Published: 05/06/2004
  • Est. Priority Date: 11/13/1998
  • Status: Active Grant
First Claim
Patent Images

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 all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×