IP Library Granted Patent US 8,140,829
Granted Patent B2
US 8,140,829 · App. 10/717,747 · Granted Mar 20, 2012

Multithreaded processor and method for switching threads by swapping instructions between buffers while pausing execution

Assignee: International Business Machines Corporation
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 8,140,829
App. No.
10/717,747
Granted
Mar 20, 2012
Kind
B2
Abstract

A processor includes primary threads of execution that may simultaneously issue instructions, and one or more backup threads. When a primary thread stalls, the contents of its instruction buffer may be switched with the instruction buffer for a backup thread, thereby allowing the backup thread to begin execution. This design allows two primary threads to issue simultaneously, which allows for overlap of instruction pipeline latencies. This design further allows a fast switch to a backup thread when a primary thread stalls, thereby providing significantly improved throughput in executing instructions by the processor.

Claims (62)

1. An integrated circuit processor comprising:

a first instruction buffer corresponding to a first primary thread;

a second instruction buffer corresponding to a first backup thread;

a thread switch mechanism that detects when the first primary thread stalls, and in response thereto, pauses thread execution while swapping instructions stored in the first instruction buffer with instructions stored in the second instruction buffer;

a third instruction buffer corresponding to a second primary thread; and

a fourth instruction buffer corresponding to a second backup thread;

wherein the thread swap mechanism further detects when the second primary thread stalls, and in response thereto, pauses thread execution while swapping instructions stored in the third instruction buffer with instructions stored in the fourth instruction buffer.

2. The integrated circuit processor of claim 1 wherein execution of the backup thread occurs after the swap by executing at least one instruction in the first instruction buffer.

3. The integrated circuit processor of claim 1 wherein the first and second.

4. An integrated circuit processor comprising:

a first primary instruction buffer corresponding to a first primary thread;

a second primary instruction buffer corresponding to a second primary thread;

wherein the first and second primary threads simultaneously issue instructions for execution;

a first backup instruction buffer;

a second backup instruction buffer;

a thread switch mechanism that detects when one of the first and second threads stalls, and in response thereto, pauses thread execution while swapping instructions stored in one of the first and second primary instruction buffers corresponding to the stalled thread with instructions stored in one of the first and second backup instruction buffers.

5. The integrated circuit processor of claim 4 wherein the thread switch mechanism:

(1) detects when the first primary thread stalls, and in response thereto, swaps the first primary instruction buffer with the first backup instruction buffer; and

(2) detects when the second thread stalls, and in response thereto, swaps the second primary instruction buffer with the second backup instruction buffer.

6. The integrated circuit processor of claim 4 wherein the first and second backup instruction buffers are part of a pool of backup instruction buffers, wherein instructions in any backup instruction buffer in the pool may be swapped with instructions in the first primary instruction buffer, and wherein instructions in any backup instruction buffer in the pool may be swapped with instructions in the second primary instruction buffer.

7. An integrated circuit processor comprising:

a first primary instruction buffer corresponding to a first primary thread;

a second primary instruction buffer corresponding to a second primary thread;

wherein the first and second primary threads simultaneously issue instructions for execution;

a first backup instruction buffer;

a second backup instruction buffer;

a thread switch mechanism that detects when the first thread stalls, and in response thereto, pauses thread execution while swapping instructions stored in the first primary instruction buffer with instructions stored in the first backup instruction buffer, and begins issuing from the first primary instruction buffer, and that detects when the second thread stalls, and in response thereto, pauses thread execution while swapping instructions stored in the second primary instruction buffer with instructions stored in the second backup instruction buffer, and begins issuing from the second primary instruction buffer.

8. A method for switching between a first thread of execution and a second thread of execution in a multithreaded processor, the method comprising the steps of:

(A) providing a first instruction buffer corresponding to the first thread;

(B) providing a second instruction buffer corresponding to the second thread;

(C) pausing thread execution while swapping instructions stored in the first instruction buffer with instructions stored in the second instruction buffer;

(D) providing a third instruction buffer corresponding to a third thread;

(E) providing a fourth instruction buffer corresponding to a fourth thread; and

(F) pausing thread execution while swapping instructions stored in the third instruction buffer with instructions stored in the fourth instruction buffer.

9. The method of claim 8 wherein step (C) is performed when switching between the first thread and the second thread is required.

10. The method of claim 8 wherein step (C) is performed when the first thread stalls.

11. The method of claim 8 wherein step (C) is performed when the second thread stalls.

12. The method of claim 8 further comprising the step of executing the second thread after the swapping of instructions in step (C) by executing at least one instruction in the first instruction buffer.

13. The method of claim 8 wherein step (F) is performed when the third.

14. The method of claim 8 wherein step (F) is performed when the fourth.

15. The method of claim 8 wherein the first and third threads.

16. A method for switching between first and second threads of execution in a multithreaded processor, the method comprising the steps of:

(A) providing a first primary instruction buffer corresponding to the first thread;

(B) providing a second primary instruction buffer corresponding to the second thread;

(C) providing a first backup instruction buffer corresponding to a first backup thread;

(D) providing a second backup instruction buffer corresponding to a second backup thread;

(E) simultaneously issuing instructions from the first primary instruction buffer and from the second primary instruction buffer; and

(F) detecting when one of the first and second primary threads stalls, and in response thereto, pausing thread execution while swapping instructions stored in one of the first and second primary instruction buffers corresponding to the stalled thread with instructions stored in one of the first and second backup instruction buffers.

17. The method of claim 16 wherein step (E) comprises the steps of:

(1) detecting when the first primary thread stalls, and in response thereto, swapping information stored in the first primary instruction buffer with information stored in the first backup instruction buffer; and

(2) detecting when the second thread stalls, and in response thereto, swapping instructions stored in the second primary instruction buffer with instructions stored in the second backup instruction buffer.

18. The method of claim 16 wherein the first and second backup instruction buffers are part of a pool of backup instruction buffers,

wherein instructions in any backup instruction buffer in the pool may be swapped with instructions in the first primary instruction buffer, and wherein instructions in any backup instruction buffer in the pool may be swapped with instructions in the second primary instruction buffer.

19. A method for switching between threads of execution in a multithreaded processor, the method comprising the steps of:

(A) providing a first primary instruction buffer corresponding to the first thread;

(B) providing a second primary instruction buffer corresponding to the second thread;

(C) providing a first backup instruction buffer corresponding to a first backup thread;

(D) providing a second backup instruction buffer corresponding to a second backup thread;

(E) simultaneously issuing instructions from the first primary instruction buffer and from the second primary instruction buffer; and

(F) detecting when the first threads stalls, and in response thereto, pausing thread execution while swapping instructions stored in the first primary instruction buffer with instructions stored in the first backup instruction buffer, and issuing instructions from the first primary instruction buffer.

20. The method of claim 19 further comprising the step of

(G) detecting when the second thread stalls, and in response thereto, swapping instructions stored in the second primary instruction buffer with instructions stored in the second backup instruction buffer, and issuing from the second primary instruction buffer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2003
From: EICKEMEYER, RICHARD JAMES; LUICK, DAVID ARNOLD
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 014727/0189 →
Continuity (1)
Related Publication 20050114856A1 · May 26, 2005