# US 2012/0260070 A1 · Thread selection for multithreaded processing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0260070 A1
- Document ID: US20120260070A1
- Status: Published application
- Kind: A1
- Application number: 13/422,539
- Filed: 2012-03-16
- Published: 2012-10-11
- Earliest claimed: 2011-04-05
- Assignees: Arm Limited
- Inventors: Vladimir VASEKIN; Andrew Christopher Rose; Allan John Skillman; Antony John Penton
- Web page: https://patentgrep.com/patent/US20120260070A1

## CPC

- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/38: Concurrent instruction execution, e.g. pipeline or look ahead
- G06F 9/3854: {Instruction completion, e.g. retiring, committing or graduating}
- G06F 11/267: Reconfiguring circuits for testing, e.g. LSSD, partitioning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A multithreading processor 4 interleaves program instructions from different program threads to perform fine grained multithreading. Thread performance monitoring circuitry 30 monitors performance parameters of individual program threads to generate performance values. Issue control circuitry 28 reads these performance values to determine which program thread is next selected to be active when a thread switch event occurs. The performance parameters measured may include the proportion of cycles in which a program thread is able to provide a program instruction for execution by the execution circuitry 12 within the processor 4.

## Claims

### Claim 1

Apparatus for processing data comprising:
execution circuitry configured to execute program instructions;
issue control circuitry coupled said execution circuitry and to configured to select program instructions from among a plurality of program threads to form a sequence of program instructions to issue to said execution circuitry, said issue control circuitry being configured to select said program instructions such that program instructions from different program threads of said plurality of program threads are interleaved within said sequence; and
thread performance monitoring circuitry coupled to issue control circuitry and configured to measure a plurality of performance values, each of said plurality of performance values being indicative of a performance parameter of one said plurality of threads; wherein
said issue control circuitry is configured to select from which of said plurality of program threads program instructions are to be issued to said execution circuitry in dependence upon said plurality of performance values.

### Claim 2 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry selects program instructions for issue at each issue cycle of a sequence of issue cycles and said plurality of performance values indicate for each one of said plurality of program threads a proportion of issue cycles within said sequence of issue cycles for which a program instruction of said one of said plurality of program threads is available for issue.

### Claim 3 (depends on 2)

Apparatus as claimed in claim 2, wherein said issue control circuitry selects a next program thread from which program instructions are issued such that in combination with those program threads currently selected a proportion of issue cycles for which program instructions are predicted by said performance values to be issued is a smallest value that exceeds unity.

### Claim 4 (depends on 2)

Apparatus as claimed in claim 2, wherein said issue control circuitry selects a next program thread from which program instructions are issued such that in combination with those program those currently selected a proportion of issue cycles for which program instructions will be issued is not less than unity.

### Claim 5 (depends on 2)

Apparatus as claimed in claim 2, wherein said issue control circuitry is configured to determine a program instruction of said one of said plurality of program threads is not available for issue in an issue cycle if any one of:
(i) a next instruction to issue from said one of said plurality of program threads has a data dependence upon an operand value that is not yet available; and
(ii) a next instruction to issue from said one of said plurality of program threads as yet to compete being fetched from a memory storing said next instruction.

### Claim 6 (depends on 2)

Apparatus as claimed in claim 2, wherein said thread performance monitoring circuitry comprises a counter for each program thread selected to issue program instructions and said counter is configured to accumulate a count value in dependence upon whether a corresponding program thread of said plurality of program threads has a program instruction available for issue.

### Claim 7 (depends on 6)

Apparatus as claimed in claim 6, wherein said counter is configured to accumulate said count value over a predetermined accumulation period after which said count value is reset and accumulation restarted.

### Claim 8 (depends on 7)

Apparatus as claimed in claim 7, wherein said predetermined accumulation period is a user configurable parameter.

### Claim 9 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry is configured to select for issue, independently of said plurality of performance values, program instructions from a program thread from which program instruction have not been selected for greater than a predetermined number of thread selections made by said issue control circuitry.

### Claim 10 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry is configured to perform in-order program instruction issue from within each of said plurality of program threads.

### Claim 11 (depends on 1)

Apparatus as claimed in claim 1, comprising issue queue circuitry configured to store program instructions of each of said plurality of program threads to form pool of ready-to-run instructions.

### Claim 12 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry is configured to continue to select program instructions to issue from a given one of said plurality of program threads until occurrence a thread switch event, whereupon said issue control circuitry selects from which of said plurality of program threads program instructions are to be issued to said execution circuitry in dependence upon said plurality of performance values.

### Claim 13 (depends on 12)

Apparatus as claimed in claim 12, wherein said thread switch event is at least one of:
(i) a miss within a cache memory;
(ii) a timer triggered event;
(iii) a yield to another thread event;
(iv) a miss within a translation lookaside buffer; and
(v) an external interrupt request.

### Claim 14 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry is configured to issue one or more program instructions to said execution circuitry at one time.

### Claim 15 (depends on 1)

Apparatus as claimed in claim 1, wherein said issue control circuitry is configured to interleave program instructions from two program threads.

### Claim 16

Apparatus for processing data comprising:
execution means for executing program instructions;
issue control means coupled said execution means for selecting program instructions from among a plurality of program threads to form a sequence of program instructions to issue to said execution means, said issue control means selecting said program instructions such that program instructions from different program threads of said plurality of program threads are interleaved within said sequence; and
thread performance monitoring means coupled to issue control means for measuring a plurality of performance values, each of said plurality of performance values being indicative of a performance parameter of one said plurality of threads; wherein
said issue control means selects from which of said plurality of program threads program instructions are to be issued to said execution means in dependence upon said plurality of performance values.

### Claim 17

A method of processing data comprising the steps of:
selecting program instructions from among a plurality of program threads to form a sequence of program instructions to issue, said step of selecting operating to select said program instructions such that program instructions from different program threads of said plurality of program threads are interleaved within said sequence; and
executing said program instructions that are issued; and
measuring a plurality of performance values, each of said plurality of performance values being indicative of a performance parameter of one said plurality of threads; wherein
said step of selecting selects from which of said plurality of program threads program instructions are to be issued to said execution means in dependence upon said plurality of performance values.

### Claim 18 (depends on 16)

A method as claimed in claim 16, wherein said step of selecting selects program instructions for issue at each issue cycle of a sequence of issue cycles and said plurality of performance values indicate for each one of said plurality of program threads a proportion of issue cycles within said sequence of issue cycles for which a program instruction of said one of said plurality of program threads is available for issue.

### Claim 19 (depends on 18)

A method as claimed in claim 18, wherein said step of selecting selects a next program thread from which program instructions are issued such that in combination with those program those currently selected a proportion of issue cycles for which program instructions are predicted by said performance values to be issued is a smallest value that exceeds unity.

### Claim 20 (depends on 18)

A method as claimed in claim 18, wherein said step of selecting selects a next program thread from which program instructions are issued such that in combination with those program those currently selected a proportion of issue cycles for which program instructions will be issued is not less than unity.
