# US 2012/0254840 A1 · Thread serialization and disablement tool

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

- Number: US 2012/0254840 A1
- Document ID: US20120254840A1
- Status: Published application
- Kind: A1
- Application number: 13/429,981
- Filed: 2012-03-26
- Published: 2012-10-04
- Earliest claimed: 2009-11-23
- Assignees: International Business Machines Corporation
- Inventors: KIRK J. KRAUSS
- Web page: https://patentgrep.com/patent/US20120254840A1

## CPC

- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method of performing runtime analysis on and control of a multithreaded computer program. One embodiment of the present invention can include identifying threads of a computer program to be analyzed. With a supervisor thread, execution of the identified threads can be controlled and execution of the identified threads can be monitored to determine a status of the identified threads. An indicator corresponding to the determined status of the threads can be output.

## Claims

### Claim 1

A method of performing runtime analysis on and runtime control of a multithreaded computer program, the method comprising:
identifying threads of a computer program to be analyzed;
with a supervisor thread, controlling, using a processor, an execution of the identified threads;
monitoring the execution of the identified threads to determine a status of the identified threads; and
presenting in a user interface that is presented on a display at least one indicator corresponding to the determined status of the identified threads.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
controlling execution of the identified threads comprises assigning a management lock to the identified threads to control when the identified threads are executed; and
controlling execution of the identified threads comprises executing the identified threads in accordance with the management lock.

### Claim 3 (depends on 2)

The method of claim 2, wherein presenting in the user interface that is presented on the display at least one indicator corresponding to the determined status of the identified threads comprises:
presenting at least one thread status indicator that indicates which of the identified threads is waiting to receive ownership of the management lock.

### Claim 4 (depends on 1)

The method of claim 1, wherein controlling execution of the identified threads comprises:
serializing execution of a plurality of threads that are not limited to serialized execution when the computer program is executed without use of a management lock or a runtime analysis module.

### Claim 5 (depends on 1)

The method of claim 1, wherein monitoring the execution of the identified threads comprises:
instrumenting the computer program to track use of CPUT locks by the computer program; and
performing runtime analysis on the tracked use of the CPUT locks.

### Claim 6 (depends on 1)

The method of claim 1, wherein monitoring the execution of the identified threads comprises:
instrumenting the computer program to track events for each of the identified threads of the computer program; and
performing runtime analysis on the tracked events.

### Claim 7 (depends on 1)

The method of claim 1, wherein controlling execution of the identified threads comprises:
allocating a management lock exclusively for ownership by one of the threads at a time; and
revoking ownership of the management lock exclusively when there is no processor activity detected for the thread to which the management lock is allocated.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
receiving a user request to disable execution of at least one thread selected from the identified threads;
queuing the user request until the selected thread no longer holds any management locks; and
when the selected thread no longer holds any locks, assigning ownership of a management lock to a second thread;
wherein the assignment of the management lock to the second thread disables execution of the selected thread until the selected thread is assigned ownership of the management lock.

### Claim 9 (depends on 1)

The method of claim 1, wherein controlling execution of the identified threads comprises:
allocating a management lock for shared ownership by a plurality of the threads; and
revoking ownership of the management lock from a first of the plurality of the threads when there is no processor activity detected for the first thread.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
receiving a user input that indicates, for each of a plurality of the identified threads, a respective thread priority to be assigned; and
assigning each of the respective thread priorities to a corresponding one of the identified threads;
wherein controlling execution of the identified threads comprises:
executing the identified threads in an order that is determined from the assigned thread priorities.

### Claim at position 11

11-20. (canceled)
