Claims
- 1. A method in a computer system for scheduling tasks, the method comprising:
notifying a task that it is being preempted from processor utilization; in response to the notification, receiving an indication from the task that it is ready to be swapped out and an indication as to whether the task is blocked; and when an indication that the task is blocked is received, deferring the swapping in of the task until an event occurs that may cause the task to become unblocked.
- 2. The method of claim 1 wherein the computer system is a multithreaded computer system.
- 3. The method of claim 1 wherein in response to the notification, the task saves its state.
- 4. The method of claim 1 wherein the event is an indication from an operating system.
- 5. The method of claim 1 wherein the indication of whether the task is blocked includes an identification of a thread of the task that is blocked.
- 6. The method of claim 1 including tracking a number of threads of the task that are blocked.
- 7. A system for scheduling tasks, the system comprising:
a component that notifies a task that it is being preempted from processor utilization; a component that, in response to the notification, receives an indication from the task that it is ready to be swapped out and an indication as to whether the task is blocked; and a component that, when an indication that the task is blocked is received, defers the swapping in of the task until an event occurs that may cause the task to become unblocked.
- 8. The system of claim 7 wherein the computer system is a multithreaded computer system.
- 9. The system of claim 7 wherein in response to the notification, the task saves its state.
- 10. The system of claim 7 wherein the event is an indication from an operating system.
- 11. The system of claim 7 wherein the indication of whether the task is blocked includes an identification of a thread of the task that is blocked.
- 12. The system of claim 7 including a component that tracks a number of threads of the task that are blocked.
- 13. A method in a computer system for scheduling tasks, the method comprising:
determining that a thread of a task is blocked; and sending an indication to an operating system that the task is ready to be swapped out and that the thread is blocked.
- 14. The method of claim 13 wherein the determining is done by the task.
- 15. The method of claim 13 including incrementing a variable relating to a number of blocked threads.
- 16. The method of claim 13 including receiving an indication from the operating system that the thread is no longer blocked.
- 17. The method of claim 16 including decrementing a variable relating to a number of blocked threads.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This is a divisional of and claims priority to U.S. patent application Ser. No. 09/192,205, filed on Nov. 13, 1998, and which is hereby incorporated herein by reference.
Divisions (1)
|
Number |
Date |
Country |
Parent |
09192205 |
Nov 1998 |
US |
Child |
10663895 |
Sep 2003 |
US |