# US 2008/0189704 A1 · Method, system, and product for programming in a simultaneous multi-threaded processor environment

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

- Number: US 2008/0189704 A1
- Document ID: US20080189704A1
- Status: Published application
- Kind: A1
- Application number: 12/107,239
- Filed: 2008-04-22
- Published: 2008-08-07
- Earliest claimed: 2003-06-19
- Assignees: International Business Machines Corporation
- Inventors: LUAI A. ABOU-EMARA; Jen-Yeu Chen; Ronald Nick Kalla
- Web page: https://patentgrep.com/patent/US20080189704A1

## CPC

- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system, method, and product are disclosed for testing multiple threads simultaneously. The threads share a real memory space. A first portion of the real memory space is designated as exclusive memory such that the first portion appears to be reserved for use by only one of the threads. The threads are simultaneously executed. The threads access the first portion during execution. Apparent exclusive use of the first portion of the real memory space is permitted by a first one of the threads. Simultaneously with permitting apparent exclusive use of the first portion by the first one of the threads, apparent exclusive use of the first portion of the real memory space is also permitted by a second one of the threads. The threads simultaneously appear to have exclusive use of the first portion and may simultaneously access the first portion.

## Claims

### Claim at position 1

1-9. (canceled)

### Claim 10

A data processing system including a simultaneous multi-threaded (SMT) processor for executing a plurality of threads simultaneously, said system comprising:
said SMT processor for simultaneously executing said plurality of threads, wherein said plurality of threads access a first portion of a real memory space included within said system during execution;
said SMT processor is for permitting apparently exclusive use of said first portion by a first one of said plurality of threads and simultaneously permitting apparently exclusive use of said first portion by a second one of said plurality of threads, wherein said first and second ones of said plurality of threads simultaneously appear to have exclusive use of said first portion and may simultaneously access said first portion;
said plurality of threads being tested simultaneously in response to executing said test program;
particular features of said processor being disabled;
said test program being executed a first time while said particular features are disabled, said test program generating first results in response to said executing said first time;
said particular features being re-enabled;
said test program being executed a second time while said particular features are enabled, said test program generating second results in response to said executing said second time; and
said processor executing code for comparing said first and second results to determine whether said plurality of threads passed said test.

### Claim at position 3

11-12. (canceled)

### Claim 13 (depends on 10)

The system according to claim 10, further comprising:
a first base address being associated with a first one of said plurality of threads;
a second base address being associated with a second one of said plurality of threads;
said first portion of said real memory space being addressed by said first one of said plurality of threads utilizing said first base address; and
said first portion of said real memory space being addressed by said second one of said plurality of threads utilizing said second base address.

### Claim 14 (depends on 13)

The system according to claim 13, further comprising:
a first unique set of special purpose registers are assigned to said first one of said plurality of threads;
said first base address being stored in one of said first unique set of special purpose registers;
a second unique set of special purpose registers are assigned to said second one of said plurality of threads; and
said second base address being stored in one of said second unique set of special purpose registers.

### Claim 15 (depends on 13)

The system according to claim 13, further comprising:
said first base address being copied from one of said first unique set of special purpose registers to one of a first unique set of general purpose registers;
said second base address being copied from one of said second unique set of special purpose registers to one of a second unique set of general purpose registers;
an address being generated for said first one of said plurality of threads by adding an offset to said base address stored in said one of said first unique set of general purpose registers; and
an address being generated for said second one of said plurality of threads by adding an offset to said base address stored in said one of said second unique set of general purpose registers.

### Claim 16 (depends on 10)

The system according to claim 10, further comprising:
a bit being inserted into each address field for each instruction that is to be executed by said processor; and
a unique thread identifier being stored in said bit for each instruction, said unique thread identifier identifying a thread that executed said each instruction.

### Claim 17 (depends on 16)

The system according to claim 16, further comprising:
said processor for executing an instruction including a unique thread identifier and data, said instruction addressing a location in a shared portion of said real memory space;
said processor being for determining whether an entry has already been stored in said location; and
in response to a determination that no entry has already been stored in said location, said processor storing said unique thread identifier and said data in said location.

### Claim 18 (depends on 17)

The system according to claim 17, further comprising:
in response to a determination that an entry has already been stored in said location, said processor determining whether a unique thread identifier already stored in said location;
said processor being for determining whether said unique thread identifier already stored in said location matches said unique thread identifier included in said instruction;
in response to a determination that said unique thread identifier already stored in said location matches said unique thread identifier included in said instruction, said processor stores said unique thread identifier and said data in said location; and
in response to a determination that said unique thread identifier already stored in said location does not match said unique thread identifier included in said instruction, said processor discards said instruction, wherein said unique thread identifier and said data included in said instruction are not stored in said location.

