WO2015089780A1 - 一种应用进程调度方法和装置 - Google Patents

一种应用进程调度方法和装置 Download PDF

Info

Publication number
WO2015089780A1
WO2015089780A1 PCT/CN2013/089943 CN2013089943W WO2015089780A1 WO 2015089780 A1 WO2015089780 A1 WO 2015089780A1 CN 2013089943 W CN2013089943 W CN 2013089943W WO 2015089780 A1 WO2015089780 A1 WO 2015089780A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
kernel
parameter
application process
processor
Prior art date
Application number
PCT/CN2013/089943
Other languages
English (en)
French (fr)
Inventor
王朱珍
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/089943 priority Critical patent/WO2015089780A1/zh
Priority to CN201380002814.2A priority patent/CN105009083A/zh
Publication of WO2015089780A1 publication Critical patent/WO2015089780A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/501Performance criteria

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to an application process scheduling method and apparatus. Background technique
  • Multicore/ many-core processors refer to multiple complete computer engines on a processor chip, that is, multiple cores.
  • Multi-core/many-core processors are mainly composed of homogeneous multi-core/many-core processors and heterogeneous multi-core/many-core processors.
  • heterogeneous multi-core/ many-core processors contain many different types of cores. Different types of cores have different hardware parameters such as structure, function and running performance, which makes different types of cores suitable for different processing. Type of application. However, in a multi-core/many-core processor-based system, the operating system allocates the processor's core to the application process that needs to run according to the load balancing principle. In this way, although the number of tasks handled by each core in a heterogeneous processor can be guaranteed to be the same, it will affect the running speed of the application process. Summary of the invention
  • the present invention provides an application process scheduling method and apparatus to improve the running speed of an application process.
  • a first aspect of the present invention provides an application process scheduling method, including:
  • the method before selecting a target kernel whose performance value of the target kernel parameter meets a preset condition, in the multiple cores of the slave processor, the method further includes:
  • a target core whose performance value of the target kernel parameter meets a preset condition including:
  • a target kernel whose performance value of the target kernel parameter satisfies a preset condition is selected.
  • the target core of the target kernel parameter whose performance value meets the preset condition is selected from the plurality of cores of the processor, including:
  • a target kernel having the highest performance value of the target kernel parameter is selected.
  • the acquiring information about a target kernel parameter that affects a running speed of the target application process includes:
  • a target core whose performance value of the target kernel parameter meets a preset condition including:
  • Target performance average is a performance value of all kernel parameters belonging to the target parameter category in the kernel. average value.
  • the selecting, by the plurality of cores of the slave processor, a target core whose target performance average meets a preset condition includes:
  • the kernel arrangement order corresponding to the target parameter category according to a correspondence between a preset parameter category and a kernel arrangement order, wherein the kernel sort order is in accordance with an average of the target performance values from high to low, The sorting performed by multiple cores; According to the kernel arrangement order, the target kernel with the highest target performance average is determined.
  • the correspondence between the preset parameter categories and the kernel arrangement order is determined by:
  • a second aspect of the present invention provides an application process scheduling apparatus, including:
  • a process determining unit configured to determine a target application process to be scheduled currently
  • a parameter determining unit configured to acquire information about a target kernel parameter that affects a running speed of the target application process determined by the process determining unit;
  • a kernel determining unit configured to select, from among a plurality of cores of the processor, a target kernel whose performance value of the target kernel parameter acquired by the parameter determining unit meets a preset condition; a target determined by the kernel determining unit a kernel to run the target application process through the target kernel.
  • the apparatus further includes: determining, according to the load balancing principle, at least one pending to be able to process the application process from among multiple cores of the processor Kernel
  • the kernel determining unit includes:
  • a first kernel determining unit configured to select, from the at least one pending core, a target core whose performance value of the target kernel parameter satisfies a preset condition.
  • the kernel determining unit includes: a kernel determining subunit, configured to select one of the target kernel parameters from multiple cores of the processor The target kernel with the highest performance value.
  • the parameter determining unit includes:
  • a parameter category determining unit configured to determine, according to a preset relationship between the preset application process and the parameter category, a target parameter category to which the target kernel parameter that affects the running speed of the target application process belongs to; the kernel determining unit includes:
  • a second kernel determining unit configured to select, from among a plurality of cores of the processor, a target core whose target performance average satisfies a preset condition, wherein the target performance average is the target parameter category in the kernel The average of the performance values of all kernel parameters.
  • the second kernel determining unit includes:
  • a kernel performance determining unit configured to determine a kernel sorting order corresponding to the target parameter category according to a correspondence between a preset parameter category and a kernel sorting order, where the kernel sorting order is higher according to the target performance average Sorting the plurality of cores in a low order; the second kernel determining subunits are configured to determine a target core having the highest target performance average according to the kernel sorting order.
  • a computer comprising a processor, a memory, a communication interface, and a communication bus;
  • the processor, the memory, and the communication interface communicate via the communication bus;
  • the processor is configured to determine a target application process to be scheduled currently; acquiring information of a target kernel parameter that affects a running speed of the target application process; and selecting, from the plurality of cores of the processor, one of the target kernel parameters a target kernel whose performance value satisfies a preset condition; assigning the target application process to a target kernel determined by the kernel determining unit to run the target application process through the target kernel;
  • the target kernel parameter that affects the running speed of the target application process is obtained, and the target kernel running the target application process is selected according to the target kernel parameter. Therefore, the selected target kernel is beneficial to running the target application process, thereby improving the running speed of the target application process.
  • FIG. 1 is a schematic flowchart of an embodiment of an application process scheduling method according to the present invention
  • FIG. 2 is a schematic flowchart of another embodiment of an application process scheduling method according to the present invention
  • FIG. 3 is an implementation of determining a kernel ordering sequence according to the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of an application process scheduling apparatus according to the present invention
  • FIG. 5 is a schematic structural diagram of another embodiment of an application process scheduling apparatus according to the present invention
  • the invention provides an application process scheduling method for reasonably allocating a processor core to an application process, thereby improving the running speed of the application process.
  • FIG. 1 a schematic flowchart of an embodiment of an application process scheduling method according to the present invention is shown.
  • the method in this embodiment may include:
  • the operating system is responsible for scheduling the application process, assigning the currently running application process to a core of the processor, and running the application process by the kernel.
  • the current application process needs to be scheduled that is, the application process waiting to be allocated is referred to as the target application process.
  • the target application process Obtain information about a target kernel parameter that affects a running speed of the target application process.
  • the core of the processor is also referred to as a processor core or a processor core, and the kernel mentioned in the embodiment of the present application refers to the processor core.
  • the speed of the application process is related to the kernel parameters of the processor core running the application process.
  • the core parameters of the processor core are various, such as a level 1 instruction cache size, a level 1 instruction cache delay, a level 1 data cache size, a level 2 instruction cache size, an integer arithmetic logic unit delay, and a floating point arithmetic logic. Hardware parameters such as arithmetic unit delay and memory bandwidth.
  • the performance value of the kernel parameter may also be referred to as a parameter value, which is a standard reflecting the degree of parameter configuration height of the processor core.
  • the specific value of the primary data cache size in the kernel may be understood as the primary data cache size. Performance value.
  • the performance values of kernel parameters in different processor cores are also different. For different types of application processes, the kernel parameters that affect the speed of the application process are different. Therefore, different processor cores are suitable for running different types of application processes. For example, some processor cores have a larger cache, which is more suitable for running application processes that affect the running speed due to caching.
  • target kernel parameters in the kernel parameters.
  • the preset condition that needs to be satisfied by the performance value may be set according to actual needs, and generally the target kernel whose performance value satisfies the preset condition is suitable for running the target application process. For example, if the performance value of the parameter meets the preset condition, the performance value of the parameter may be not lower than a preset value, and the preset value may be a minimum value for ensuring normal operation of the application process, or multiple cores of the processor. The average of the performance values for this parameter.
  • the target kernel parameter in the target kernel that affects the running speed of the target application process satisfies a preset condition, so that the target kernel is suitable for running the target application process, thereby contributing to Increase the speed of the target application process.
  • the target that affects the target should be acquired.
  • the target kernel parameter of the running speed of the process is used, and the target kernel running the target application process is selected according to the target kernel parameter, thereby facilitating selection of a target kernel suitable for running the target application process, thereby improving the running of the target application process.
  • Speed also improves the processing efficiency of the kernel.
  • determining that the target kernel is the kernel with the highest performance value of the target kernel parameter is the target kernel running the target application process.
  • the target kernel with a higher value of the primary data cache size can be selected.
  • the target kernel parameter affecting the running speed of the target application process is determined, if the performance value of the target kernel parameter in the processor core is higher, the kernel is more suitable to run the target application process, in the kernel. The faster you run the target application process. Therefore, selecting the kernel with higher performance value of the target kernel parameter as the target kernel is more beneficial to improve the running speed of the target application process.
  • the target kernel parameter that affects the running speed of the target application process may include multiple kernel parameters.
  • the performance value of the target kernel parameter satisfies the preset condition, which may be understood as :
  • the total value of the performance values of each target kernel parameter that affects the running speed of the application process satisfies the preset condition.
  • the total value of the performance values of the various parameters that affect the running speed of the application process is the largest.
  • the target kernel parameter that affects the running speed of the target application process may also be a kernel parameter that has the greatest impact on the running speed of the target application process, so that the performance value of the kernel parameter directly meets the required kernel.
  • the process of obtaining information about the target kernel parameter of the running speed of the target application process may be: querying a target kernel that affects the running speed of the target application process from a correspondence between the preset application process and the performance impact parameter Parameter information.
  • the information of the target kernel parameter may include a name of the target kernel parameter, and may also include information about a degree of influence of the target kernel parameter on the running speed of the application process.
  • kernel parameters that affect the running speed of each application process may be determined in advance, and kernel parameters that affect the running speed of the application process are saved. After determining the target application process to be assigned, you can directly query the target that should affect the target. Kernel parameters that use the speed of the process.
  • the method for determining the kernel parameters affecting the running speed of the application process may be any existing method for analyzing kernel parameters affecting the running speed of the application process.
  • the existing statistical method may be used for simulation, such as p&B design statistical method, identification
  • the parameters that the processor core affects the running speed of the application process are not limited here.
  • the kernel parameters affecting the running speed of the application process are basically the same for the same type of application process, the kernel parameters that affect the running speed of various types of application processes can be determined separately. In this way, the kernel parameters affecting the running speed of the target application process can be determined according to the type of the application process to which the target application process belongs.
  • the application process type to which the target application process belongs is determined, and an application process that is consistent with the name or attribute information is determined from the pre-stored application process information according to the name and attribute information of the target application process, and then the influence is determined.
  • the kernel parameter of the application process running speed Obtaining the information of the parameter affecting the running speed of the application process, in addition to the information such as the name of the parameter, the parameter category to which the parameter affecting the running speed of the application process can be directly obtained. Referring to FIG. 2, an application process scheduling of the present invention is shown.
  • Method Flow diagram of another embodiment the method of this embodiment may include:
  • the parameter category refers to the category to which the kernel parameter affecting the running speed of the application process belongs.
  • the parameter category is to divide multiple kernel parameters in the processor core into multiple different categories. For example, all kernel parameters that affect the speed of each application process are pre-determined, and these kernel parameters are divided into different parameter categories. Among them, the divided parameter categories can also be set according to actual needs.
  • kernel parameters in the kernel also belong to the processor.
  • the kernel performs the corresponding functions, so the kernel parameters can be divided into the following four categories:
  • Data storage parameters Kernel parameters belonging to this category may include a primary data cache size, a primary data cache delay, a primary data cache block size, and the like.
  • Kernel parameters belonging to this category may include the number of branch target caches, branch prediction types, and the like. 3) instruction storage parameters
  • Kernel parameters belonging to this category may include a level 1 instruction cache size, a level 1 instruction cache delay, and the like.
  • Kernel parameters belonging to this category may include the number of integer arithmetic logic units, the number of reordered buffers, and so on.
  • the parameter category to which the kernel parameter belongs may be determined according to the pre-defined parameter category, and then the application process and the parameter category are established. Correspondence relationship.
  • all kernel parameters that affect the speed of the application process can be classified as a parameter category. If multiple cores that affect the running speed of the application process do not belong to the same parameter category, the parameter category to which the kernel parameter that has the greatest impact on the running speed of the application process belongs may be determined as the parameter category corresponding to the application process.
  • the preset target relationship between the application process and the parameter category is preset, and the target parameter category corresponding to the target application process may be queried according to the corresponding relationship.
  • Each of the cores corresponds to a target performance average, which is an average of the performance values of all target kernel parameters belonging to the target parameter category in the kernel.
  • the target performance average value can also be understood as all calculated according to the weight of each target kernel parameter in the kernel.
  • a weighted average of the performance values of the target kernel parameters can also be understood as all calculated according to the weight of each target kernel parameter in the kernel.
  • the weight of each parameter in the same parameter category may be: in determining a kernel parameter affecting the running speed of the application process, determining, according to the influence degree of each kernel parameter in the parameter category on the running speed of the application process, The weight of each kernel parameter in this parameter category. Determine this After the weight of each kernel parameter in the category, the weight of each kernel parameter can be saved, so as to determine the weight information of the saved kernel parameter in determining the target performance average parameter value.
  • the target performance average value satisfies a preset condition, which may be that the target performance average value is the largest. That is, the target kernel is the kernel with the highest performance average of the kernel parameters belonging to the target parameter category among the multiple cores of the processor.
  • the embodiment determines the parameter category to which the target application process belongs, the influence of each kernel parameter under the parameter category on the target application process is integrated. Selecting the target kernel makes the determined target kernel more in line with the requirements of the application process for the kernel parameters, which is beneficial to improve the running speed of the target application process.
  • the target performance average corresponding to each core may be calculated in real time, and then it is determined whether the target performance average corresponding to each core satisfies a preset condition. And select a target kernel from the kernel whose target performance average meets the preset condition.
  • the target performance average of the kernel parameters belonging to different parameter categories in each kernel may be pre-calculated, and the correspondence between the kernel, the parameter category, and the performance average is obtained.
  • the target performance average value of the kernel parameters belonging to the target parameter category in each core may be determined according to the correspondence between the kernel, the parameter category and the performance average value, and then the target performance average value is selected. A kernel that meets the preset conditions.
  • the target kernel with the largest target performance average may be selected.
  • the processor After pre-calculating the performance average value of each kernel for different parameter categories, for each parameter class, another 'j, according to the parameter performance average value of each kernel parameter under the parameter category, the processor Multiple cores are arranged such that the kernel sorts from high to low according to the performance average in the parameter category.
  • the kernel sorting order is a sorting of the plurality of cores according to a high-to-low order of the target performance average. According to the kernel sorting order, the operating system can directly select the target core with the highest target performance average.
  • the target kernel with the highest target performance average can be selected according to the order of the kernels in the kernel sorting order, without real-time. Comparing the average performance of the target performance corresponding to each core helps to quickly determine the target core. In order to facilitate the process of determining the performance ranking of each core under different parameter categories, see the figure.
  • the process can include:
  • kernel 1 to kernel 5 there are five cores in the processor, that is, kernel 1 to kernel 5, and the parameters stored in the parameter category are used as an example. Assume that the parameters belonging to the data storage class include only the primary data cache size and the primary data cache delay.
  • the sum of the parameter values of the primary data cache size in the five cores needs to be calculated, and the sum of the parameter values of the primary data cache size is divided by 5, and the performance value of the primary data cache size in the processor is averaged.
  • the value is Pavel.
  • the same principle calculates the average value Pave2 of the performance value of the primary data buffer delay.
  • the difference between the performance value of the primary data cache size in each kernel and the performance average Pavel of the primary data cache size is calculated separately, and the difference between the five cores is obtained. Value Pdell.
  • the difference Pdel2 between the primary data buffer delay and the performance value average Pave2 in each core needs to be calculated.
  • the weight of each parameter in the parameter category may be determined according to the degree of influence of each parameter on the running speed in the process of testing the parameter affecting the running speed of the application process, and determining the weight of each parameter assigned to the parameter category.
  • any of the five cores you need to calculate a corresponding weighted sum Sj we.
  • the primary data cache size has a weight of 0.6
  • the first-level data cache delay has a weight of 0.4.
  • the weighting Sjwe corresponding to the calculation kernel 1 it is necessary to sum the product of the difference Pdell corresponding to the primary data buffer size and 0.6, and the product of the difference Pdel2 and 0.4 corresponding to the primary data buffer delay size.
  • the weighted sum Sjwe of the difference values corresponding to the two parameters P is obtained.
  • the five processor cores are sorted according to the weights corresponding to the respective processor cores and the size of the Sjwe, and the kernel ordering order corresponding to the parameter category of the data storage is obtained.
  • the kernel order is kernel 3, kernel 2, kernel 5, kernel 1, kernel 4.
  • the target parameter category is the data storage category, it may be determined according to the kernel ranking order that the performance average of the parameters belonging to the data storage category in the kernel 3 is the highest, and the kernel 3 is used as the target kernel. Reflects the performance average of the kernel parameters in the kernel that belong to this parameter category.
  • the present embodiment is merely an example for determining the kernel order corresponding to one parameter category, but when there are many parameter categories, the kernel can be determined by using the method shown in FIG. 3 for each parameter category. Order.
  • FIG. 3 is only one way to determine the order of the kernels, but there may be other ways in the actual application, as long as the parameter categories correspond to the kernel arrangement order to reflect the parameters belonging to the parameter category in the kernel.
  • the performance value can be high or low, and there is no restriction on the way to determine the order of the kernel.
  • in order to make the application process processed in each processor core The number is as equal as possible to achieve load balancing.
  • the process of selecting the target core from multiple cores of the processor may be: First, according to the load balancing principle, determine from the multiple cores of the processor that at least the target application process can be processed. A pending kernel. Then, from the determined pending core, a target kernel whose performance value of the parameter meets the preset condition is selected.
  • the pending kernels satisfying the load balance among the plurality of cores may be used, and then the kernel with the highest ranking in the pending kernel is used as the target kernel.
  • the kernel in the first position is opened, and it is determined whether the target application process is allocated to the kernel after running, whether the load balancing can still be satisfied, and if satisfied, the target application process is completed.
  • the load balancing Assigned to the kernel located in the first place; if the load balancing is not satisfied, it can be judged whether the target application process is allocated to the kernel in the second position, whether the load balancing can still be satisfied, and if it is satisfied, it will be located in the second The kernel of the bit is used as the target kernel. If it is not satisfied, it continues to judge whether the application process is allocated to the kernel in the third place, whether the load balancing principle is satisfied, and so on.
  • the undetermined kernel selected according to the load balancing principle means that the number of application processes running between the respective processor cores can still be balanced after the target application process is run. Therefore, the operating system can analyze which kernels are allocated to the target application process according to the processing of the application process currently running by each processor, and still can satisfy the load balancing principle between the cores to determine the pending core.
  • An application process scheduling method corresponding to the present invention the present invention also provides an application process scheduling device. Referring to FIG. 4, a schematic structural diagram of an embodiment of an application process scheduling device according to the present invention is shown. Can include:
  • a process determining unit 401 configured to determine a target application process to be scheduled currently
  • the parameter determining unit 402 is configured to acquire information about a target kernel parameter that affects a running speed of the target application process determined by the process determining unit;
  • the kernel determining unit 403 is configured to select, from among a plurality of cores of the processor, a target kernel whose performance value of the target kernel parameter acquired by the parameter determining unit meets a preset condition; determining, by the kernel determining unit a target kernel to run the target through the target kernel Use the process.
  • the parameter determining unit acquires a target kernel parameter that affects the running speed of the target application process, and the kernel determining unit determines that the target kernel parameter is satisfied.
  • the target kernel of the preset condition so that the process allocation unit allocates the target process to the target kernel, and the target kernel parameter in the target kernel satisfies a preset condition, which can meet the running requirement of the target process, thereby facilitating Increase the speed of the target process.
  • the kernel determining unit determines the target kernel from the plurality of processor cores, the kernel whose performance value of the target kernel parameter exceeds a preset threshold may be selected as the target kernel.
  • the kernel determining unit may include: a kernel determining subunit, configured to select, from among a plurality of cores of the processor, a target kernel with the highest performance value of the target kernel parameter.
  • a kernel determining subunit configured to select, from among a plurality of cores of the processor, a target kernel with the highest performance value of the target kernel parameter.
  • the kernel determining unit 403 includes:
  • the first kernel determining unit 4031 is configured to select, from the at least one pending core, a target kernel whose performance value of the target kernel parameter satisfies a preset condition.
  • the parameter determining unit may include: a parameter category determining unit, configured to determine, according to a preset relationship between the preset application process and the parameter category, the target application process The target parameter category to which the target kernel parameter of the running speed belongs; correspondingly, the kernel determining unit may include:
  • a second kernel determining unit configured to select, from among a plurality of cores of the processor, a target core whose target performance average satisfies a preset condition, where the target performance average value belongs to the kernel in the kernel The average of the performance values of all kernel parameters of the target parameter category.
  • the second kernel determining unit includes:
  • the present invention also provides a computer. Referring to Figure 6, there is shown a block diagram of a computer of the present invention.
  • the computer 600 of the present embodiment includes at least a processor 601, a memory 602, a communication interface 603, and a communication bus 604.
  • the processor 601, the memory 602, and the communication interface 603 communicate via the communication bus 604.
  • the processor 601 is configured to determine a target application process that is currently to be scheduled; acquire information about a target kernel parameter that affects a running speed of the target application process; and select one of the multiple cores of the processor. a target kernel whose performance value of the kernel parameter satisfies a preset condition; the target application process is allocated to the target kernel determined by the kernel determining unit to run the target application process through the target kernel.
  • the memory 602 is configured to store information including a program run by the processor.
  • the various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments may be referred to each other.
  • the description is relatively simple, and the relevant part can be referred to the method part.
  • RAM random access memory
  • ROM read only memory
  • EEPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or technical field Any other form of storage medium known.

