摘要 |
The disclosed invention provides a system, method and computer program product for minimizing thread-switching overheads and memory usage while processing multithreaded application programs. A new type of thread called a floating thread is provided. Floating threads do not require any reference information to be saved in the main memory when the thread is swapped out. A floating thread compiler is used for compiling the main level function of the floating thread. All preemptive functions are called through the main level of floating threads and thread swapping occurs across this main level only. The reference information of a preempted floating thread is minimal and can be stored in fast memory. Execution of a preempted thread resumes not from the point of preemption but at the start of the function that caused the thread to preempt. |