# US 9,436,498 B2 · Runtime analysis and control to monitor the status of the threads during execution of folded thread

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

- Number: US 9,436,498 B2
- Document ID: US9436498B2
- Status: Granted
- Kind: B2
- Application number: 14/023,711
- Filed: 2013-09-11
- Published: 2014-01-09
- Granted: 2016-09-06
- Earliest claimed: 2009-11-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Kirk J. Krauss
- Web page: https://patentgrep.com/patent/US9436498B2

## CPC

- G06F 9/46: Multiprogramming arrangements
- G06F 9/48: Program initiating; Program switching, e.g. by interrupt
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 11/3017: {where the computing system is implementing multitasking (multiprogramming arrangements G06F9/46; allocation of resources G06F9/50)}
- G06F 11/3072: {where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting}
- G06F 11/3089: {Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents (software debugging using additional hardware using a specific debug interface G06F11/3656; performance evaluation by tracing or monitoring G06F11/3466)}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/3644: {by instrumenting at runtime}
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer hardware system configured to perform runtime analysis and runtime control of a multithreaded computer program includes at least one processor. The at least one processor is configured to initiate and/or perform the following. A plurality of the threads are folded, under control of a supervisor thread, together to be executed as a single folded thread. The execution of the folded thread is monitored to determine a status of the threads. At least one indicator corresponding, to the determined status of the threads, is presented in a user interface.

## Claims

### Claim 1

A computer program product, comprising:
a computer usable storage medium having stored therein computer usable program code for performing runtime analysis and runtime control of a multithreaded computer program,
the computer usable program code, which when executed by a computer hardware system, causes the computer hardware system to perform:
folding, under control of a supervisor thread, a plurality of the threads together to be executed as a single folded thread;
monitoring the execution of the folded thread to determine a status of the threads; and
presenting in a user interface at least one indicator corresponding to the determined status of the threads, wherein
the folding includes
copying state data of a second thread of the threads, and
applying the copied state data to be used as state data for a first thread of the threads, and
wherein the computer usable storage medium does not consist of a transitory propagating signal.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein
the computer usable program code further causes the computer hardware system to perform:
identifying, in a list of folded threads, a first thread that is currently executing; and
identifying a thread tracking structure associated with the first thread.

### Claim 3 (depends on 2)

The computer program product of claim 2, wherein
state data of the first thread is stored to a memory location.

### Claim 4 (depends on 3)

The computer program product of claim 3, wherein
the memory location is indicated by the thread tracking structure associated with the first thread.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the computer usable program code further causes the computer hardware system to perform:
suspending the first thread; and
suspending the second thread, wherein
the copying the state data is performed by the supervisor thread while both the first and second threads are suspended.

### Claim 6 (depends on 5)

The computer program product of claim 5, wherein
execution of the first thread is reinitiated.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the computer usable program code further causes the computer hardware system to perform:
selecting, as the second thread, a thread that is next to the first thread in a list of folded threads.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein
the applying the copied state includes storing the copied state data to a memory location indicated by a thread tracking structure associated with the first thread.

### Claim 9

A computer hardware system configured to perform runtime analysis and runtime control of a multithreaded computer program, comprising
at least one processor, wherein the at least one processor is configured to initiate and/or perform:
folding, under control of a supervisor thread, a plurality of the threads together to be executed as a single folded thread;
monitoring the execution of the folded thread to determine a status of the threads; and
presenting in a user interface at least one indicator corresponding to the determined status of the threads, wherein
the folding includes
copying state data of a second thread of the threads, and
applying the copied state data to be used as state data for a first thread of the threads.

### Claim 10 (depends on 9)

The system of claim 9, wherein the at least one processor is further configured to initiate and/or perform:
identifying, in a list of folded threads, a first thread that is currently executing; and
identifying a thread tracking structure associated with the first thread.

### Claim 11 (depends on 10)

The system of claim 10, wherein
state data of the first thread is stored to a memory location.

### Claim 12 (depends on 11)

The system of claim 11, wherein
the memory location is indicated by the thread tracking structure associated with the first thread.

### Claim 13 (depends on 9)

The system of claim 9, wherein the at least one processor is further configured to initiate and/or perform:
suspending the first thread; and
suspending the second thread, wherein
the copying the state data is performed by the supervisor thread while both the first and second threads are suspended.

### Claim 14 (depends on 13)

The system of claim 13, wherein
execution of the first thread is reinitiated.

### Claim 15 (depends on 9)

The system of claim 9, wherein the at least one processor is further configured to initiate and/or perform:
selecting, as the second thread, a thread that is next to the first thread in a list of folded threads.

### Claim 16 (depends on 9)

The system of claim 9, wherein
the applying the copied state includes storing the copied state data to a memory location indicated by a thread tracking structure associated with the first thread.