Abstract

公开了一种应用进程调度方法和装置,该方法包括确定当前待调度的目标应用进程;获取影响目标应用进程运行速度的目标内核参数的信息;从处理器的多个内核中,选择出一个目标内核参数的性能值满足预设条件的目标内核;将目标应用进程分配给目标内核,以通过目标内核运行目标应用进程。该方法有利于提高应用进程的运行速度。

Description

一种应用进程调度方法和装置 技术领域
本发明涉及计算机技术领域, 尤其涉及一种应用进程调度方法和装置。 背景技术
多核 /众核处理器是指在处理器芯片上有多个完整的计算机引擎, 也就是 有多个内核。 多核 /众核处理器主要有同构多核 /众核处理器以及异构多核 /众核 处理器两种。
其中, 异构多核 /众核处理器中包含有多种不同类型的内核, 不同类型的 内核所具有的结构、功能和运行性能等硬件参数会有所差异,从而使得不同类 型的内核适合处理不同类型的应用。 然而, 在基于多核 /众核处理器的系统中, 操作系统都是根据负载均衡原则,为当前需要运行的应用进程分配处理器的内 核。 这样, 虽然可以保证异构处理器中各个内核之间处理的任务数量相同, 但 却会影响到应用进程的运行速度。 发明内容
有鉴于此, 本发明提供一种应用进程调度方法和装置, 以提高应用进程的 运行速度。
为了实现以上目的, 本发明的第一方面提供了一种应用进程调度方法, 包 括:
确定当前待调度的目标应用进程;
获取影响所述目标应用进程运行速度的目标内核参数的信息;
从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足预设 条件的目标内核;
将所述目标应用进程分配给所述目标内核,以通过所述目标内核运行所述 目标应用进程。 结合第一方面,在第一种可能的实现方式中,在所述从处理器的多个内核 中,选择出一个所述目标内核参数的性能值满足预设条件的目标内核之前,还 包括:
根据负载均衡原则,从所述处理器的多个内核中,确定能够处理所述应用 进程的至少一个待定内核;
所述从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核, 包括:
从所述至少一个待定内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核。
结合第一方面,在第二种可能的实现方式中,所述从处理器的多个内核中, 选择出一个所述目标内核参数的性能值满足预设条件的目标内核, 包括:
从处理器的多个内核中,选择出一个所述目标内核参数的性能值最高的目 标内核。
结合第一方面或者第一方面的第二种可能实现方式,在第三种可能的实现 方式中, 所述获取影响所述目标应用进程运行速度的目标内核参数的信息, 包 括:
根据预置的应用进程与参数类别的对应关系 ,确定影响所述目标应用进程 运行速度的目标内核参数所属的目标参数类别;
所述从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核, 包括:
从处理器的多个内核中,选择一个目标性能平均值满足预设条件的目标内 核, 其中, 所述目标性能平均值为所述内核中属于所述目标参数类别的所有内 核参数的性能值的平均值。
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中, 所 述从处理器的多个内核中, 选择一个目标性能平均值满足预设条件的目标内 核, 包括:
根据预置的参数类别与内核排列顺序的对应关系,确定所述目标参数类别 对应的内核排列顺序, 其中, 所述内核排序顺序是根据所述目标性能平均值从 高到低的顺序, 对所述多个内核进行的排序; 根据所述内核排列顺序, 确定目标性能平均值最高的目标内核。 结合第一方面的第四种可能的实现方式,在第五种可能的实现中, 所述预 置的参数类别与内核排列顺序的对应关系通过如下方式确定:
对于属于所述参数类别的每个内核参数,计算所述处理器的多个内核中所 述内核参数的性能平均值 ,并分别计算每个所述内核中的所述内核参数与该性 能平均值的差值;
对于每一个所述内核,依据预置的所述参数类别中各个所述内核参数的权 重,计算所述内核中各个所述内核参数对应的所述差值的加权和,得到每个所 述内核对应的力。权和;
按照所述内核对应的加权和从大到小的顺序, 对所述多个内核进行排序。 本发明的第二方面提供了一种应用进程调度装置, 包括:
进程确定单元, 用于确定当前待调度的目标应用进程;
参数确定单元,用于获取影响所述进程确定单元确定出的所述目标应用进 程运行速度的目标内核参数的信息;
内核确定单元, 用于从处理器的多个内核中,选择出一个所述参数确定单 元获取到的所述目标内核参数的性能值满足预设条件的目标内核; 述内核确定单元确定出的目标内核,以通过所述目标内核运行所述目标应用进 程。
结合第二方面, 在第一种可能的实现方式中, 所述装置还包括: 根据所述负载均衡原则,从所述处理器的多个内核中,确定能够处理所述应用 进程的至少一个待定内核;
所述内核确定单元, 包括:
第一内核确定单元, 用于从所述至少一个待定内核中,选择出一个所述目 标内核参数的性能值满足预设条件的目标内核。
结合第二方面, 在第二种可能的实现方式中, 所述内核确定单元, 包括: 内核确定子单元, 用于从所述处理器的多个内核中,选择出一个所述目标 内核参数的性能值最高的目标内核。 结合第二方面或者第二方面的第二种可能的实现方式,在第三种可能的实 现方式中, 所述参数确定单元, 包括:
参数类别确定单元, 用于根据预置的应用进程与参数类别的对应关系,确 定影响所述目标应用进程运行速度的目标内核参数所属的目标参数类别; 所述内核确定单元, 包括:
第二内核确定单元, 用于从处理器的多个内核中,选择一个目标性能平均 值满足预设条件的目标内核, 其中, 所述目标性能平均值为所述内核中属于所 述目标参数类别的所有内核参数的性能值的平均值。
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中, 所 述第二内核确定单元, 包括:
内核性能确定单元, 用于根据预置的参数类别与内核排列顺序的对应关 系, 确定所述目标参数类别对应的内核排列顺序, 其中, 所述内核排序顺序是 根据所述目标性能平均值从高到低的顺序, 对所述多个内核进行的排序; 第二内核确定子单元, 用于根据所述内核排列顺序,确定目标性能平均值 最高的目标内核。
本发明的第三方面, 还提供了一种计算机, 所述计算机包括处理器、 存储 器、 通信接口和通信总线;
所述处理器、 存储器和通信接口通过所述通信总线进行通信;
所述处理器, 用于确定当前待调度的目标应用进程; 获取影响所述目标应 用进程运行速度的目标内核参数的信息; 从处理器的多个内核中,选择出一个 所述目标内核参数的性能值满足预设条件的目标内核;将所述目标应用进程分 配给所述内核确定单元确定出的目标内核,以通过所述目标内核运行所述目标 应用进程;
存储器, 用于存储包含有所述处理器运行的程序的信息。 从上述的技术方案可以看出,在确定出需要分配的目标应用进程后,会获 取影响该目标应用进程运行速度的目标内核参数, 并根据该目标内核参数,选 取运行该目标应用进程的目标内核,从而使得选取出的目标内核有利于运行该 目标应用进程, 进而可以提高该目标应用进程的运行速度。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明一种应用进程调度方法一个实施例的流程示意图; 图 2 为本发明一种应用进程调度方法另一个实施例的流程示意图; 图 3 为本发明确定内核排列顺序的一种实现方式的流程示意图; 图 4 为本发明一种应用进程调度装置一个实施例的结构示意图; 图 5 为本发明一种应用进程调度装置另一个实施例的结构示意图; 图 6 为本发明一种计算机的一个实施例的结构示意图。 具体实施方式 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明提供了一种应用进程调度方法, 以合理为应用进程分配处理器内 核, 进而提高应用进程的运行速度。 参见图 1 , 示出了本发明一种应用进程调度方法一个实施例的流程示意 图, 本实施例的方法可以包括:
S101 , 确定当前待调度的目标应用进程。
在具有多核 /众核异构处理器的计算机中, 操作系统负责调度应用进程, 将当前待运行的应用进程分配给处理器的一个内核,并由该内核运行该应用进 程。
其中, 为了便于区分, 本发明实施例中将当前需要被调度, 即等待被分配 的应用进程称为目标应用进程。 5102, 获取影响该目标应用进程运行速度的目标内核参数的信息。
5103 ,从处理器的多个内核中,选择出一个该目标内核参数的性能值满足 预设条件的目标内核。
其中, 处理器的内核也称为处理器核, 或者是处理器核心, 在本申请是实 施例中所提到的内核均指该处理器内核。
应用进程的运行速度与运行该应用进程的处理器内核的内核参数有关系。 其中, 处理器内核的内核参数有多种, 如, 一级指令緩存大小、 一级指令緩存 延迟、 一级数据緩存大小、 二级指令緩存大小、 整型算术逻辑运算单元延迟、 浮点算术逻辑运算单元延迟、 内存带宽等硬件参数。 其中, 内核参数的性能值 也可以称为参数值, 是反映该处理器内核的参数配置高度程度的标准, 例如, 内核中一级数据緩存大小的具体数值便可以理解为该一级数据緩存大小的性 能值。
不同的处理器内核中内核参数的性能值也不同。而对于不同类型的应用进 程而言, 影响该应用进程运行速度的内核参数也不相同, 因此, 不同处理器内 核适合运行不同类型的应用进程。 如, 有的处理器内核的緩存较大, 比较适合 运行由于緩存而影响运行速度的应用进程。
可以理解的是,在本申请实施例中仅仅是为了便于区分,而将内核参数中, 对该目标内核运行速度存在影响的内核参数称为目标内核参数。
其中, 该性能值所需满足的预设条件可以根据实际需要进行设定, 一般以 性能值满足该预设条件的目标内核能够适合运行该目标应用进程为依据。 如, 该参数的性能值满足预设条件可以是该参数的性能值不低于预设值,该预设值 可以为保证应用进程正常运行的最低值 ,或者是该处理器的多个内核中该参数 的性能值的平均值。
5104,将目标应用进程分配给目标内核, 以通过该目标内核运行该目标应 用进程。
操作系统将该目标应用进程分配给该目标内核后,由于该目标内核中影响 该目标应用进程运行速度的目标内核参数满足预设条件,使得该目标内核适合 运行该目标应用进程, 从而有助于提高该目标应用进程的运行速度。
本实施例中,在确定出需要分配的目标应用进程后,会获取影响该目标应 用进程运行速度的目标内核参数,并根据该目标内核参数来选取运行该目标应 用进程的目标内核, 从而有利于选取到适合运行该目标应用进程的目标内核, 从而可以提高该目标应用进程的运行速度, 也提高了内核的处理效率。 可选的,从该处理器的多个内核中,确定目标内核可以是将该目标内核参 数的性能值最高的内核作为运行该目标应用进程的目标内核。例如, 影响应用 进程 a运行速度的内核参数为一级数据緩存大小 (LI D-Cache Size ), 则可以 选择一级数据緩存大小的值较高的目标内核。在实际应用中, 影响该目标应用 进程的运行速度的目标内核参数确定后,如果处理器内核中该目标内核参数的 性能值越高, 该内核就越适合运行该目标应用进程,在该内核中运行目标应用 进程的速度也越快。 因此,选择该目标内核参数的性能值较高的内核作为目标 内核更加有利于提高目标应用进程的运行速度。
可以理解的是,在实际应用中, 影响该目标应用进程运行速度的目标内核 参数有可能会包括多个内核参数,在该种情况下, 该目标内核参数的性能值满 足预设条件可以理解为:影响该应用进程运行速度的各个目标内核参数的性能 值的总值满足预设条件。如, 影响该应用进程运行速度的各个参数的性能值的 总值最大。
当然,获取到的影响该目标应用进程运行速度的目标内核参数也可以是对 该目标应用进程的运行速度影响最大的内核参数,这样直接选择该内核参数的 性能值满足要求的内核即可。 可选的,获取该目标应用进程的运行速度的目标内核参数的信息的过程可 以是: 从预置的应用进程与性能影响参数的对应关系中, 查询出影响该目标应 用进程运行速度的目标内核参数的信息。其中, 该目标内核参数的信息可以包 括该目标内核参数的名称,还可以包含该目标内核参数对应用进程运行速度的 影响程度的信息等。
在实际应用中,对于操作系统可能会调度的各个应用进程, 可以预先确定 出影响各个应用进程运行速度的内核参数,并保存影响应用进程运行速度的内 核参数。 当确定出待分配的目标应用进程后,便可以直接查询出影响该目标应 用进程的运行速度的内核参数。
其中,确定影响应用进程运行速度的内核参数的方式可以采用现有的任意 分析影响应用进程运行速度的内核参数的方式,如, 可以利用现有的统计方法 进行仿真, 如 p&B design统计方法, 识别出处理器内核影响应用进程运行速 度的参数, 在此不加以限制。
由于对于相同类型的应用进程而言,影响应用进程运行速度的内核参数也 基本相同, 因此可以分别确定出影响各种类型的应用进程运行速度的内核参 数。 这样, 可以根据该目标应用进程的所属的应用进程类型, 来确定影响该目 标应用进程运行速度的内核参数。
其中,确定该目标应用进程所属的应用进程类型, 可以根据该目标应用进 程的名称、 属性等信息, 从预先存储应用进程信息中, 确定与该名称或属性信 息一致的应用进程, 进而确定出影响该应用进程运行速度的内核参数。 获取影响应用进程运行速度的参数的信息除了参数的名称等信息外,还可 以直接获取到影响该应用进程运行速度的参数所属的参数类别, 参见图 2, 示 出了本发明一种应用进程调度方法另一个实施例的流程示意图,本实施例的方 法可以包括:
5201 , 确定当前待调度的目标应用进程。
5202,根据预置的应用进程与参数类别的对应关系,确定影响所述应用进 程运行速度的目标内核参数所属的目标参数类别。
其中, 参数类别是指该影响应用进程运行速度的内核参数所属的类别。 参数类别为将处理器内核中多个内核参数划分为多个不同的类别。如,预 先确定出影响各个应用进程运行速度的所有内核参数,并将这些内核参数划分 为不同的参数类别。 其中, 划分出的参数类别也可以根据实际需要设定。
如, 由于处理器内核的硬件单元各自有执行不同的功能, 有的执行计算, 有的执行存储, 有的执行流程控制等, 相应的, 该内核中的相应的内核参数也 会对该处理器内核执行相应功能产生影响,因此可以将内核参数划分为如下四 类:
1 ) 数据存储参数 属于该类别的内核参数可以包括一级数据緩存大小、 一级数据緩存延迟、 一级数据緩存块大小等。
2 ) 控制流程的参数
属于该类别的内核参数可以包括分支目标緩存个数、 分支预测类型等。 3 ) 指令存储参数
属于该类别的内核参数可以包括一级指令緩存大小、 一级指令緩存延迟 等。
4 ) 执行计算的参数
属于该类别的内核参数可以包括整型算术逻辑单元数量、重排序緩存个数 等。
对于一个应用进程而言, 在确定出影响该应用进程运行速度的内核参数 后, 可以根据预先划分出的参数类别, 确定出该内核参数所属的参数类别, 进 而建立该应用进程与该参数类别的对应关系。
一般情况下 ,影响该应用进程的运行速度的所有内核参数都可以划归为某 一参数类别。如果影响该应用进程运行速度的多个内核不属于同一个参数类别 时,可以将对该应用进程运行速度影响程度最大的内核参数所属的参数类别确 定为该应用进程对应的参数类别。
在本实施例中, 由于预置了应用进程与参数类别的对应关系, 则可以根据 该对应关系, 查询该目标应用进程对应的目标参数类别。
S203 ,从处理器的多个内核中,选择一个目标性能平均值满足预设条件的 目标内核。
其中,每一个内核均对应一个目标性能平均值, 该目标性能平均值为该内 核中属于该目标参数类别的所有目标内核参数的性能值的平均值。
可以理解的是,由于该同一参数类别中各个内核参数对应用进程运行速度 的影响程度不相同,该目标性能平均值也可以理解为是根据该内核中各个目标 内核参数的权重, 计算出的所有目标内核参数的性能值的加权平均值。
其中, 同一参数类别中各个参数的权重, 可以是: 在确定影响该应用进程 运行速度的内核参数的过程中,根据该参数类别中的各个内核参数对该应用进 程运行速度的影响程度,确定出该参数类别中各个内核参数的权重。确定出该 类别中各个内核参数的权重后, 可以保存各个内核参数的权重, 以便在确定该 目标性能平均参数值调取保存的内核参数的权重信息。
可选的, 该目标性能平均值满足预设条件可以是该目标性能平均值最大。 也就是说, 该目标内核为该处理器的多个内核中,属于该目标参数类别的内核 参数的性能平均值最高的内核。
S204 ,将目标应用进程分配给目标内核, 以通过该目标内核运行该目标应 用进程。
由于影响该目标应用进程运行速度的内核参数一般有多个,而本实施例确 定出该目标应用进程所属的参数类别后,综合该参数类别下的各个内核参数对 该目标应用进程的影响, 来选择目标内核,使得确定出的目标内核更符合该应 用进程对内核参数的需求, 有利于提高该目标应用进程的运行速度。 在本实施例中, 为了选择一个目标性能平均值满足预设条件的目标内核: 可以实时计算各个内核对应的目标性能平均值,然后再判断各个内核对应的目 标性能平均值是否满足预设条件,并从目标性能平均值满足预设条件的内核中 选择出一个目标内核。
考虑到实时计算目标性能平均值可能会存在计算量过大,而延误应用进程 执行。可选的, 可以预先计算出每个内核中属于不同参数类别的内核参数的目 标性能平均值, 得到内核、 参数类别与性能平均值的对应关系。 当确定出目标 参数类别时, 可以根据该内核、 参数类别与性能平均值的对应关系, 确定出各 个内核中属于该目标参数类别的内核参数的目标性能平均值,进而选取出该目 标性能平均值满足预设条件的内核。
可选的, 查询各个目标内核针对该目标参数类别的目标性能平均值后, 可 以选择该目标性能平均值最大的目标内核。
进一步的,预先计算出每个内核针对不同参数类别的性能平均值后,对于 每个参数类另 'j ,还可以按照该参数类别下各个内核参数的参数性能平均值的高 低,对处理器的多个内核进行排列,使得内核按照该参数类别中的性能平均值 从高到低进行排序。
由于在该目标应用进程被调取之前,已经预置了参数类别与内核排列顺序 的对应关系。 当需要确定目标参数类别后,操作系统便可以根据预置的参数类 别与内核排列顺序的对应关系,确定该目标参数类别对应的内核排列顺序。其 中, 该内核排序顺序为根据该目标性能平均值从高到低顺序,对所述多个内核 进行的排序。根据该内核排列顺序,操作系统可以直接选择目标性能平均值最 高的目标内核。
由于内核排列顺序反映了内核中某一参数类别的内核参数的性能值的高 低, 因此, 直接根据内核排序顺序中内核的先后顺序, 便可以选择出目标性能 平均值最高的目标内核,无需再实时比较各个内核对应的目标性能平均值的高 低, 有利于快速确定目标内核。 为了便于理解确定各个内核在不同参数类别下的性能排序的过程,参见图
3 , 示出了确定内核在不同参数类别下的性能排序的一种流程示意图, 为了便 于描述, 以针对一种参数类别下的内核排列顺序为例。 该过程可以包括:
5301 , 对于处理器内核中属于该参数类别的每个内核参数 P, 计算处理器 的多个内核中该内核参数 P的性能平均值 Pave, 并分别计算每个内核中的该 内核参数与该性能平均值 Pave的差值 Pdel。
例如, 仍假设处理器中具有 5个内核, 即内核 1到内核 5 , 并以参数类别 为数据存储的参数为例。假设属于数据存储类的参数只包括一级数据緩存大小 和一级数据緩存延迟这两个参数。
需要计算这 5个内核中该一级数据緩存大小的参数值的总和,并将该一级 数据緩存大小的参数值的总和除以 5 , 得到处理器中该一级数据緩存大小的性 能值平均值 Pavel。 同样的原理, 计算出该一级数据緩存延迟的性能值平均值 Pave2。
针对该一级数据緩存大小,需要分别计算出每个内核中该一级数据緩存大 小的性能值与该一级数据緩存大小的性能平均值 Pavel 的差值 Pdell , 得到 5 个内核各自对应的差值 Pdell。 同时, 对于一级数据緩存延迟, 需要计算出每 个内核中该一级数据緩存延迟与该性能值平均值 Pave2的差值 Pdel2。
5302, 对于每一个处理器内核, 依据预置该参数类别中的各个内核参数 P 的权重, 计算该内核中各个内核参数 P对应的差值 Pdel的加权和 Sjwe, 得到 每个处理器内核对应的加权和 Sjwe。
其中,该参数类别中各个参数的权重可以在测试影响应用进程运行速度的 参数的过程中,根据各个参数对运行速度的影响程度,确定划归到该参数类别 中的各个参数的权重。
仍以上面的例子进行介绍,对于 5个内核中的任意一个内核, 均需要计算 出一个对应的加权和 Sj we。 例如, 假设一级数据緩存大小的权重为 0.6, 而一 级数据緩存延迟的权重大小为 0.4。 以计算内核 1对应的加权 Sjwe进行介绍, 则需要将该一级数据緩存大小对应的差值 Pdell与 0.6的乘积, 与该一级数据 緩存延迟大小对应的差值 Pdel2与 0.4的乘积进行求和, 得到这两个参数 P各 自对应的差值的加权和 Sjwe。
S304, 按照处理器内核对应的加权和 Sjwe从大到小的顺序, 对该多个处 理器内核进行排序。
仍以数据存储的参数类别为例, 根据各个处理器内核对应的加权和 Sjwe 的大小,对 5个处理器内核进行排序,得到与数据存储的参数类别对应的内核 排列顺序。 4叚如内核排列顺序为内核 3、 内核 2、 内核 5、 内核 1、 内核 4。 在 该目标参数类别为该数据存储类别时, 则可以根据该内核排列顺序, 可以确定 该内核 3中属于数据存储类别的参数的性能平均值最高,并将内核 3作为目标 内核。 反映了内核中属于该参数类别中的内核参数的性能平均值的高低。
当然,本实施例为了描述方便仅是以确定一个参数类别对应的内核排序为 例进行的介绍, 但是当参数类别较多时, 对于每一个参数类别均可以采用图 3 所示实施例的方式确定内核排列顺序。
可以理解的是, 图 3仅仅是一种确定内核排列顺序的一种方式,但是在实 际应用中还可以有其他方式,只要是使得参数类别对应内核排列顺序能够反映 内核中属于该参数类别的参数的性能值的高低即可,对具体确定内核排列顺序 的方式不加以限制。 在以上任意一个实施例中,为了使得各个处理器内核中处理的应用进程的 数量尽可能相同, 以实现负载均衡,从处理器的多个内核中选择目标内核的过 程可以是: 先根据负载均衡原则, 从处理器的多个内核中, 确定能够处理该目 标应用进程的至少一个待定内核。 然后, 再从确定出的待定内核中, 选择出参 数的性能值满足预设条件的一个目标内核。
如,确定出目标参数类别对应的内核排列顺序后, 可以多个内核中满足负 载均衡的待定内核,然后将待定内核中排列顺序位于最靠前的内核作为目标内 核。也可以按照该内核排列顺序中各个内核的前后顺序,从位于首位的内核开 启, 判断将该目标应用进程分配给该内核运行后, 是否仍能够满足负载均衡, 如果满足, 则将该目标应用进程分配给位于排序位于首位的内核; 如果不满足 负载均衡, 则可以判断将该目标应用进程分配给排序位于第二位的内核后,是 否仍能够满足负载均衡, 如果满足, 则将该位于第二位的内核作为目标内核, 如果不满足, 则继续判断将该应用进程分配给位于第三位的内核后,是否满足 负载均衡原则, 依次类推。
其中, 根据负载均衡原则选择出的待定内核是指将运行该目标应用进程 后, 各个处理器内核之间运行的应用进程的数量仍能够达到平衡。 因此, 操作 系统可以根据各个处理器当前运行的应用进程的处理,分析将该目标应用进程 分配给哪些内核,仍能够使得内核之间满足负载均衡原则, 来确定出该待定内 核。 对应本发明的一种应用进程调度方法,本发明还提供了一种应用进程调度 装置, 参见图 4, 示出了本发明一种应用进程调度装置一个实施例的结构示意 图, 本实施例的装置可以包括:
进程确定单元 401 , 用于确定当前待调度的目标应用进程;
参数确定单元 402, 用于获取影响所述进程确定单元确定出的所述目标应 用进程运行速度的目标内核参数的信息;
内核确定单元 403 , 用于从处理器的多个内核中, 选择出一个所述参数确 定单元获取到的所述目标内核参数的性能值满足预设条件的目标内核; 给所述内核确定单元确定出的目标内核,以通过所述目标内核运行所述目标应 用进程。
在本实施例中, 当进程确定单元确定出当前待调用的目标应用进程时, 由 参数确定单元获取影响该目标应用进程运行速度的目标内核参数,并由内核确 定单元确定出该目标内核参数满足预设条件的目标内核,从而使得该进程分配 单元将该目标进程分配给该目标内核运行,由于该目标内核中的目标内核参数 满足预设条件, 可以满足该目标进程的运行需求,从而有利于提高该目标进程 的运行速度。 其中, 该内核确定单元从多个处理器内核中确定目标内核时, 可以是选择 该目标内核参数的性能值超过预设阈值的内核作为该目标内核。
可选的, 该内核确定单元, 可以包括: 内核确定子单元, 用于从所述处理 器的多个内核中, 选择出一个所述目标内核参数的性能值最高的目标内核。 参见图 5 , 示出了本发明一种应用进程调度装置另一个实施例的结构示意 图, 本实施例的装置与前面实施例装置实施例的不同之处在于, 本实施例的装 置还包括: 后, 根据所述负载均衡原则, 从所述处理器的多个内核中, 确定能够处理所述 应用进程的至少一个待定内核;
所述内核确定单元 403 , 包括:
第一内核确定单元 4031 , 用于从所述至少一个待定内核中, 选择出一个 所述目标内核参数的性能值满足预设条件的目标内核。 可选的, 在本发明另一种可能的实现方式中, 该参数确定单元可以包括: 参数类别确定单元, 用于根据预置的应用进程与参数类别的对应关系,确 定影响所述目标应用进程运行速度的目标内核参数所属的目标参数类别; 相应的, 该内核确定单元, 可以包括:
第二内核确定单元, 用于从处理器的多个内核中,选择一个目标性能平均 值满足预设条件的目标内核, 其中, 所述目标性能平均值为所述内核中属于所 述目标参数类别的所有内核参数的性能值的平均值。
可选的, 所述第二内核确定单元, 包括:
内核性能确定单元, 用于根据预置的参数类别与内核排列顺序的对应关 系, 确定所述目标参数类别对应的内核排列顺序, 其中, 所述内核排序顺序是 根据所述目标性能平均值从高到低的顺序, 对所述多个内核进行的排序; 第二内核确定子单元, 用于根据所述内核排列顺序,确定目标性能平均值 最高的目标内核。 另外, 本发明还提供了一种计算机, 参见图 6, 示出了本发明一种计算机 的结构示意图, 本实施例的计算机 600至少包括处理器 601、 存储器 602、 通 信接口 603和通信总线 604。
其中, 该所述处理器 601、 存储器 602和通信接口 603通过所述通信总线 604进行通信。
其中, 所述处理器 601 , 用于确定当前待调度的目标应用进程; 获取影响 所述目标应用进程运行速度的目标内核参数的信息; 从处理器的多个内核中, 选择出一个所述目标内核参数的性能值满足预设条件的目标内核;将所述目标 应用进程分配给所述内核确定单元确定出的目标内核,以通过所述目标内核运 行所述目标应用进程。
存储器 602, 用于存储包含有所述处理器运行的程序的信息。 本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是 与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于 实施例公开的装置而言, 由于其与实施例公开的方法相对应, 所以描述的比较 简单, 相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例 的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实现, 为 了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描 述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于 技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来 使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明的范 围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处 理器执行的软件模块, 或者二者的结合来实施。软件模块可以置于随机存储器 ( RAM )、内存、只读存储器 ( ROM )、电可编程 ROM、电可擦除可编程 ROM, 寄存器、 硬盘、 可移动磁盘、 CD-ROM、 或技术领域内所公知的任意其它形式 的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本 发明。 对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见 的, 本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在 其它实施例中实现。 因此, 本发明将不会被限制于本文所示的这些实施例, 而 是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
+

