A method and device for allocating CPU core resources

A CPU core and resource technology, applied in the direction of resource allocation, program control design, multi-programming device, etc., can solve the problems of slow response speed of the focus process, unable to reach the optimal running state of the focus process, and many running resources, etc.

Active Publication Date: 2019-07-19
NETEASE (HANGZHOU) NETWORK CO LTD
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the focus process that consumes a lot of resources, the time-sensitive threads contained in it require more running resources, and resource preemption may cause some CPU core resources to be shared by multiple time-sensitive threads, while some CPU core resources are idle, that is, time The distribution of CPU core resources among sensitive threads is unbalanced, resulting in slow response speed and performance degradation of the focus process, and the focus process cannot reach the optimal running state

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for allocating CPU core resources
  • A method and device for allocating CPU core resources
  • A method and device for allocating CPU core resources

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0135] Example 1: In an example where the number of physical core resources is more than the number of time-sensitive threads (that is, n>p), it is assumed that the multi-core CPU has 4 physical core resources, that is, n=4, and each physical core resource There are 2 logical core resources, i.e. m=2, the focus process contains 2 time-sensitive threads TCT1 and TCT2, i.e. p=2, the focus process also includes 10 background threads BGT, q=10, and except the focus process There are also two background processes BGP running at the same time.

[0136] Figure 4a ~ Figure 4d In the method for allocating CPU core resources provided by another embodiment of the present invention, a schematic diagram corresponding to an example where the number of CPU physical core resources is greater than the number of time-sensitive threads, as shown in Figure 4a As shown, the CPU physical core resources P1-P4 that have not yet been allocated with time-sensitive threads have corresponding logical ...

example 2

[0156] Example 2: In an example where the number of physical core resources is equal to the number of time-sensitive threads (i.e. n=p), assume that the multi-core CPU has 3 physical core resources, i.e. n=3, and each physical core resource has 2 logical core resources, i.e. m=2, the focus process contains 3 time-sensitive threads TCT1, TCT2, and TCT3, i.e. p=3, the focus process also includes 8 background threads BGT, q=8, and except the focus In addition to the process, there are three background processes BGP running at the same time.

[0157] Figure 5a ~ Figure 5d In the method for allocating CPU core resources provided by another embodiment of the present invention, a schematic diagram corresponding to an example in which the number of CPU physical core resources is equal to the number of time-sensitive threads, as shown in Figure 5a As shown, CPU physical core resources P1-P3 that have not yet been allocated with time-sensitive threads run corresponding logical core r...

example 3

[0182] Example 3: In an example where the number of logical core resources is greater than the number of time-sensitive threads (that is, n×m>p), assume that the multi-core CPU has 3 physical core resources, that is, n=3, and each physical The core resource has 2 logical core resources, that is, m=2, and the focus process includes four time-sensitive threads TCT1, TCT2, TCT3 and TCT4, that is, p=4 (n=3

[0183] Figure 7a ~ Figure 7d In the method for allocating CPU core resources provided by another embodiment of the present invention, a schematic diagram corresponding to an example where the number of CPU logical core resources is greater than the number of time-sensitive threads, as shown in Figure 7a As shown, CPU physical core resources P1-P3 that have not yet been allocated with time-sensitive thr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A method for allocating core resources of a multi-core CPU according to embodiments of the present disclosure, comprising: determining the number of time critical threads included in a focus process, wherein said focus process is created when a predetermined software is running; and allocating core resources for the time critical threads and making the allocated core resources dedicated to the time critical threads, based on the number of core resources included in the multi-core CPU and the number of the time critical threads, so as to maximize the number of the time critical threads that occupy exclusive core resources. In said method, it's desirable to try to allocate separate core resources for time critical threads included in a focus process, and said time critical threads can be locked within the correspondingly allocated core resources, so that the allocation of core resources can be more balanced. Accordingly, response speed and performance of a focus process can be improved, which allows a focus process to run in an optimal status, and thus bring better user experience. In addition, a device for allocating core resources of a multi-core CPU is also provided.

Description

technical field [0001] Embodiments of the present invention relate to the field of computer technology, and more specifically, embodiments of the present invention relate to a method and device for allocating CPU core resources. Background technique [0002] This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] With the development of computer technology, computer programs have more and more functions, and the implementation is more and more complex, and the requirements for computer processing capabilities are also getting higher and higher. Multi-core processors came into being. The multiple cores of the multi-core processor can independently run program instructions, use the ability of parallel computing to speed up the running speed of the program, and provide multi-tasking capabilities. [0004] A c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/50
CPCG06F9/5038G06F9/4887G06F9/46G06F9/4831G06F9/4881G06F9/50G06F9/5077G06F9/5083
Inventor 吴羽
Owner NETEASE (HANGZHOU) NETWORK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products