Method and apparatus for pausing execution in a processor or the like
First Claim
1. A method of pausing execution of instructions in a thread, comprising:
- determining if a first instruction for a first thread is an instruction of a first type;
preventing instructions of said first thread from being processed for execution for a period of time if said first instruction is decoded to be of a first type while instructions from a second thread can be processed for execution; and
resuming execution of said first thread responsive to retirement of said first instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for pausing execution of instructions from a thread is described. In one embodiment, a pause instruction is implemented as two instructions or microinstructions: a SET instruction and a READ instruction. When a SET flag is retrieved for a given thread, the SET instruction sets a Bit flag in memory indicating that execution for the thread has been paused. The SET instruction is placed in the pipeline for execution. The following READ instruction for that thread, however, is prevented from entering the pipeline until, the SET instruction is executed and retired (resulting in a clearing of the Bit flag). Once the Bit flag has been cleared, the READ instruction is placed in the pipeline for execution. During the time that processing of one thread is paused, the execution of other threads may continue.
-
Citations
33 Claims
-
1. A method of pausing execution of instructions in a thread, comprising:
-
determining if a first instruction for a first thread is an instruction of a first type;
preventing instructions of said first thread from being processed for execution for a period of time if said first instruction is decoded to be of a first type while instructions from a second thread can be processed for execution; and
resuming execution of said first thread responsive to retirement of said first instruction. - View Dependent Claims (2, 3, 4, 5)
processing said second microinstruction for execution when said value stored in memory is reset.
-
-
5. The method of claim 4 wherein said value stored in memory is reset when said first microinstruction is retired.
-
6. A method comprising:
-
determining if a first instruction for a first thread is an instruction of a first type;
initiating a counter upon decoding said instruction of said first type; and
preventing instructions of said first thread from being processed for execution until said counter reaches a predetermined value while instructions for a second thread are processed for execution. - View Dependent Claims (7, 8)
-
-
9. A method comprising:
-
receiving a pause instruction from a first thread at a decode unit in a processor system;
preventing instructions of said first thread from being processed for execution for a period of time while instructions from a second thread can be processed for execution; and
resuming processing of said first thread for execution in response to retirement of said pause instruction. - View Dependent Claims (10)
-
-
11. An apparatus pausing execution of instructions in a thread, comprising:
-
a decode unit to determine if a first instruction for a first thread is an instruction of a first type, said decode unit to prevent instructions of said first thread from being processed for execution for a period of time while instructions from a second thread can be processed for execution, said decode unit further to cause resumption of processing instructions of said first thread in response to retirement of said first instruction. - View Dependent Claims (12, 13, 14, 15)
a memory, wherein said first microinstruction causes a value to be stored in memory for said first thread.
-
-
14. The apparatus of claim 13 wherein said decode unit processes said second microinstruction for execution when said value stored in memory is reset.
-
15. The apparatus of claim 14 further comprising:
a retire unit coupled to said decode unit wherein said retire unit causes said value stored in memory to be reset when said first microinstruction is retired by said retire unit.
-
16. An apparatus comprising:
-
a decode unit to determine if a first instruction for a first thread is an instruction of a first type;
a counter coupled to said decode unit, said counter to be initiated if said first instruction for said first thread is decoded to be an instruction of said first type, said decode unit to prevent instructions of said first thread from being processed for execution until said counter reaches a predetermined value; and
wherein instructions for a second thread can be processed for execution while instructions for execution while instructions of said first thread are prevented from being processed and wherein said decode unit resumes processing instructions of said first thread in response to said first instruction. - View Dependent Claims (17, 18)
-
-
19. An apparatus for reducing power consumption comprising:
-
a processor including a decode unit to receive a first instruction from a first thread in said processor system, said decode unit to prevent instructions of said first thread from being processed for execution for a period of time in response to decoding of a first instruction of said first thread while instructions from a second thread can be processed for execution, and said decode unit further to resume allowing instructions of said first thread to be processed for execution in response to retirement of said first instruction. - View Dependent Claims (20)
-
-
21. A processor comprising:
a decode unit to receive a first instruction from a first thread and to cause said processor to suspend processing of instructions from said first thread for a period of time in response to decode of said first instruction, wherein said decode unit is able to process instructions from a second thread during said period, and said decode unit to resume processing instructions from said first thread in response to retirement of said first instruction. - View Dependent Claims (22, 23, 24, 25)
-
26. A method comprising:
-
receiving instructions for a first thread;
decoding a first instruction from said first thread into a second instruction and a third instruction;
setting a flag to indicate presence of said second instruction;
sending said second instruction into a pipeline;
holding said third instruction from entering said pipeline if said flag is set, wherein said first thread is paused from being processed;
executing said second instruction;
resetting said flag upon retirement of said second instruction; and
releasing said third instruction into said pipeline after said flag is reset, wherein processing of said first thread is resumed. - View Dependent Claims (27)
freeing processing resources to process a second thread while said first thread is paused; and
processing instructions of said second thread.
-
-
28. A method comprising:
-
decoding a first instruction from a first thread into a second instruction and a third instruction;
holding said third instruction from entering an instruction pipeline until said second instruction retires;
executing said second instruction; and
releasing said third instruction into said instruction pipeline. - View Dependent Claims (29, 30)
suspending processing of instructions from said first thread subsequent to said first instruction;
processing instructions from a second thread while said first thread is suspended; and
resuming processing of instructions from said first thread in response to retirement of said third instruction.
-
-
30. The method of claim 29 further comprising:
-
setting a flag to in response to said second instruction; and
resetting said flag in response upon retirement of said second instruction.
-
-
31. A method comprising:
-
loading a counter with a first value in response to decoding of a first instruction of a first thread;
pausing processing of said first thread, wherein instructions subsequent to said first instruction of said first thread are paused from entering a pipeline until said counter counts to a predetermined value;
processing a second thread while said first thread is paused; and
resuming processing of said first thread after said counter counts to said predetermined value.
-
-
32. The method of 31 wherein said first instruction includes an operand, said operand to be loaded into said counter as said first value.
-
33. The method of 31 wherein said first value corresponds to a predetermined period of time.
Specification