Claims

权 利 要 求
1、 一种应用进程调度方法, 其特征在于, 包括:
确定当前待调度的目标应用进程;
获取影响所述目标应用进程运行速度的目标内核参数的信息;
从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足预设 条件的目标内核;
将所述目标应用进程分配给所述目标内核,以通过所述目标内核运行所述 目标应用进程。
2、 根据权利要求 1所述的方法, 其特征在于, 在所述从处理器的多个内 核中, 选择出一个所述目标内核参数的性能值满足预设条件的目标内核之前, 还包括:
根据负载均衡原则,从所述处理器的多个内核中,确定能够处理所述应用 进程的至少一个待定内核;
所述从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核, 包括:
从所述至少一个待定内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核。
3、 根据权利要求 1所述的方法, 其特征在于, 所述从处理器的多个内核 中, 选择出一个所述目标内核参数的性能值满足预设条件的目标内核, 包括: 从处理器的多个内核中,选择出一个所述目标内核参数的性能值最高的目 标内核。
4、 根据权利要求 1或 3所述的方法, 其特征在于, 所述获取影响所述目 标应用进程运行速度的目标内核参数的信息, 包括:
根据预置的应用进程与参数类别的对应关系 ,确定影响所述目标应用进程 运行速度的目标内核参数所属的目标参数类别;
所述从处理器的多个内核中,选择出一个所述目标内核参数的性能值满足 预设条件的目标内核, 包括:
从处理器的多个内核中,选择一个目标性能平均值满足预设条件的目标内 核, 其中, 所述目标性能平均值为所述内核中属于所述目标参数类别的所有内 核参数的性能值的平均值。
5、 根据权利要求 4所述的方法, 其特征在于, 所述从处理器的多个内核 中, 选择一个目标性能平均值满足预设条件的目标内核, 包括:
根据预置的参数类别与内核排列顺序的对应关系,确定所述目标参数类别 对应的内核排列顺序, 其中, 所述内核排序顺序是根据所述目标性能平均值从 高到低的顺序, 对所述多个内核进行的排序;
根据所述内核排列顺序, 确定目标性能平均值最高的目标内核。
6、 根据权利要求 5所述的方法, 其特征在于, 所述预置的参数类别与内 核排列顺序的对应关系通过如下方式确定:
对于属于所述参数类别的每个内核参数,计算所述处理器的多个内核中所 述内核参数的性能平均值,并分别计算每个所述内核中的所述内核参数与所述 性能平均值的差值;
对于每一个所述内核,依据预置的所述参数类别中各个所述内核参数的权 重,计算所述内核中各个所述内核参数对应的所述差值的加权和,得到每个所 述内核对应的加权和;
按照所述内核对应的加权和从大到小的顺序, 对所述多个内核进行排序。
7、 一种应用进程调度装置, 其特征在于, 包括:
进程确定单元, 用于确定当前待调度的目标应用进程;
参数确定单元,用于获取影响所述进程确定单元确定出的所述目标应用进 程运行速度的目标内核参数的信息;
内核确定单元, 用于从处理器的多个内核中,选择出一个所述参数确定单 元获取到的所述目标内核参数的性能值满足预设条件的目标内核; 述内核确定单元确定出的目标内核,以通过所述目标内核运行所述目标应用进 程。
8、 根据权利要求 7所述的装置, 其特征在于, 所述装置还包括: 根据负载均衡原则,从所述处理器的多个内核中,确定能够处理所述应用进程 的至少一个待定内核; 所述内核确定单元, 包括:
第一内核确定单元, 用于从所述至少一个待定内核中,选择出一个所述目 标内核参数的性能值满足预设条件的目标内核。
9、 根据权利要求 7所述的装置, 其特征在于, 所述内核确定单元, 包括: 内核确定子单元, 用于从所述处理器的多个内核中,选择出一个所述目标 内核参数的性能值最高的目标内核。
10、 根据权利要求 7或 9所述的装置, 其特征在于, 所述参数确定单元, 包括:
参数类别确定单元, 用于根据预置的应用进程与参数类别的对应关系,确 定影响所述目标应用进程运行速度的目标内核参数所属的目标参数类别;
所述内核确定单元, 包括:
第二内核确定单元, 用于从处理器的多个内核中,选择一个目标性能平均 值满足预设条件的目标内核, 其中, 所述目标性能平均值为所述内核中属于所 述目标参数类别的所有内核参数的性能值的平均值。
11、 根据权利要求 10所述的装置, 其特征在于, 所述第二内核确定单元, 包括:
内核性能确定单元, 用于根据预置的参数类别与内核排列顺序的对应关 系, 确定所述目标参数类别对应的内核排列顺序, 其中, 所述内核排序顺序是 根据所述目标性能平均值从高到低的顺序, 对所述多个内核进行的排序;
第二内核确定子单元, 用于根据所述内核排列顺序,确定所述目标性能平 均值最高的目标内核。
12、 一种计算机, 其特征在于, 所述计算机包括处理器、 存储器、 通信接 口和通信总线;
所述处理器、 存储器和通信接口通过所述通信总线进行通信;
所述处理器, 用于确定当前待调度的目标应用进程; 获取影响所述目标应 用进程运行速度的目标内核参数的信息; 从处理器的多个内核中,选择出一个 所述目标内核参数的性能值满足预设条件的目标内核;将所述目标应用进程分 配给所述内核确定单元确定出的目标内核,以通过所述目标内核运行所述目标 应用进程; , 用于存储包含有所述处理器运行的程序的信息。
PCT/CN2013/089943 2013-12-19 2013-12-19 一种应用进程调度方法和装置 WO2015089780A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/089943 WO2015089780A1 (zh) 2013-12-19 2013-12-19 一种应用进程调度方法和装置
CN201380002814.2A CN105009083A (zh) 2013-12-19 2013-12-19 一种应用进程调度方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/089943 WO2015089780A1 (zh) 2013-12-19 2013-12-19 一种应用进程调度方法和装置

