IP Library Granted Patent US 7,941,646
Granted Patent B2
US 7,941,646 · App. 11/967,430 · Granted May 10, 2011

Completion continue on thread switch based on instruction progress metric mechanism for a microprocessor

Assignee: Freescale Semicondoctor, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,941,646
App. No.
11/967,430
Filed
Dec 31, 2007
Granted
May 10, 2011
Kind
B2
Art Unit
2183
USPC
712/228
Abstract

A thread switch mechanism and technique for a microprocessor is disclosed wherein a processing of a first thread is completed, and a continuation of a second thread is initiated during completion of the first thread. In one form, the technique includes processing a first thread at a pipeline of a processing device, and initiating processing of a second thread at a front end of the pipeline in response to an occurrence of a context switch event. The technique can also include initiating a instruction progress metric in response the context switch event. The technique can further include enabling completion of processing of instructions of the first thread that are at a back end of the pipeline at the occurrence of the context switch event until an expiry of the instruction progress metric.

Claims (59)

1. A method comprising:

processing a first thread at a pipeline of a processing device;

initiating processing of a second thread at a front end of the pipeline in response to an occurrence of a context switch event;

initiating an instruction progress metric in response to the context switch event;

enabling completion of processing of instructions of the first thread that are at a back end of the pipeline at the occurrence of the context switch event until an expiry of the instruction progress metric; and

flushing instructions of the first thread from the back end of the pipeline in response to the expiry of the instruction progress metric.

2. The method of claim 1 , further comprising flushing instructions of the first thread that are at the front end of the pipeline in response to the occurrence of the context switch event.

3. The method of claim 2 , further comprising:

processing instructions of the second thread at the front end upon flushing instructions of the first thread at the front end; and

initiating processing instructions of the second thread at the back end in response to detecting completion of the processing of instructions of the first thread at the back end.

4. The method of claim 1 wherein the instruction progress metric is based on at least one criterion selected from the group consisting of: a number of fetches, a number of memory accesses, a number of instructions processed, and a number of uses of an execution resource.

5. The method of claim 1 , further comprising:

detecting processing of instructions of the second thread at the front end; and

initiating the instruction progress metric to a second instruction progress metric value upon detecting a second thread switch event.

6. The method of claim 5 , further comprising:

detecting processing of instructions of the second thread at the back end; and

decrementing the instruction progress metric in response to detecting a second thread switch event and further in response to processing the instructions of the second thread at the back end after detecting the second thread switch event.

7. The method of claim 6 , further comprising:

detecting completion of processing of instructions of the second thread at the front end;

detecting an expiry of the instruction progress metric; and

initiating a flushing of the instructions of the second thread at the back end in response to the expiry.

8. The method of claim 1 , further comprising:

detecting a non-expiry of the instruction progress metric;

maintaining processing of the instructions of the first thread at the back end; and

processing instructions of the second thread at the front end.

9. The method of claim 3 , further comprising:

detecting an increase in a number of instructions of the second thread at the back end;

detecting whether the instruction progress metric is at a maximum instruction progress metric value; and

incrementing the instruction progress metric in response to the instruction progress metric being less than the maximum instruction progress metric value.

10. A processing device comprising:

a pipeline comprising a front end and a back end;

front end control logic of the front end configured to flush instructions of a first thread from the front end and to initiate processing of instructions of a second thread at the front end in response to an occurrence of a context switch event;

an instruction progress metric configured to initiate a flush signal in response to the occurrence of the context switch event; and

back end control logic of the back end configured to enable completion of processing of instructions of the first thread that are at the back end at the occurrence of the context switch event and to flush instructions of the first thread from the back end in response to an expiry of the instruction progress metric.

11. The processing device of claim 10 , wherein the back end control logic is further configured to flush instructions of the first thread from the front end in response to the occurrence of the context switch event.

12. The processing device of claim 11 , wherein the pipeline is further configured to initiate executing the instructions of the second thread at the front end while maintaining execution of the instructions of the first thread at the back end.

13. The processing device of claim 11 , further comprising a maximum instruction progress metric value configured to be used with the instruction progress metric.

14. The processing device of claim 10 , wherein the instruction progress metric is configured to be decremented upon loading an instruction of the first thread into the back end.

15. The processing device of claim 14 , further comprising:

wherein the instruction progress metric is further configured to be initiated in response to a detection of the context switch event; and

wherein the instruction progress metric is further configured to be decremented using a clock signal associated with completion of a program of instructions of the second thread.

16. The processing device of claim 10 , wherein the instruction progress metric is further configured to be altered from a first value associated with a first number of instructions of a first program to a second value associated with a second number of instructions of a second program.