### Claim 19

A computer program product in a data processing system including a simultaneous multi-threaded processor for executing a plurality of threads simultaneously, said product comprising:
instruction means for simultaneously executing said plurality of threads, wherein said plurality of threads access a first portion of a real memory space included within said system during execution;
instruction means for permitting apparently exclusive use of said first portion by a first one of said plurality of threads and simultaneously permitting apparently exclusive use of said first portion by a second one of said plurality of threads, wherein said first and second ones of said plurality of threads simultaneously appear to have exclusive use of said first portion and may simultaneously access said first portion;
instruction means for executing a test program;
instruction means for testing said plurality of threads simultaneously in response to executing said test program;
instruction means for disabling particular features of said simultaneous multi-threaded processor;
instruction means for executing said test program a first time while said particular features are disabled, said test program generating first results in response to said executing said first time;
instruction means for re-enabling said particular features;
instruction means for executing said test program a second time while said particular features are enabled, said test program generating second results in response to said executing said second time; and
instruction means for comparing said first and second results to determine whether said plurality of threads passed said test.

### Claim at position 11

20-21. (canceled)

### Claim 22 (depends on 19)

The product according to claim 19, further comprising:
instruction means for associating a first base address with a first one of said plurality of threads;
instruction means for associating a second base address with a second one of said plurality of threads;
instruction means for addressing said first portion of said real memory space by said first one of said plurality of threads utilizing said first base address; and
instruction means for addressing said first portion of said real memory space by said second one of said plurality of threads utilizing said second base address.

### Claim 23 (depends on 22)

The product according to claim 22, further comprising:
instruction means for assigning a first unique set of special purpose registers to said first one of said plurality of threads;
instruction means for storing said first base address in one of said first unique set of special purpose registers;
instruction means for assigning a second unique set of special purpose registers to said second one of said plurality of threads; and
instruction means for storing said second base address in one of said second unique set of special purpose registers.

### Claim 24 (depends on 22)

The product according to claim 22, further comprising:
instruction means for starting executing a test program;
instruction means for copying said first base address from one of said first unique set of special purpose registers to one of a first unique set of general purpose registers;
instruction means for copying said second base address from one of said second unique set of special purpose registers to one of a second unique set of general purpose registers;
instruction means for generating an address for said first one of said plurality of threads by adding an offset to said base address stored in said one of said first unique set of general purpose registers; and
instruction means for generating an address for said second one of said plurality of threads by adding an offset to said base address stored in said one of said second unique set of general purpose registers.

### Claim 25 (depends on 19)

The product according to claim 19, further comprising:
instruction means for inserting a bit into each address field for each instruction that is to be executed by said processor; and
instruction means for storing a unique thread identifier in said bit for each instruction, said unique thread identifier identifying a thread that executed said each instruction.

### Claim 26 (depends on 25)

The product according to claim 25, further comprising:
instruction means for executing an instruction including a unique thread identifier and data, said instruction addressing a location in a shared portion of said real memory space;
instruction means for determining whether an entry has already been stored in said location; and
in response to a determination that no entry has already been stored in said location, instruction means for storing said unique thread identifier and said data in said location.

### Claim 27 (depends on 26)

The product according to claim 26, further comprising:
instruction means for, in response to a determination that an entry has already been stored in said location, determining a unique thread identifier already stored in said location;
instruction means for determining whether said unique thread identifier already stored in said location matches said unique thread identifier included in said instruction;
instruction means for, in response to a determination that said unique thread identifier already stored in said location matches said unique thread identifier included in said instruction, storing said unique thread identifier and said data in said location; and
instruction means for, in response to a determination that said unique thread identifier already stored in said location does not match said unique thread identifier included in said instruction, discarding said instruction, wherein said unique thread identifier and said data included in said instruction are not stored in said location.

### Claim 28

A data processing system including a simultaneous multi-threaded (SMT) processor for executing a plurality of threads simultaneously, said system comprising:
said SMT processor for simultaneously executing said plurality of threads, wherein said plurality of threads access a first portion of a real memory space included within said system during execution;
said SMT processor is for permitting apparently exclusive use of said first portion by a first one of said plurality of threads and simultaneously permitting apparently exclusive use of said first portion by a second one of said plurality of threads, wherein said first and second ones of said plurality of threads simultaneously appear to have exclusive use of said first portion and may simultaneously access said first portion;
said plurality of threads being tested simultaneously in response to executing said test program; and
particular features of said processor being disabled during said testing of said plurality of threads.