Publications (1)

Publication Number Publication Date
WO2015089780A1 true WO2015089780A1 (zh) 2015-06-25

Family

ID=53401962

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089943 WO2015089780A1 (zh) 2013-12-19 2013-12-19 一种应用进程调度方法和装置

Country Status (2)

Country Link
CN (1) CN105009083A (zh)
WO (1) WO2015089780A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104208B (zh) * 2019-11-15 2023-12-29 深圳市优必选科技股份有限公司 进程调度管理方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256515A (zh) * 2008-03-11 2008-09-03 浙江大学 多核处理器操作系统负载均衡的实现方法
CN101385000A (zh) * 2006-02-17 2009-03-11 高通股份有限公司 用于多处理器应用程序支持的系统及方法
CN101739292A (zh) * 2009-12-04 2010-06-16 曙光信息产业(北京)有限公司 基于应用特征的异构集群作业自适应调度方法和系统
US20120151502A1 (en) * 2010-12-14 2012-06-14 University Of Southern California Apparatus and method for dynamically reconfiguring state of application program in a many-core system
CN103294550A (zh) * 2013-05-29 2013-09-11 中国科学院计算技术研究所 一种异构多核线程调度方法、系统及异构多核处理器
CN103329100A (zh) * 2011-01-21 2013-09-25 英特尔公司 异质的计算环境中的负载平衡

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101385000A (zh) * 2006-02-17 2009-03-11 高通股份有限公司 用于多处理器应用程序支持的系统及方法
CN101256515A (zh) * 2008-03-11 2008-09-03 浙江大学 多核处理器操作系统负载均衡的实现方法
CN101739292A (zh) * 2009-12-04 2010-06-16 曙光信息产业(北京)有限公司 基于应用特征的异构集群作业自适应调度方法和系统
US20120151502A1 (en) * 2010-12-14 2012-06-14 University Of Southern California Apparatus and method for dynamically reconfiguring state of application program in a many-core system
CN103329100A (zh) * 2011-01-21 2013-09-25 英特尔公司 异质的计算环境中的负载平衡
CN103294550A (zh) * 2013-05-29 2013-09-11 中国科学院计算技术研究所 一种异构多核线程调度方法、系统及异构多核处理器

