IPC분류정보
국가/구분 |
United States(US) Patent
등록
|
국제특허분류(IPC7판) |
|
출원번호 |
UP-0739739
(2003-12-18)
|
등록번호 |
US-7617499
(2009-11-23)
|
발명자
/ 주소 |
- Bradford, Jeffrey Powers
- Kossman, Harold F.
- Mullins, Timothy John
|
출원인 / 주소 |
- International Business Machines Corporation
|
대리인 / 주소 |
Wood, Herron & Evans, LLP
|
인용정보 |
피인용 횟수 :
10 인용 특허 :
16 |
초록
▼
An apparatus, program product and method initiate, in connection with a context switch operation, a prefetch of at least one instruction likely to be executed by a thread prior to resuming execution of that thread. As a result, once it is known that a context switch will be performed to a particular
An apparatus, program product and method initiate, in connection with a context switch operation, a prefetch of at least one instruction likely to be executed by a thread prior to resuming execution of that thread. As a result, once it is known that a context switch will be performed to a particular thread, one or more instructions may be prefetched on behalf of that thread so that when execution of the thread is resumed, those instructions are more likely to be cached, or at least in the process of being retrieved into cache memory, thus enabling a thread to begin executing instructions more quickly than if the thread was required to fetch those instructions upon resumption of its execution.
대표청구항
▼
What is claimed is: 1. A method of performing a context switch operation in a multithreaded computer, the method comprising initiating a prefetch of at least one instruction likely to be executed by a thread prior to resuming execution of the thread, wherein initiating the prefetch includes: retrie
What is claimed is: 1. A method of performing a context switch operation in a multithreaded computer, the method comprising initiating a prefetch of at least one instruction likely to be executed by a thread prior to resuming execution of the thread, wherein initiating the prefetch includes: retrieving state information associated with a working state of the thread, wherein the retrieved state information is stored during a prior context switch from the thread and includes a program counter; selecting a prefetch address for the instruction to be prefetched based upon the program counter from the retrieved state information; and initiating a prefetch of a cache line for the selected prefetch address and at least one immediately succeeding cache line; wherein initiating the prefetch includes storing prefetch control data for the thread in a buffer, the method further comprising retrieving the prefetch control data from the buffer and performing a prefetch operation based during the prefetch control data, and wherein initiating the prefetch occurs during suspension of the thread. 2. The method of claim 1, further comprising: restoring a working state for the thread; and resuming execution of the thread upon restoration of the working state therefor. 3. The method of claim 2, wherein initiating the prefetch is performed while restoring the working state for the thread. 4. The method of claim 2, wherein initiating the prefetch is performed prior to restoring the working state for the thread. 5. The method of claim 1, wherein the context switch operation includes context switching to another thread scheduled for execution prior to a context switch to the thread. 6. The method of claim 5, wherein initiating the prefetch is performed during at least one of restoring a working state for the other thread and resuming execution of the other thread. 7. The method of claim 5, initiating the prefetch is performed responsive to the thread being scheduled for execution immediately after execution of the other thread. 8. The method of claim 1, wherein the state information includes hardware prefetcher state information, and wherein initiating the prefetch further includes initializing a hardware prefetcher using the hardware prefetcher state information. 9. The method of claim 1, wherein initiating the prefetch includes initiating a prefetch based upon branch prediction information. 10. The method of claim 1, wherein initiating the prefetch includes instructing a hardware prefetcher to prefetch the instruction. 11. The method of claim 10, wherein instructing the hardware prefetcher is performed by an operating system in the computer. 12. The method of claim 1, wherein initiating the prefetch includes executing a touch instruction. 13. The method of claim 12, wherein executing the touch instruction is performed by an operating system in the computer. 14. The method of claim 1, further comprising retrieving the at least one instruction into a cache memory in response to initiating the prefetch. 15. The method of claim 1, further comprising initiating a prefetch of data likely to be processed by at least one instruction executed by the thread prior to resuming execution of the thread. 16. An apparatus, comprising: at least one processor configured to execute a plurality of threads; and program code configured to perform a context switch operation by initiating a prefetch of at least one instruction likely to be executed by a thread among a plurality of threads prior to resuming execution of the thread, wherein the program code is configured to initiate the prefetch by: retrieving state information associated with a working state of the thread, wherein the retrieved state information is stored during a prior context switch from the thread and includes a program counter; selecting a prefetch address for the instruction to be prefetched based upon the program counter from the retrieved state information; and initiating a prefetch of a cache line for the selected prefetch address and at least one immediately succeeding cache line; wherein the program code is further configured to initiate the prefetch by storing prefetch control data for the thread in a buffer, retrieving the prefetch control data from the buffer and performing a prefetch operation based upon the prefetch control data, and wherein the program code is configured to initiate the prefetch during suspension of the thread. 17. The apparatus of claim 16, wherein the program code is further configured to restore a working state for the thread and execute the thread upon restoration of the working state therefor. 18. The apparatus of claim 17, wherein the program code is configured to initiate the prefetch while restoring the working state for the thread. 19. The apparatus of claim 17, wherein the program code is configured to initiate the prefetch prior to restoring the working state for the thread. 20. The apparatus of claim 16, wherein the program code is configured to perform the context switch operation by context switching to another thread scheduled for execution prior to a context switch to the thread. 21. The apparatus of claim 20, wherein the program code is configured to initiate the prefetch during at least one of restoring a working state for the other thread and resuming execution of the other thread. 22. The apparatus of claim 20, wherein the program code is configured to initiate the prefetch responsive to the thread being scheduled for execution immediately after execution of the other thread. 23. The apparatus of claim 16, wherein the program code is configured to initiate the prefetch by initiating a prefetch based upon branch prediction information. 24. The apparatus of claim 16, further comprising a hardware prefetcher, wherein the state information includes hardware prefetcher state information, and wherein the program code is configured to initiate the prefetch by initializing the hardware prefetcher using the hardware prefetcher state information. 25. The apparatus of claim 16, further comprising a hardware prefetcher, wherein the program code is configured to initiate the prefetch by instructing the hardware prefetcher to prefetch the data. 26. The apparatus of claim 16, wherein the program code is configured to initiate the prefetch by executing a touch instruction. 27. The apparatus of claim 16, further comprising a cache memory, wherein the program code is further configured to retrieve the at least one instruction into the cache memory in response to initiating the prefetch. 28. The apparatus of claim 16, wherein the program code is further configured to initiate a prefetch of data likely to be processed by at least one instruction executed by the thread prior to resuming execution of the thread. 29. A program product, comprising: a recordable computer readable medium; and program code stored on the recordable computer readable medium and configured upon execution to perform a context switch to a thread among a plurality of threads in a multithreaded computer by initiating a prefetch of at least one instruction likely to be executed by the thread prior to resuming execution of the thread, wherein the program code is configured to initiate the prefetch by: retrieving state information associated with a working state of the thread, wherein the retrieved state information is stored during a prior context switch from the thread and includes a program counter; selecting a prefetch address for the instruction to be prefetched based upon the program counter from the retrieved state information; and initiating a prefetch of a cache line for the selected prefetch address and at least one immediately succeeding cache line; wherein the program code is further configured to initiate the prefetch by storing prefetch control data for the thread in a buffer, retrieving the prefetch control data from the buffer and performing a prefetch operation based upon the prefetch control data, and wherein the program code is configured to initiate the prefetch during suspension of the thread.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.