17. The processing device of claim 10 , wherein:

the front end control logic is further configured to enable processing of instructions of the second thread at the front end during processing of instructions at the first thread at the back end; and

the back end control logic is further configured to enable processing of instructions of the second thread at the back end upon completion of processing instructions of the first thread.

18. A method comprising:

processing a first thread at a pipeline of a processing device based on instructions from an instruction cache;

initiating processing of a second thread at a front end of the pipeline in response to an occurrence of a context switch event;

initiating an instruction progress metric in response to the context switch event, the instruction progress metric based on a counter value;

enabling completion of processing of instructions of the first thread that are at a back end of the pipeline at the occurrence of the context switch event until an expiry of the instruction progress metric; and

flushing instructions of the first thread from the back end of the pipeline in response to the expiry of the instruction progress metric.

19. The method of claim 18 , further comprising:

processing instructions of the second thread at the front end during flushing of the instructions of the first thread;

detecting completion of the processing of instructions of the first thread at the back end; and

initiating processing instructions of the second thread at the back end.

20. The method of claim 18 , further comprising:

detecting a non-expiry of the instruction progress metric;

maintaining processing of the instructions of the first thread at the back end; and

processing instructions of the second thread at the front end.

Assignments (31)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040925 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Feb 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V. F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 052917/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040928 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Jan 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 052915/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 037486 FRAME 0517. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Dec 10, 2019
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 053547/0421 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12298143 PREVIOUSLY RECORDED ON REEL 042985 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded Oct 22, 2019
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 051029/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12298143 PREVIOUSLY RECORDED ON REEL 039361 FRAME 0212. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded Oct 22, 2019
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 051029/0387 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12298143 PREVIOUSLY RECORDED ON REEL 042762 FRAME 0145. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded Oct 22, 2019
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 051145/0184 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12298143 PREVIOUSLY RECORDED ON REEL 038017 FRAME 0058. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded Oct 22, 2019
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 051030/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 10, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 050744/0097 →
RELEASE OF SECURITY INTEREST Recorded Sep 10, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 050745/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE TO CORRECT THE APPLICATION NO. FROM 13,883,290 TO 13,833,290 PREVIOUSLY RECORDED ON REEL 041703 FRAME 0536. ASSIGNOR(S) HEREBY CONFIRMS THE THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS.. Recorded Feb 20, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: SHENZHEN XINGUODU TECHNOLOGY CO., LTD.
Reel/Frame 048734/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040632 FRAME: 0001. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME. Recorded Sep 21, 2017
From: FREESCALE SEMICONDUCTOR INC.
To: NXP USA, INC.
Reel/Frame 044209/0047 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12681366 PREVIOUSLY RECORDED ON REEL 038017 FRAME 0058. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded May 9, 2017
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 042985/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12681366 PREVIOUSLY RECORDED ON REEL 039361 FRAME 0212. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded May 9, 2017
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 042762/0145 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENTS 8108266 AND 8062324 AND REPLACE THEM WITH 6108266 AND 8060324 PREVIOUSLY RECORDED ON REEL 037518 FRAME 0292. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 1, 2017
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 041703/0536 →
CHANGE OF NAME Recorded Nov 8, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: NXP USA, INC.
Reel/Frame 040632/0001 →
RELEASE OF SECURITY INTEREST Recorded Nov 7, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 040928/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 21, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V., F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 040925/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 12092129 PREVIOUSLY RECORDED ON REEL 038017 FRAME 0058. ASSIGNOR(S) HEREBY CONFIRMS THE SECURITY AGREEMENT SUPPLEMENT. Recorded Jul 14, 2016
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 039361/0212 →
SUPPLEMENT TO THE SECURITY AGREEMENT Recorded Jun 16, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 039138/0001 →
SECURITY AGREEMENT SUPPLEMENT Recorded Mar 7, 2016
From: NXP B.V.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 038017/0058 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 13, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037518/0292 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 12, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037486/0517 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0143 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037354/0670 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0553 →
SECURITY AGREEMENT Recorded Nov 6, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 031591/0266 →
SECURITY AGREEMENT Recorded Jun 18, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 030633/0424 →
SECURITY AGREEMENT Recorded May 13, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 024397/0001 →
SECURITY AGREEMENT Recorded Mar 15, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 024085/0001 →
SECURITY AGREEMENT Recorded Jul 11, 2008
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 021217/0368 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2007
From: HOLLWAY, DAVID C.; SNYDER, MICHAEL D.; VENKUMAHANTI, SURESH
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 020304/0430 →
Continuity (1)
Related Publication 20090172361A1 · Jul 2, 2009