摘要 |
The disclosed invention provides a system, method and computer program product for processing multithreaded application programs. The application threads are written using itineraries, which are lists of errands. The errands are small tasks that collectively constitute the entire thread's functionally. An itinerary is executed via an itinerary running service provided by the operating system, using the kernel stack as its execution stack. When an itinerary is encountered in a thread, the thread is preempted and the itinerary execution is taken over by the itinerary running service in itinerary mode. The thread remains preempted in normal mode until the complete itinerary has been executed. Within the itinerary mode, the errands are executed in the sequence specified by the itinerary, until an errand blocks. The itinerary is resumed from the same errand that previously blocked the thread. |