Also Published As

Publication number Publication date
CN105009083A (zh) 2015-10-28

Similar Documents

Publication Publication Date Title
TWI701597B (zh) 任務的分配方法、裝置及設備
JP6755935B2 (ja) 共有メモリコントローラおよびそれを使用する方法
CN107734052B (zh) 面向组件依赖的负载均衡容器调度方法
US8510747B2 (en) Method and device for implementing load balance of data center resources
CN109669774B (zh) 硬件资源的量化方法、编排方法、装置及网络设备
WO2017080172A1 (zh) 网络调度方法和系统
US9965329B2 (en) Method and apparatus for workload placement on heterogeneous systems
US9870228B2 (en) Prioritising of instruction fetching in microprocessor systems
US11716384B2 (en) Distributed resource management by improving cluster diversity
US9401869B1 (en) System and methods for sharing memory subsystem resources among datacenter applications
US8572621B2 (en) Selection of server for relocation of application program based on largest number of algorithms with identical output using selected server resource criteria
JP2013515991A (ja) アクセラレータ・リソースを動的に管理するための方法、情報処理システム、およびコンピュータ・プログラム
KR20130116166A (ko) 멀티-코어 프로세서용 멀티스레드 애플리케이션-인지 메모리 스케줄링 기법
US8295305B2 (en) Dual scheduling of work from multiple sources to multiple sinks using source and sink attributes to achieve fairness and processing efficiency
WO2019105379A1 (zh) 资源管理的方法、装置、电子设备及存储介质
CN110990154B (zh) 一种大数据应用优化方法、装置及存储介质
WO2015144008A1 (zh) 为虚拟机分配物理机的方法及装置
CN109828790B (zh) 一种基于申威异构众核处理器的数据处理方法和系统
CN112181613A (zh) 异构资源分布式计算平台批量任务调度方法及存储介质
US8532129B2 (en) Assigning work from multiple sources to multiple sinks given assignment constraints
CN111177984B (zh) 电子设计自动化中异构计算单元的资源利用
WO2022111278A1 (zh) 一种并发请求超时的诊断方法及装置、设备、存储介质
CN114579282A (zh) 一种任务调度方法及装置
WO2015089780A1 (zh) 一种应用进程调度方法和装置
WO2015035901A1 (zh) 程序性能干扰模型的确定方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13899517

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13899517

Country of ref document: EP

Kind code of ref document: A1