Claims
- 1. A method of executing a multiscalar program within a multiscalar processor having a plurality of processing elements and a thread scheduler, said method comprising:providing a multiscalar program including a plurality of threads that are each composed of a plurality of instructions of a selected instruction set architecture, each of said plurality of threads having a single entry point and a plurality of possible exit points, wherein one of said plurality of instructions forms said single entry point and others of said plurality of instructions form said plurality of possible exit points, said multiscalar program further including thread code descriptive of said plurality of threads, said thread code including a plurality of data structures that are each associated with a respective one of said plurality of threads and each specify possible exit points of the associated thread; supplying a third data structure among said plurality of data structures to said thread scheduler, said third data structure being associated with a third thread among said plurality of threads, wherein said third data structure associates a first data structure of a first thread among said plurality of threads with a first possible exit point of said third thread and associates a second data structure of a second thread among said plurality of threads with a second possible exit point of said third thread; assigning said third thread to a selected one of said plurality of processing elements for execution; after said supplying and prior to completing execution of said third thread, selecting, within said thread scheduler, from among said first and said second possible exit points of said third thread; and in response to said selection, loading a corresponding one of said first and second data structures into said thread scheduler for processing.
- 2. The method of claim 1, said third data structure further including an indication of a base address of said third thread, wherein said step of assigning said third thread to a selected one of said plurality of processing elements for execution comprises the step of supplying said selected one of said plurality of processing element with said indication of said base address of said third thread.
- 3. The method of claim 1, wherein said selecting step comprises the step of predicting one of said first and said second possible exit points of said third thread.
- 4. The method of claim 1, wherein said third data structure includes an indication of a set of auxiliary instructions to be dynamically inserted into said third thread during execution, wherein said assigning step further includes the step of providing said indication of said set of auxiliary instructions to said selected one of said plurality of processing elements.
- 5. The method of claim 1, wherein said multiscalar program includes a threading initiation instruction, said threading initiation instruction specifying said third data structure, wherein said supplying step is performed in response to said multiscalar processor processing said threading initiation instruction.
- 6. The method of claim 5, wherein said supplying step is performed in response to processing said threading initiation instruction only if said multiscalar processor is not speculatively executing at least one thread among said plurality of threads.
- 7. A multiscalar processor for executing a multiscalar program, said multiscalar program including first, second, and third threads that are each composed of a plurality of instructions of a selected instruction set architecture, said third thread having an instruction among said plurality forming a single entry point and others of said plurality of instructions forming first and second possible exit points, said multiscalar program further including first, second, and third data structures that are each associated with a corresponding one of said first, second, and third threads, said multiscalar processor comprising:a plurality of processing elements that execute threads; a thread scheduler, including: means, responsive to receipt of said third data structure, said third data structure associating said first data structure with said first possible exit point and associating said second data structure with a second possible exit point, for assigning said third thread to a selected processing element among said plurality of processing elements for execution; means for selecting one of said first and said second possible exit points of said third thread prior to said selected processing element completing execution of said third thread; and means, responsive to said selection, for loading an associated one of said first and second data structures into said thread scheduler for processing.
- 8. The multiscalar processor of claim 7, said third data structure further including an indication of a base address of said third thread, wherein said means for assigning said third thread to a selected one of said plurality of processing elements for execution comprises means for supplying said selected one of said plurality of processing elements with said indication of said base address of said third thread.
- 9. The multiscalar processor of claim 7, wherein said means for selecting comprises an exit prediction mechanism.
- 10. The multiscalar processor of claim 7, wherein said third data structure includes an indication of a set of auxiliary instructions to be dynamically inserted into said third thread during execution, wherein said means for assigning further includes means for providing said indication of said set of auxiliary instructions to said selected one of said plurality of processing elements.
- 11. The multiscalar processor of claim 7, wherein said multiscalar program includes a threading initiation instruction within said instruction set architecture, said threading initiation instruction specifying said third data structure, said multiscalar processor including means for supplying said third data structure to said thread scheduler in response to said multiscalar processor processing said threading initiation instruction.
- 12. The multiscalar processor of claim 11, wherein said means for supplying supplies said third data structure to said thread scheduler in response to processing of said threading initiation instruction only if said multiscalar processor is not speculatively executing at least one thread among said plurality of threads.
- 13. The method of claim 1, wherein each possible exit point is a final instruction within a thread executed prior to termination of execution of the thread such that any subsequent execution of the thread must begin at the single entry point of the thread.
- 14. The method of claim 1, wherein assigning said third thread comprises assigning said third thread to a selected one of said plurality of processing elements, utilizing said thread scheduler, in response to receipt of said third data structure by said thread scheduler.
- 15. The multiscalar processor of claim 7, wherein each of said first and said second possible exit points is a final instruction within said third thread executed prior to termination of execution of said third thread such that any subsequent execution of the third thread must begin at the single entry point of the third thread.
- 16. A method, comprising:providing a program including a plurality of threads, each of said plurality of threads including a plurality of instructions that each form a respective one of a plurality of possible thread exit points; initiating execution of a first thread among said plurality of threads; prior to executing an actual thread exit point of the first thread, predicting which of the plurality of possible thread exit points of the first thread will be the actual thread exit point; and in response to said prediction, initiating scheduling of a second thread among said plurality of threads that is associated with the possible thread exit point that was predicted.
- 17. A processor, comprising:a plurality of processing elements for concurrently executing at least two of a plurality of threads of a program, each of said plurality of threads including a plurality of instructions that each form a respective one of a plurality of possible thread exit points; a thread scheduler, including: means for initiating execution of a first thread among said plurality of threads; means for predicting which of the plurality of possible thread exit points of the first thread will be the actual thread exit point prior to execution of the actual thread exit point of the first thread; and means, responsive to said prediction, for initiating scheduling of a second thread among said plurality of threads that is associated with the possible thread exit point that was predicted.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is related to the following patent applications, which are incorporated herein by reference:
(1) Application Ser. No. 08/767,488, “METHOD AND SYSTEM FOR CONSTRUCTING A MULTISCALAR PROGRAM INCLUDING A PLURALITY OF THREAD DESCRIPTORS THAT EACH REFERENCE A NEXT THREAD DESCRIPTOR TO BE PROCESSED,” filed of even date herewith;
(2) Application Ser. No. 08/767,492, entitled “PROCESSOR AND METHOD FOR DYNAMICALLY INSERTING AUXILIARY INSTRUCTIONS WITHIN AN INSTRUCTION STREAM DURING EXECUTION,” filed of even date herewith;
(3) Application Ser. No. 08/767,489, entitled “METHOD AND SYSTEM FOR CONCURRENTLY EXECUTING MULTIPLE THREADS CONTAINING DATA DEPENDENT INSTRUCTIONS,” filed of even date herewith;
(4) Application Ser. No. 08/767,491, entitled “METHOD AND SYSTEM FOR CONSTRUCTING A PROGRAM INCLUDING A NAVIGATION INSTRUCTION,” filed of even date herewith; and
(5) Application Ser. No. 08/767,490 entitled “METHOD AND SYSTEM FOR CONSTRUCTING A PROGRAM INCLUDING OUT-OF-ORDER THREADS AND PROCESSOR AND METHOD FOR EXECUTING THREADS OUT-OF-ORDER,” filed of even date herewith.
US Referenced Citations (20)
Non-Patent Literature Citations (3)
Entry |
Gurindar Sohi et al., Multiscalar Processors, University of Wisconsin—Madison, Computer Sciences Department, 1995, pp. 414-424. |
“Compilers—Principles,Techniques, and Tools” by Alfred V. Aho et al., 1986.* |
“Multiscalar Processors” by Sohi et al., 1995. |