Method and system for multithreaded processing using errands
First Claim
1. A method for programming a multithreaded application so as to minimize thread switching overheads and memory usage during processing of the application, the method comprising:
- a. writing a plurality of errands, the errands being functions performing specific tasks that collectively constitute the entire thread functionality; and
b. forming one or more itineraries corresponding to a thread, the itineraries controlling the execution of the errands in the desired manner.
1 Assignment
0 Petitions
Accused Products
Abstract
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 functionality. 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.
-
Citations
23 Claims
-
1. A method for programming a multithreaded application so as to minimize thread switching overheads and memory usage during processing of the application, the method comprising:
-
a. writing a plurality of errands, the errands being functions performing specific tasks that collectively constitute the entire thread functionality; and
b. forming one or more itineraries corresponding to a thread, the itineraries controlling the execution of the errands in the desired manner. - View Dependent Claims (2, 3, 4)
-
-
5. A method for executing a multithreaded application, the multithreaded application having been programmed using itinerarized threads, the itinerarized threads comprising standard thread constructs as well as itineraries, the itineraries being lists of errands, the errands being functions performing specific tasks, the method comprising:
-
a. compiling the application code;
b. scheduling the plurality of threads for execution;
c. executing threads running standard thread constructs in normal mode, the normal mode of execution being thread execution in accordance with standard thread execution methodology, the normal-mode execution of a thread being carried out using an execution stack associated with the thread;
d. executing itineraries in itinerary mode, the itinerary mode being a special thread execution scheme for executing the complete itinerary, the itinerary mode execution of a thread being carried out using a kernel stack;
e. exiting the itinerary mode of execution when the complete itinerary corresponding to a thread has been executed, the thread being subsequently executed in normal mode. - View Dependent Claims (6, 7, 8, 9, 10, 11, 12)
-
-
13. A multithreaded application processing system executing a multithreaded application program, the program comprising a plurality of standard threads and itinerarized threads, the standard threads having been written using standard thread methodology, the itinerarized threads comprising standard thread constructs and itineraries, the itineraries being lists of errands, the errands being functions performing specific tasks, the system comprising:
-
a. a compiler compiling the application program;
b. a memory storing information related to the threads, the memory comprising;
i. a plurality of thread stacks, each of the thread stacks being associated with a thread, the stack being stored with context information pertaining to the thread, the context information being the information set required for processing of the thread; and
ii. a kernel stack, the kernel stack being used by the itinerarized threads while the itineraries are being processed;
c. a processor processing the plurality of threads, the processor accessing the memory for information pertaining to the plurality of threads; and
d. an operating system scheduling and managing execution of the plurality of threads, the operating system executing the standard threads and standard thread constructs of itinerarized threads in accordance with standard thread execution methodology, the operating system executing itineraries in itinerary mode, the itinerary mode being a thread execution scheme for executing the complete itinerary. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
-
20. An itinerary running service for executing an itinerarized thread in itinerary mode, the itinerarized thread comprising standard thread constructs and itineraries, the itineraries being lists of errands, the errands being small tasks needed to be performed during thread execution, the itinerary mode being a special thread execution scheme for executing the complete itinerary, the itinerary running service receiving the itinerary from an operating system scheduler, the itinerary running service comprising:
-
a. means for providing various preemptive and non-preemptive services to the itinerary, the preemptive services being specific activities that may preempt the thread to preempt, the non-preemptive services being specific activities that do not need the thread to preempt;
b. an itinerary building service providing pre-programmed standard errands and enabling specification of application specific errands, the standard errands being various preemptive and non-preemptive services provided by the system, the application specific errands being special program constructs built into the itinerary;
c. means for executing the errands in the itinerary sequentially; and
d. means for blocking the itinerary when one of the errands blocks. - View Dependent Claims (21)
-
-
22. A computer program product for executing a multithreaded application, the application having been programmed using itinerarized threads, the itinerarized threads comprising standard thread constructs as well as itineraries, the itineraries being lists of errands, the errands being functions performing specific tasks, the computer program product comprising:
-
a computer readable medium comprising;
a. program instruction means for compiling the application code;
b. program instruction means for scheduling the plurality of threads for execution; and
c. program instruction means for executing the plurality of threads in a manner that minimizes thread switching overheads and memory usage during the execution, the standard threads being executed using thread stacks associated with the threads as execution stacks, the itineraries being executed using kernel stack as their execution stack. - View Dependent Claims (23)
-
Specification