Claims
- 1. A method in a computer system for returning a stream to a task executing an operating system call that is blocked, the computer system having a processor with multiple streams, the method comprising:
under control of the operating system executing on a stream, invoking a function provided by the task; under control of the invoked function, executing instructions of the task on that stream; and under control of the operating system, notifying the task when the operating system call is complete.
- 2. The method of claim 1 wherein the notifying includes
invoking a function provided by the task using a stream of the operating system; and under control of that invoked function,
indicating that the operating system call is complete; and invoking another operating system call to return the operating system stream to the operating system.
- 3. The method of claim 1 wherein the executing of instructions on that stream includes
indicating that a thread that invoked the operating system call is blocked; and executing another thread on that stream.
- 4. A system for returning a stream to a task executing an operating system call that is blocked, the system having a processor with multiple streams and comprising:
a component that, under control of the operating system executing on a stream, invokes a function provided by the task; a component that, under control of the invoked function, executes instructions of the task on that stream; and a component that, under control of the operating system, notifies the task when the operating system call is complete.
- 5. The system of claim 4 wherein the notification includes
invoking a function provided by the task using a stream of the operating system; and under control of that invoked function,
indicating that the operating system call is complete; and invoking another operating system call to return the operating system stream to the operating system.
- 6. The system of claim 4 wherein the instructions of the test on that stream include
an indication that a thread that invoked the operating system call is blocked; and execution of another thread on that stream.
- 7. A method in a computer system for assigning a processor resource to a thread of a task, the method comprising:
under control of a thread of the task, invoking an operating system call that will block and wait for the occurrence of an event; and under control of the operating system, when the call is blocked, invoking a routine of the task so that the routine can assign the processor resource to another thread of the task.
- 8. The method of claim 7 wherein the processor resource is a stream of a processor that supports multiple streams.
- 9. The method of claim 7 wherein the task registers the routine with the operating prior to invoking the operating system call.
- 10. The method of claim 7 including notifying the task when a operating system call completes.
- 11. A system for assigning a processor resource to a thread of a task, the system comprising:
a component for under control of a thread of the task, invoking an operating system call that will block and wait for the occurrence of an event; and a component for, under control of the operating system, invoking a routine of the task so that the routine can assign the processor resource to another thread of the task.
- 12. The system of claim 11 wherein the processor resource is a stream of a processor that supports multiple streams.
- 13. The system of claim 11 wherein the task registers the routine with the operating prior to invoking the operating system call.
- 14. The system of claim 11 including notifying the task when a operating system call completes.
- 15. A method in a computer system for returning a stream to a user program, the computer system having an operating system, the method comprising:
under control of the operating system,
when an operating system call in a stream will block, invoking a first function of a task that will return the stream to the task; and when the operating system call becomes unblocked, invoking a second function of the task.
- 16. The method of claim 15 wherein the operating system invokes the first function using the stream that will block.
- 17. The method of claim 16 wherein invoking the first function returns the stream to the user program.
- 18. The method of claim 17 wherein the user program selects a thread that is not blocked for execution on the stream.
- 19. The method of claim 15 wherein the second function schedules for restarting a thread that was blocked on the operating system call that was blocked.
- 20. The method of claim 15 wherein the second function returns a stream provided by the operating system.
- 21. A method in a computer system for returning a stream to a user program, the computer system having an operating system, the method comprising:
under control of the user program, invoking an operating system call; executing the operating system call in a user stream of the user program; and under control of the operating system, when the operating system call will block,
when a thread making the operating system call is locked, waiting for the operating system call to become unblocked; and when a thread making the operating system call is not locked,
invoking a first function of the user program that will return the stream to the task; under control of a trap handler routine, placing the thread in a blocked pool and selecting another thread to execute on the stream; and when the operating system call becomes unblocked, invoking a second function of the user program in a stream of the operating system.
- 22. The method of claim 21 wherein the second function schedules for restarting a thread that was blocked on the operating system call that was blocked.
- 23. The method of claim 21 wherein the second function returns a stream provided by the operating system.
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 |
10663897 |
Sep 2003 |
US |