# US 2014/0208331 A1 · Methods of processing core selection for applications on manycore processors

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

- Number: US 2014/0208331 A1
- Document ID: US20140208331A1
- Status: Published application
- Kind: A1
- Application number: 13/858,036
- Filed: 2013-04-06
- Published: 2014-07-24
- Earliest claimed: 2013-01-18
- Assignees: NEC Laboratories America, Inc.
- Applicants: NEC Laboratories America, Inc.
- Inventors: Cheng-Hong Li; Srihari Cadambi; Kunal Rao; Srimat T. Chakradhar; Rajat Phull; Giuseppe Coviello; Murugan Sankaradass
- Web page: https://patentgrep.com/patent/US20140208331A1

## CPC

- G06F 9/5044: {considering hardware capabilities}
- G06F 9/5033: {considering data affinity}
- G06F 2209/509: Offload
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A runtime method is disclosed that dynamically sets up core containers and thread-to-core affinity for processes running on manycore coprocessors. The method is completely transparent to user applications and incurs low runtime overhead. The method is implemented within a user-space middleware that also performs scheduling and resource management for both offload and native applications using the manycore coprocessors.

## Claims

### Claim 1

A method to manage one or more multiple-core coprocessors, comprising:
receiving a request for one or more cores to simultaneously execute one or more threads;
selecting and assigning one or more idle cores to a group of threads so that the number of selected cores previously used by the group of threads is maximized;
releasing the cores assigned to a thread group when the thread group becomes inactive.

### Claim 2 (depends on 1)

The method of claim 1, comprising selecting one or more idle cores assigned to at least one earlier active phase of the thread group but not assigned to other existing thread groups.

### Claim 3 (depends on 1)

The method of claim 1, comprising selecting one or more idle cores that are not currently assigned to any existing thread group.

### Claim 4 (depends on 1)

The method of claim 1, comprising minimizing the number of the selected cores that are also assigned to other existing yet non-active thread groups.

### Claim 5 (depends on 1)

The method of claim 1, comprising tracking one or more statuses of the cores and the processes with one or more data structures that store the tracked statuses.

### Claim 6 (depends on 1)

The method of claim 1, comprising maintaining at least an instance of a data structure from which the status of the idleness of any core can be obtained.

### Claim 7 (depends on 1)

The method of claim 1, comprising maintaining at least an instance of a data structure indicating the number of thread groups that have been allocated.

### Claim 8 (depends on 1)

The method of claim 1, comprising at least an instance of a data structure from which the cores that have been assigned to the previous active phase of any thread group is obtained.

### Claim 9

A method to manage a multi-processor system with one or more multiple-core coprocessors, comprising:
intercepting coprocessor offload infrastructure application program interface (API) calls;
scheduling user processes to run on one of the coprocessors;
selecting cores for the group of threads such that the number of selected cores previously used by the thread group is maximized by:
selecting allocated cores assigned to at least one earlier active phase of the thread group but not assigned to other thread groups.
if more cores are needed, selecting cores that are free and not currently assigned to any thread group; and
if still more cores are needed, selecting cores that are free but have already been assigned to other thread groups;
scheduling offloads within user processes to run on one of the coprocessors; and
binding threads of offloads to predetermined cores within one of the coprocessors by selecting and allocating cores to an offload, and obtaining an affinity setting from a user.

### Claim 10 (depends on 9)

The method of claim 9, comprising applying an aging-based first-fit for process and offload scheduling.

### Claim 11 (depends on 9)

The method of claim 9, comprising applying thread and memory over-scheduling factors to enhance performance.

### Claim 12 (depends on 9)

The method of claim 9, comprising applying greedy core selection such that offloads from the same process get preference to use the same cores.

### Claim 13 (depends on 9)

The method of claim 9, wherein each coprocessor comprise a plurality of X86 cores running Linux, Peripheral Component Interconnect Express Interface, and memory controllers connected with a bidirectional Interprocessor Network (IPN) ring.

### Claim 14 (depends on 9)

The method of claim 9, further comprising:
selecting and scheduling a pending process to a coprocessor with free memory; and
examining offload queues corresponding to each coprocessor, and dispatch an offload to each coprocessor with free threads,
wherein processes and offloads are selected based on an aging-based first-fit heuristic.

### Claim 15

A system with multiple-core coprocessors, comprising:
computer code for receiving a request for one or more cores to simultaneously execute one or more threads;
computer code for selecting one or more idle cores for a group of threads to maximize the number of selected cores previously used by the group of threads.

### Claim 16 (depends on 15)

The system of claim 15, comprising computer code for selecting one or more idle cores assigned to at least one earlier active phase of the thread group but not assigned to other existing thread groups.

### Claim 17 (depends on 15)

The system of claim 15, comprising computer code for selecting one or more idle cores that are not currently assigned to any existing thread group.

### Claim 18 (depends on 15)

The system of claim 15, comprising computer code for minimizing the number of the selected cores that are also assigned to other existing yet non-active thread groups.

### Claim 19 (depends on 15)

The system of claim 15, comprising computer code for tracking one or more statuses of the cores and the processes with one or more data structures that store the tracked statuses.

### Claim 20 (depends on 15)

The system of claim 15, comprising computer code for maintaining at least an instance of a data structure from which the status of the idleness of any core can be obtained.

### Claim 21 (depends on 15)

The system of claim 15, comprising computer code for maintaining at least an instance of a data structure indicating the number of thread groups that have been allocated.
