Task scheduler device, task scheduling method, and program

The task scheduler device addresses CPU performance degradation in vRAN/AI inference by allocating dedicated instructions efficiently across logical cores, reducing core contention and power consumption, thereby enhancing performance and saving energy.

WO2024189796A1PCT designated stage expired Publication Date: 2024-09-19NT T INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/009937
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

In vRAN/AI inference technologies, CPU performance is degraded due to instruction conflicts in SMT technology, particularly with vector operations, leading to resource contention and unnecessary power consumption, as existing techniques fail to allocate CPU processing time effectively between processes.

Method used

A task scheduler device that utilizes hardware multithreading to allocate dedicated instruction execution processes to logical cores, determining core allocation based on the execution ratio of dedicated instructions and CPU arithmetic units, thereby minimizing core competition and power usage.

Benefits of technology

This approach ensures performance between dedicated instructions and reduces the number of cores required, achieving power savings by optimizing core allocation and minimizing contention between instruction types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023009937_19092024_PF_FP_ABST
    Figure JP2023009937_19092024_PF_FP_ABST
Patent Text Reader

Abstract

A task scheduler device (100, 100A) comprises: an applications dedicated instruction ratio acquisition unit (110) that acquires the execution ratio of a dedicated instruction for each application operating on a server; an in-CPU computing element configuration information recording unit (150) that records the number of in-CPU computing elements as the number of simultaneously executable instructions; a core allocation determination unit (120) that uses the execution ratio of the dedicated instruction and the number of the in-CPU computing elements to determine core allocation destinations to the same physical core; and a core allocation unit (160) that allocates logical cores (21, 22), where the processes can be operated, on the basis of the identifiers of the processes and the identifiers of the logical cores (21, 22) in accordance with the core allocation destinations determined by the core allocation determination unit (120).
Need to check novelty before this filing date? Find Prior Art

Description

Task scheduler device, task scheduling method and program

[0001] The present invention relates to a task scheduler device, a task scheduling method, and a program.

[0002] vRAN (virtual Radio Access Network) and AI (Artificial Intelligence) inference technologies make heavy use of CPU calculations. For example, applications that perform signal and media processing on the CPU (e.g., vRAN L1 signal processing and Deep-Learning) make heavy use of the CPU's SIMD (Single Instruction Multiple Data) instruction set extensions (e.g., Intel SSE / AVX512) ("Intel" is a registered trademark) for high-throughput calculation processing.

[0003] A conventional technique is to ensure equality by allocating a fixed amount of CPU time to each process (Non-Patent Document 1).

[0004] [Instruction Conflicts in SMT Technology] SMT (Simultaneous Multi-Threading), such as Intel Hyper Threading, is a technology that allows logical cores to share the CPU's microinstruction processors, thereby increasing the utilization rate of the processors. However, depending on the type of instruction, the execution of microinstructions within a core can conflict, resulting in performance degradation (known as a "port contention event"). Specifically, vector operation microinstructions, which are frequently used in vRAN, have a small number of built-in arithmetic units within the core, making them prone to conflicts.

[0005] Instruction contention in SMT technology will be described with reference to Figures 15 to 17. Figure 15 is a diagram showing the configuration of a CPU equipped with an SIMD unit that executes microinstructions within a core. As shown in Figure 15, a CPU 1 is equipped with four physical cores (CPU cores) 11. In this specification, a physical core 11 is a single CPU core that executes two or more processes simultaneously.

[0006] As shown in the enlarged view of Figure 15, the physical core 11 includes a logical core 21 (logical core <1>) and a logical core 22 (logical core <2>) that execute two threads per core, a decoder 23 that converts machine language read from registers 21a and 22a of the logical cores 21 and 22 into microinstructions, and a plurality of ports P0 to P6, each of which is connected to an in-CPU arithmetic unit 25 (e.g., an ALU (Arithmetic Logic Unit), ALD / STA (static timing analysis), STD (numeric_std in VHDL)).

[0007] As mentioned above, vector operation microinstructions have a small number of built-in arithmetic units within the core, making them prone to contention. For example, the Skylake generation Xeon ("Xeon" is a registered trademark) has four arithmetic units for general-purpose operations, but SIMD has two add / (" / " means "or") and two mul / shift units, and one shift unit.

[0008] As shown in the dashed box a in the enlarged view of Figure 15, general-purpose instructions (Scalar) have many arithmetic units and a high degree of parallelism. Therefore, resource contention is unlikely. On the other hand, as shown in the dashed box b in the enlarged view of Figure 15, VECTOR instructions (SIMD) have few arithmetic units and a low degree of parallelism. Therefore, resource contention is likely to occur.

[0009] In this way, the SIMD calculations of the CPU, which are frequently used in vRAN / AI inference, can result in performance competition between the logical core 21 and the logical core 22 within the same physical core 11 in an SMT configuration.

[0010] FIG. 16 is a diagram showing the configuration of a CPU when the microinstruction in FIG. 15 is a general-purpose instruction (Scalar). The upper diagram of FIG. 16 explains the operation of the CPU arithmetic unit 25 that executes the general-purpose instruction, and the lower diagram of FIG. 16 shows the parallel execution of the logic cores 21 and 22 in the upper diagram of FIG. 16. The execution portion of the corresponding microinstruction is indicated by a bold frame (the same notation applies below). As shown in the upper diagram of FIG. 16, there are many CPU arithmetic units 25 that execute general-purpose instructions, so conflicts are unlikely to occur. Therefore, as shown in the lower diagram of FIG. 16, the logic cores 21 and 22 can execute the general-purpose instruction in parallel, resulting in little performance degradation.

[0011] FIG. 17 is a diagram showing the configuration of a CPU when the microinstruction in FIG. 15 is a SIMD operation. The upper diagram of FIG. 17 explains the operation of the CPU arithmetic unit 25 that executes the VECTOR instruction (SIMD), and the lower diagram of FIG. 17 shows the parallel execution of the logic cores 21 and 22 in the upper diagram of FIG. 17. As indicated by the symbol c in the upper diagram of FIG. 17, the VECTOR instruction (SIMD) has few CPU arithmetic units 25 that execute SIMD instructions (only one, port P5), making contention more likely to occur. For this reason, as shown in the lower diagram of FIG. 17, the logic cores 21 and 22 have difficulty executing in parallel, leading to performance degradation. To avoid this, consideration must be given to the combination of each process, but the only technology available is that of Non-Patent Document 1, which allocates a fixed amount of CPU time to each process.

[0012] The gap between existing technologies and the requirements will be explained using the example of Linux CFS (Completely Fair Scheduler) ("Linux" is a registered trademark) in Non-Patent Document 1. FIG. 18 is a diagram showing the core allocation status. The same components as in FIG. 15 are assigned the same reference numerals. Non-Patent Document 1 is a technology that ensures fairness by allocating a fixed amount of CPU time to each process. Therefore, Non-Patent Document 1 does not consider the conflict of dedicated instructions between processes (symbol d in FIG. 18), and therefore does not satisfy "Requirement 1: Each process is allocated the CPU processing time it requires."

[0013] Linux CFS Scheduler,The Linux Kernel6.2.0,[online],[Retrieved on March 1, 2020],Internet〈URL: https: / / www.kernel.org / doc / html / latest / scheduler / sched-design-CFS.html〉

[0014] As described above, Non-Patent Document 1 does not take into consideration the conflict of dedicated instructions between processes, and therefore has the problem that the CPU processing time required by each process cannot be allocated, resulting in an excess number of execution cores and wasted power consumption.

[0015] The present invention has been made in view of this background, and aims to achieve power savings by ensuring performance for dedicated instructions and between dedicated instruction types while reducing the number of cores.

[0016] In order to solve the above-mentioned problems, a task scheduler device is provided in a computing system that executes dedicated instructions specialized for specific calculations, which uses hardware multithreading to make one physical core appear as multiple logical cores, and allocates execution processes of the dedicated instructions to the logical cores, the task scheduler device comprising: a dedicated instruction proportion acquisition unit that acquires the execution proportion of the dedicated instructions of each application running on a server; a CPU intra-calculator configuration information recording unit that records the number of CPU intra-calculator units as the number of instructions that can be executed simultaneously; a core allocation determination unit that determines a core allocation destination for the same physical core using the dedicated instruction execution proportion of the dedicated instruction proportion acquisition unit and the number of CPU intra-calculator units in the CPU intra-calculator configuration information recording unit; and a core allocation unit that allocates the core allocation destination determined by the core allocation determination unit to the logical core on which each process can operate, based on the process identifier and the logical core identifier.

[0017] According to the present invention, it is possible to ensure performance for dedicated instructions and between dedicated instruction types while reducing the number of cores, thereby achieving power savings.

[0018] 10 is a schematic configuration diagram of a computing system including a task scheduler device according to an embodiment of the present invention. FIG. 11 is a configuration diagram of a task scheduler device according to an embodiment of the present invention in which a VM / container is arranged. FIG. 12 is a diagram showing, in a table, the structure of a management database held by an application-specific instruction ratio acquisition unit of the task scheduler device according to an embodiment of the present invention. FIG. 13 is a diagram showing a table of the degree of contention between applications referenced by a core allocation determination unit of the task scheduler device according to an embodiment of the present invention. FIG. 14 is a diagram showing, in a table, the structure of a management database held by a core allocation status recording unit of the task scheduler device according to an embodiment of the present invention. FIG. 15 is a diagram showing an example of a table in which a CPU intra-processor configuration information recording unit of the task scheduler device according to an embodiment of the present invention manages information on each port. FIG. 16 is a diagram showing an example of a table in which the CPU intra-processor configuration information recording unit of the task scheduler device according to an embodiment of the present invention records only the maximum degree of parallelism for each instruction. FIG. 17 is a flowchart showing the operation of each unit when a new application is started up in the task scheduler device according to an embodiment of the present invention. FIG. 18 is a flowchart showing the judgment logic (part 1) of the core allocation determination unit of the task scheduler device according to an embodiment of the present invention. FIG. 19 is a diagram showing an example of calculation of the load amount in the flowchart of FIG. 10. FIG. 19 is a diagram showing an example of calculation of the core contention degree in the flowchart of FIG. 15 is a flowchart showing the judgment logic (part 2) of the core allocation judgment unit of the task scheduler device according to an embodiment of the present invention. FIG. 16 is a hardware configuration diagram showing an example of a computer that realizes the functions of the task scheduler device of the computing system according to an embodiment of the present invention. FIG. 17 is a diagram showing the configuration of a CPU equipped with a SIMD unit that executes microinstructions in a core. FIG. 18 is a diagram showing the configuration of a CPU when the microinstruction of FIG. 15 is a general-purpose instruction (Scalar). FIG. 19 is a diagram showing the configuration of a CPU when the microinstruction of FIG. 15 is a SIMD operation. FIG. 20 is a diagram showing the core allocation status of existing technology.

[0019] A task scheduler device and other components according to an embodiment of the present invention (hereinafter referred to as the "present embodiment") will be described below with reference to the accompanying drawings. [Overview] FIG. 1 is a schematic diagram of a computing system including a task scheduler device according to an embodiment of the present invention. Components identical to those in FIG. 15 are designated by the same reference numerals. This embodiment is an example in which the computing system is applied to a CPU. In addition to CPUs, the present invention can also be applied to processors such as GPUs (Graphic Processing Units), FPGAs (Field Programmable Gate Arrays), and ASICs (Application Specific Integrated Circuits). As shown in FIG. 1, a computing system 1000 includes a task execution request unit 30, an application instruction ratio management unit 40, a task scheduler device 100, and physical cores 11 and 12 (physical core <1> and physical core <2>) (processors) on the CPU.

[0020] The task execution request unit 30 requests task execution from the task scheduler device 100. The application command ratio management unit 40 manages application information and is called by the task scheduler device 100. The application information (e.g., vRAN task group) is, for example, as follows: Pre-coding (vector multiplication M-divide, vector shift N-divide) Demap Logger process (general-purpose command 100%) QR-Decompression Phase Noise Estimation Eigen Beamforming Pre-Coding De-mapping

[0021] The computing system 1000 executes dedicated instructions specialized for specific operations, including SIMD instructions or dedicated instructions for encryption, and includes a task scheduler device 100 that allocates execution processes of the dedicated instructions to logical cores using hardware multithreading, which simulates one physical core as multiple logical cores.

[0022] The physical core 11 (physical core <1>) has a logical core 21 (logical core <1>) and a logical core 22 (logical core <2>) that execute two threads. The logical core 21 executes the pre-coding process, and the logical core 22 executes the de-mapping process.

[0023] The physical core 12 (physical core <2>) has a logical core 21 (logical core <1>) and a logical core 22 (logical core <2>) that execute two threads. The logical core 21 executes a pre-coding process, and the logical core 22 executes a logger process.

[0024] <Management of Application Information> The task scheduler apparatus 100 manages the command types and frequencies of each application in a table (described later).

[0025] <Management of CPU Hardware Information> The task scheduler device 100 manages information on the number of arithmetic units and their configuration for each instruction type of the CPU in a table (see FIG. 11, which will be described later). During scheduling, each process is assigned to a logical core based on the management of the application information and the management of the CPU hardware information, so that the processes to be executed do not conflict with each other.

[0026] The task scheduler device 100 is a core allocation scheduler that allocates the logical cores 21 and 22 to a combination that does not cause conflicts, taking into account the execution rate of SIMD instructions (details will be described later). If a process that causes instruction conflicts is being executed, the task scheduler device 100 allocates the logical core to another physical core (symbol aa in FIG. 1), and allocates a process that is less likely to cause instruction execution conflicts to the remaining logical core (symbol bb in FIG. 1).

[0027] [Configuration of the Task Scheduler Apparatus] Fig. 2 is a configuration diagram of a task scheduler apparatus according to an embodiment of the present invention. As shown in Fig. 2, the task scheduler apparatus 100 is a core allocation scheduler within a server, and includes a CPU 50 (hardware (HW)), physical cores (physical core <1>, physical core <2>, ..., physical core <N>) 11 (processors) on the CPU 50, and a userland 60. The task scheduler apparatus 100 includes, in the userland 60, an application-specific instruction ratio acquisition unit 110, a core allocation determination unit 120, a core allocation status recording unit 130, a port contention status monitoring unit 140, an intra-CPU arithmetic unit configuration information recording unit 150, a core allocation unit 160, a port contention status acquisition unit 170, and an existing process core allocation change determination unit 180.

[0028] <CPU 50> The CPU 50 includes physical cores (physical core <1>, physical core <2>, ..., physical core <N>) 11. The physical cores (physical core <1>, physical core <2>, ..., physical core <N>) 11 have logical core <1> and logical core <2> that execute two threads per physical core by using hyperthreading to make one physical core appear as two. Here, physical core <1> has logical core <1> and logical core <2>, physical core <2> has logical core <3> and logical core <4>, and physical core <N> has logical core <2N-1> and logical core <2N>.

[0029] <Application-Dedicated Command Proportion Acquisition Unit 110> The application-dedicated command proportion acquisition unit 110 acquires the dedicated command execution proportion (proportion of execution of various dedicated commands) of each application running on the server.

[0030] Specifically, the application-specific instruction proportion acquisition unit 110 records an expected value of the proportion of execution of various dedicated instructions for each application running on the server (an example of using expected values ​​will be described later). The data acquired by the application-specific instruction proportion acquisition unit 110 includes the proportion of instructions included in the compile log used to create the various applications, and the type of application (various processing types such as pre-coding and demap among vRAN signal processing applications, AI inference applications, etc.). The application-specific instruction proportion acquisition unit 110 registers (records) this data before the system starts up.

[0031] Other Embodiments The control target may be a VM / container unit instead of a process, and the expected value of the execution rate of dedicated instructions for each VM / container may be recorded (FIG. 3).

[0032] <Core allocation determination unit 120> The core allocation determination unit 120 determines the core allocation destination for the same physical core using the execution rate of dedicated instructions from the application-specific instruction rate acquisition unit 110 and the number of CPU arithmetic units from the CPU arithmetic unit configuration information recording unit 150.

[0033] The core allocation determination unit 120 allocates each process to a logical core so that the processes to be executed do not conflict with each other. The core allocation determination unit 120 allocates logical cores so that the dedicated instructions and the dedicated instruction types are combined in a way that does not cause conflicts in performance.

[0034] The core allocation determination unit 120 preferentially allocates a process that executes a general-purpose instruction to a physical core to which a process that executes a dedicated instruction has been allocated. The core allocation determination unit 120 selects, from among the logical cores, a logical core in which a process that has the lowest degree of competition with the newly started process is running.

[0035] When a process with instruction conflicts is being executed, the core allocation determination unit 120 allocates it to another physical core, and allocates "processes with less instruction execution conflicts" to the remaining logical core. Examples of the "processes with less instruction execution conflicts" include "processes that mainly use general-purpose instructions," such as processes for managing calculation results and log storage processes. For example, in the case of Figure 7 described below, general-purpose instructions can be executed on four ports (Ports 0, 1, 5, and 6), so there are many options at execution time and they do not conflict with encryption-related instructions assigned only to Port 0 or vector shift instructions assigned only to Port 5.

[0036] The core allocation determination unit 120 is activated when a new application is launched or when the existing process core allocation change determination unit 180 detects a conflict, and determines the core allocation destination based on the execution rate of the dedicated instructions of the new process and the execution status of the dedicated instructions of the CPU core at the time of launch, and instructs the core allocation unit 160 to allocate the core.

[0037] <<Input>> The core allocation determination unit 120 receives the identifier of a new application to be launched. The core allocation determination unit 120 acquires an expected value of the execution ratio of dedicated instructions of the application to be launched from the application-dedicated instruction ratio acquisition unit 110. The core allocation determination unit 120 acquires the number of arithmetic units corresponding to each instruction of the CPU from the intra-CPU arithmetic unit configuration information recording unit 150. The core allocation determination unit 120 acquires the port contention status at the time of the application launch request from the port contention status acquisition unit 170.

[0038] <<Output>> The core allocation determination unit 120 notifies the core allocation status recording unit 130 of the core allocation determination result. The core allocation determination unit 120 notifies the core allocation unit 160 of the identifier of the newly started application and a list of the numbers of the logical cores to be allocated.

[0039] 《Other Embodiments》 It is also possible to have a table in advance for the degree of competition of combinations between tasks, obtain a list of processes assigned to each core from the core allocation status recording unit 130, and allocate cores with the combination having the lowest degree of competition. At this time, the degree of competition of combinations between tasks (Fig. 5) shall be tested and registered before the execution of the system. In addition, like the variation of Fig. 8 described later, in addition to calculating the degree of competition in units of Ports, it is also possible to consider only the maximum parallelism of instructions and determine the allocation in a form that judges the allocation.

[0040] <Core Allocation Status Recording Unit 130> The core allocation status recording unit 130 records the correspondence between each logical core and the process assigned to the corresponding core.

[0041] 《Input》 The core allocation status recording unit 130 obtains and updates the core allocation status from the core allocation judgment of the core allocation judgment unit 120 to a new process.

[0042] 《Other Embodiments》 It is also possible to periodically obtain and update the latest core allocation status from the OS scheduler (for example, update using the Linux taskset command).

[0043] <Port Competition Status Monitoring Unit 140> The Port competition status monitoring unit 140 periodically obtains the Port competition status of each physical core from the Port competition status acquisition unit 170, and when the degree of competition exceeds a certain value, notifies the number of the physical core with a high degree of competition to the existing process core allocation change judgment unit 180.

[0044] 《Input》 The Port competition status monitoring unit 140 obtains the Port competition status of each physical core from the Port competition status acquisition unit 170.

[0045] 《Output》 The Port competition status monitoring unit 140 notifies the existing process core allocation change judgment unit 180 of the number of the physical core where Port competition has occurred.

[0046] <CPU Internal Arithmetic Unit Configuration Information Recording Unit 150> The CPU internal arithmetic unit configuration information recording unit 150 records the number of the CPU internal arithmetic units as the number of executable instructions per Port (the number of instructions executable simultaneously) (examples of tables are shown in FIGS. 7 and 8 described later). The CPU internal arithmetic unit configuration information recording unit 150 takes a form of recording the number of executable instructions per Port as in the table of FIG. 7 described later.

[0047] 《Input / Output》 The data of the CPU internal arithmetic unit configuration information recording unit 150 is statically recorded before the operation of the system and does not have an update function.

[0048] 《Other Embodiments》 As shown in FIG. 8 described later, a form of recording only the parallelism of various instructions may be used.

[0049] <Core Allocation Unit 160> The core allocation unit 160 allocates the logical cores 21, 22 on which each process can operate based on the core allocation determination unit 120's determination of the core allocation destination and the identifiers of the process and the logical cores 21, 22.

[0050] The core allocation unit 160 sets the logical cores on which various processes can operate based on the identifier of the process and the identifier of the logical core. The taskset command that can specify the core number on which a process operates in Linux (registered trademark) to the OS kernel corresponds to this.

[0051] 《Other Embodiments》 Inside the OS kernel, the functions of this task scheduler device 100 may be incorporated in a form integrated with the process scheduling function.

[0052] <Port Competition Status Acquisition Unit 170> The Port competition status acquisition unit 170 acquires the competition status of each instruction execution Port from the hardware monitor mounted on the CPU. The hardware monitor as the acquisition destination corresponds to the PMC (Performance Monitoring Counter) of the Intel CPU.

[0053] <Existing process core allocation change determination unit 180> The existing process core allocation change determination unit 180 determines whether to change the existing process core allocation based on the acquired number of the physical core where the conflict is occurring, the port conflict status of the physical core, and the process allocation status to each core.

[0054] <<Input>> The existing process core allocation change determination unit 180 receives the number of a physical core where a conflict is occurring from the port conflict status monitoring unit 140. The existing process core allocation change determination unit 180 acquires the port conflict status of the physical core from the port conflict status acquisition unit 170. The existing process core allocation change determination unit 180 acquires the process allocation status to each core from the core allocation status recording unit 130.

[0055] <<Output>> The existing process core allocation change determination unit 180 notifies the core allocation determination unit 120 of a list of process identifiers and logical core identifiers as the correspondence relationships for new core allocation.

[0056] The prerequisite configuration of the computing system 1000 can be summarized as follows. In the computing system 1000, the CPU 50 on the computer (hereinafter referred to as the server) is configured to support general-purpose instructions and dedicated instructions (SIMD) specialized for specific operations. Server The server (task scheduler device 100) is equipped with a CPU (processor). The CPU has one or more physical cores. The CPU supports hardware multithreading technology, allowing a single physical core to appear as multiple logical cores.

[0057] Processes in which applications run on a server There are two types of processes that run on a server (task scheduler device 100): 1. Dedicated command execution process 2. General-purpose command execution process

[0058] There are multiple types of processes that run on the scheduler server (task scheduler device 100), and each type has a different ratio of executing dedicated commands.

[0059] [Example of Application to Task Scheduler Apparatus VM Configuration] FIG. 2 shows an example in which the task scheduler apparatus 100 is entirely included in the OS, but the task scheduler apparatus 100 does not have to be entirely included in the OS.

[0060] With the advancement of virtualization technology such as Network Functions Virtualization (NFV), systems are being built and operated for each service. In addition, a system called Service Function Chaining (SFC) is becoming mainstream, in which service functions are divided into reusable modules and run in independent virtual machine (VM, container, etc.) environments, allowing the modules to be used as components when needed to improve operability, instead of building a system for each service.

[0061] FIG. 3 is a configuration diagram illustrating a task scheduler apparatus 100A with a VM / container arrangement. Components identical to those in FIG. 2 are denoted by the same reference numerals. The task scheduler apparatus 100A includes a CPU 50, physical cores (physical core 1, physical core 2, ..., physical core N) 11 (processors) on the CPU 50, a virtual machine monitor (VMM) 70 on the OS / VM, and a container / VM 80. The OS / VMM 70 virtualizes a computer and allows multiple different OSs to run in parallel without interfering with each other. The OS / VMM 70 creates virtual machines (VMs) that behave like physical computers to software, and can run various types of OSs on them.

[0062] The task scheduler device 100A includes, in the OS / VMM 70, a core allocation determination unit 120, a core allocation status recording unit 130, a port contention status monitoring unit 140, a CPU internal arithmetic unit configuration information recording unit 150, a core allocation unit 160, a port contention status acquisition unit 170, and an existing process core allocation change determination unit 180.

[0063] The container / VM 80 includes a container / VM1, a container / VM2, and a container / VM3, and each of the containers / VM1 to 3 has an application-specific command proportion acquisition unit 110. Each application-specific command proportion acquisition unit 110 records (pre-registers) an expected value of the proportion of execution of various dedicated commands for each application running in each of the containers / VM1 to 3, and provides the expected value to the core allocation determination unit 120 located in the OS / VMM 70.

[0064] When using virtual machines (VMs) or containers, the core allocation function is aggregated outside each container / VM instance, such as the OS / VMM, to allocate cores across containers / VMs. This enables allocation across containers / VMs. In this case, only the function for acquiring the dedicated instruction ratio for each process is placed within each container / VM.

[0065] [Table of Application-Specific Instruction Proportion Acquisition Unit 110] Fig. 4 is a diagram showing, in the form of a table, the structure of the management database held by each application-specific instruction proportion acquisition unit 110. The database shown in Fig. 4 records, for each application name (e.g., Signal_proc_1, Logger, etc.), the instruction type (e.g., vector addition, vector multiplication, general-purpose instruction, encryption-related instruction, etc.) and the expected value of the execution ratio (calculation of the expected value will be explained later in Fig. 11).

[0066] [Table of Core Allocation Determining Unit 120] Fig. 5 is a diagram showing a table of the degree of contention between applications referenced by the core allocation determining unit 120. The database shown in Fig. 5 records the degree of contention associated with the correspondence between application 1 (e.g., Signal_proc_1, Signal_proc_2, etc.) and application 2 (e.g., Signal_proc_2, Logger, etc.).

[0067] [Table of Core Allocation Status Recording Unit 130] Fig. 6 is a diagram showing in table form the structure of the management database held by the core allocation status recording unit 130. The database shown in Fig. 6 records each core identifier (core ID) (e.g., logical core 1, logical core 2, etc.), physical core number (e.g., physical core 1, physical core 2, etc.), and assigned process identifier.

[0068] [Management Table of Port Information of CPU Calculation Unit Configuration Information Recording Unit 150] Fig. 7 is a diagram showing an example of a table when the CPU Calculation Unit Configuration Information Recording Unit 150 manages each port information. The table shown in Fig. 7 stores an instruction list (e.g., general-purpose instruction, vector multiplication, vector addition, vector general-purpose instruction, encryption-related instruction, etc.) for each port number. For example, the instruction list of the CPU Calculation Unit connected to Port number "0" is "general-purpose instruction, vector multiplication, vector addition, vector general-purpose instruction, encryption-related instruction," the instruction list of the CPU Calculation Unit connected to Port number "2" is only "memory-related instructions," and the instruction list of the CPU Calculation Unit connected to Port number "6" is "general-purpose instructions."

[0069] [Management Table Recording Only the Maximum Degree of Parallelism of Each Instruction in the CPU Calculation Unit Configuration Information Recording Unit 150] Fig. 8 is a diagram showing an example of a table in which the CPU Calculation Unit Configuration Information Recording Unit 150 records only the maximum degree of parallelism of each instruction. The table shown in Fig. 8 stores the maximum degree of parallelism for various instructions (e.g., vector addition, vector multiplication, vector shift, vector general-purpose instruction, encryption-related instruction, etc.). For example, if the various instructions are "encryption-related instructions," the maximum degree of parallelism is the minimum of "1," and if the various instructions are "general-purpose instructions," the maximum degree of parallelism is the maximum of "4."

[0070] The operation of the computing system 1000 configured as described above will be described below. [When a New Application is Launched by the Task Scheduler Apparatus] FIG. 9 is a flowchart showing the operation of each component when a new application is launched by the task scheduler apparatus 100. This flow starts with the launch of a new process. In step S1, the core allocation determination unit 120 is activated in response to the launch of a new application or the detection of a conflict by the existing process core allocation change determination unit 180. The core allocation determination unit 120 determines a core allocation destination based on the execution rate of dedicated instructions of the new process and the execution status of dedicated instructions of the CPU cores at the time of launch, and instructs the core allocation unit 160 to allocate the core. That is, the core allocation determination unit 120, triggered by the launch of a new process, inquires of the application-dedicated instruction rate acquisition unit 110 about the execution rate of dedicated instructions. The core allocation determination unit 120 also inquires of the CPU intra-processor configuration information recording unit 150 about the core allocation destination. The core allocation determination unit 120 also inquires of the port conflict status acquisition unit 170 about the conflict status of each instruction execution port. Furthermore, the core allocation determination unit 120 acquires and updates the core allocation status from the core allocation status recording unit 130. The dashed-line boxes in Figure 9 indicate the processing of each unit that has received an inquiry or the like from the core allocation determination unit 120.

[0071] In step S11, the application-specific instruction ratio acquisition unit 110 acquires the execution ratio of specific instructions (the ratio of execution of various specific instructions) for each application running on the server. In step S12, the CPU-internal arithmetic unit configuration information recording unit 150 records the number of arithmetic units in the CPU as the number of executable instructions for each port.

[0072] In step S13, the port contention status acquisition unit 170 acquires the contention status of each instruction execution port from the hardware monitor installed in the CPU. In step S14, the core allocation status recording unit 130 records the correspondence between each logical core and the process assigned to that core.

[0073] In step S2, the core allocation determination unit 120 receives the identifier of the newly launched application, and sets logical cores on which various processes can run based on the process identifier and the logical core identifier, and then ends the processing of this flow.

[0074] 10 to 12 are diagrams illustrating the determination logic (part 1) of the core allocation determination unit 120. Fig. 10 is a flowchart showing the determination logic (part 1) of the core allocation determination unit 120, Fig. 11 is a diagram showing an example of calculation of the load amount in the flowchart of Fig. 10, and Fig. 12 is a diagram showing an example of calculation of the core contention degree in the flowchart of Fig. 10.

[0075] In step S21, the core allocation determination unit 120 obtains the proportion of instructions to be executed from the application-specific instruction proportion acquisition unit 110. For example, as shown in the upper diagram of Figure 11, the core allocation determination unit 120 obtains the port number for each instruction type and the proportion of instructions to be executed. In step S22, the core allocation determination unit 120 obtains configuration information of the arithmetic unit in the CPU from the arithmetic unit in the CPU configuration information recording unit 150.

[0076] In step S23, the core allocation determination unit 120 calculates the load (expected value) of each port. As shown by the symbol cc in FIG. 11 , the core allocation determination unit 120 divides the proportion of operations equally among each port. Specifically, in FIG. 11 , the "general instruction" instruction type shown in the upper diagram of FIG. 11 is assigned port numbers "0, 1, 5, 6," and the proportion of instructions to be executed is "0.4." In this case, as shown in the lower diagram of FIG. 11 , the load (expected value) of each port is calculated by dividing the proportion of instructions to be executed (0.4) by the number of ports (4) for each port number "0, 1, 5, 6." Here, the "vector shift" instruction type shown in the upper diagram of FIG. 11 is assigned port number "5," and the proportion of instructions to be executed is "0.6." In other words, port number "5" overlaps with port numbers "0, 1, 5, 6" for the "general instruction" and port number "5" for the "vector shift." Therefore, the load (expected value) on port number "5" is 0.7 (=0.6 / 1+0.4 / 4).

[0077] In step S24, the core allocation determiner 120 acquires the port contention status (port contention degree) from the port contention status acquirer 170. Here, the core allocation determiner 120 acquires the current contention degree for the port number shown in FIG.

[0078] In step S25, the core allocation determination unit 120 calculates the "degree of contention for each instruction for each core" by multiplying the expected load (amount of load) for each port acquired by the application-specific instruction proportion acquisition unit 110 by the port contention status corresponding to each instruction in the core allocation status recording unit 130. The core allocation determination unit 120 adds up the above results to obtain the "degree of contention with each core."

[0079] A more detailed explanation follows. The core allocation determination unit 120 multiplies the expected load (amount of load) for each port by a value indicating the port contention status to calculate the contention level for each port. The core allocation determination unit 120 then adds up the contention levels for all ports to determine the contention level for the corresponding core. When obtaining the current contention levels for the port numbers shown in FIG. 12, the core contention level is calculated using the following formula: Core Contention Level = 0.1 x 0.3 + 0.1 x 0.4 + 0.7 x 0.2 + 0.1 x 0.1 In the above formula, the first term, 0.1 x 0.3, represents Port 0, the second term, 0.1 x 0.3, represents Port 1, the third term, 0.1 x 0.3, represents Port 5, and the fourth term, 0.1 x 0.3, represents Port 6.

[0080] In step S26, the core allocation determination unit 120 selects the core with the lowest contention level (core contention level). If a process with conflicting instructions is being executed, the core allocation determination unit 120 allocates the core to another physical core and ends the processing of this flow.

[0081] [Decision Logic (Part 2) of Core Allocation Determining Unit 120] Fig. 13 is a flowchart showing the decision logic (part 2) of the core allocation determining unit 120. The degree of competition between applications in the flowchart of Fig. 13 is shown in the table of the degree of competition between applications in Fig. 5. In step S31, the core allocation determining unit 120 obtains the process allocation status to each logical core from the core allocation status recording unit 130.

[0082] In step S32, the core allocation determination unit 120 selects, from among the logical cores, the process to be newly started and "the logical core on which the process with the lowest contention degree is running" (see the table of contention degrees between applications in FIG. 5). If a process with instruction conflict is running, the core allocation determination unit 120 assigns a process with less instruction execution conflict to the remaining logical core, and ends the processing of this flow.

[0083] [Hardware Configuration] The task scheduler apparatus 100, 100A (FIGS. 2 and 3) according to the above-described embodiment is realized by, for example, a computer 900 configured as shown in FIG. 14. FIG. 14 is a hardware configuration diagram showing an example of the computer 900 that realizes the functions of the task scheduler apparatus 100, 100A (FIGS. 2 and 3). The computer 900 has a CPU 901, a ROM 902, a RAM 903, a HDD 904, a communication interface (I / F) 906, an input / output interface (I / F) 905, and a media interface (I / F) 907.

[0084] The CPU 901 operates based on programs stored in the ROM 902 or the HDD 904, and controls each unit of the task scheduler apparatus 100, 100A (FIGS. 2 and 3). The ROM 902 stores a boot program executed by the CPU 901 when the computer 900 starts up, programs that depend on the hardware of the computer 900, and the like.

[0085] The CPU 901 controls an input device 910 such as a mouse or keyboard, and an output device 911 such as a display, via an input / output I / F 905. The CPU 901 acquires data from the input device 910 via the input / output I / F 905, and outputs generated data to the output device 911. Note that a GPU (Graphics Processing Unit) or the like may be used as a processor together with the CPU 901.

[0086] The HDD 904 stores programs executed by the CPU 901 and data used by the programs. The communication I / F 906 receives data from other devices via a communication network (e.g., NW (Network) 920) and outputs the data to the CPU 901, and also transmits data generated by the CPU 901 to other devices via the communication network.

[0087] The media I / F 907 reads a program or data stored in the recording medium 912 and outputs it to the CPU 901 via the RAM 903. The CPU 901 loads a program related to a target process from the recording medium 912 onto the RAM 903 via the media I / F 907, and executes the loaded program. The recording medium 912 is an optical recording medium such as a DVD (Digital Versatile Disc) or a PD (Phase Change Rewritable Disc), a magneto-optical recording medium such as an MO (Magneto Optical Disc), a magnetic recording medium, a conductive memory tape medium, a semiconductor memory, or the like.

[0088] For example, when the computer 900 functions as the task scheduler apparatus 100, 100A (FIGS. 2 and 3) configured as one apparatus according to this embodiment, the CPU 901 of the computer 900 realizes the functions of the task scheduler apparatus 100, 100A by executing a program loaded onto the RAM 903. The HDD 904 also stores data in the RAM 903. The CPU 901 reads and executes a program related to a target process from a recording medium 912. Alternatively, the CPU 901 may read a program related to a target process from another apparatus via a communication network (NW 920).

[0089] [Effects] As described above, in the computing system 1000 (FIGS. 1 to 3) that executes dedicated instructions specialized for specific operations, the task scheduler device 100 (FIGS. 2 and 3) uses hardware multithreading to make one physical core 11 appear as multiple pseudo logical cores 21 and 22, and allocates execution processes of dedicated instructions (SIMD instructions) to the logical cores 21 and 22. The task scheduler device 100 includes an application-specific instruction ratio acquisition unit 110 (FIGS. 2 and 3) that acquires the execution ratio of dedicated instructions for each application running on the server, and a number of instructions that can be executed simultaneously (for example, per port). the number of CPU arithmetic units as the number of executable instructions per application; a core allocation determination unit 120 (FIGS. 2 and 3) that determines a core allocation destination for the same physical core using the execution rate of dedicated instructions from the application-dedicated instruction rate acquisition unit 110 and the number of CPU arithmetic units in the CPU arithmetic unit configuration information recording unit 150; and a core allocation unit 160 (FIGS. 2 and 3) that allocates the core allocation destination determined by the core allocation determination unit 120 to logical cores 21 and 22 on which each process can operate, based on the identifiers of the process and the identifiers of the logical cores 21 and 22.

[0090] In this way, the task scheduler apparatus 100, 100A can allocate cores in a combination that does not conflict, based on the ratio of dedicated instructions for each application and the number of arithmetic units in the CPU. In other words, although there are multiple types of processes running on a server machine, each of which executes dedicated instructions at a different ratio, the server can allocate the CPU time required for each process to a group of processes including dedicated instruction execution processes, while minimizing the number of physical cores for execution.

[0091] The requirements to be achieved can be summarized as follows: Requirement 1: (Performance) [CPU processing time required for each process is allocated] Requirement 2: (Power saving) [The number of execution cores required to execute each process is minimized (minimization of the number of execution cores)] Requirements 1 and 2 above can be achieved.

[0092] As a result, the task scheduler apparatus 100, 100A can ensure performance for dedicated instructions and between dedicated instruction types while reducing the number of cores, thereby achieving power savings.

[0093] In the task scheduler apparatus 100, 100A (FIGS. 2 and 3), the core allocation determination unit 120 allocates each process to a logical core so that the processes to be executed do not conflict with each other.

[0094] In this way, the task scheduler apparatus 100, 100A can allocate the CPU processing time required by each process, thereby ensuring performance while reducing the number of cores, thereby achieving power savings.

[0095] In the task scheduler apparatus 100, 100A (FIGS. 2 and 3), the core allocation determination unit 120 allocates logical cores to combinations of dedicated instructions and types of dedicated instructions that do not conflict with each other in terms of performance.

[0096] By doing this, the task scheduler device 100, 100A can minimize the number of execution cores by allocating processes in consideration of dedicated instruction conflicts between processes and performance conflicts between dedicated instructions and dedicated instruction types.

[0097] In the task scheduler apparatus 100, 100A (FIGS. 2 and 3), the core allocation determination unit 120 preferentially allocates a process that executes a general-purpose instruction to a physical core to which a process that executes a dedicated instruction is allocated.

[0098] In this way, the task scheduler apparatus 100, 100A can satisfy "Requirement 1: the CPU processing performance required for each process is allocated within a certain time" by preferentially allocating a process that executes a general-purpose instruction to a physical core to which a process that executes a dedicated instruction is assigned. Furthermore, the task scheduler apparatus 100, 100A can reduce the number of operating cores because the "dedicated instruction process" and other processes run in parallel on the physical core on which the dedicated instruction process runs, thereby satisfying "Requirement 2: minimizing the number of execution cores."

[0099] In the task scheduler devices 100 and 100A (FIGS. 2 and 3), the core allocation determination unit 120 selects, from among the logical cores 21 and 22, a logical core on which a process with the lowest degree of competition for a newly started process is running.

[0100] By doing this, the task scheduler device 100, 100A can assign a logical core on which a process with the lowest degree of contention is running to a newly launched process, thereby assigning a process with which command execution is less likely to conflict with the newly launched process.

[0101] In the task scheduler device 100, 100A (Figures 2 and 3), when a process with instruction conflicts is being executed, the core allocation determination unit 120 allocates the process to another physical core, and also allocates a process with less instruction execution conflicts to the remaining logical core.

[0102] In this way, the task scheduler apparatus 100, 100A allocates a process with less conflicting instruction execution to another physical core if a process with conflicting instructions is being executed, and allocates a process with less conflicting instruction execution to the remaining logical core. As a result, the task scheduler apparatus 100, 100A can ensure performance while reducing the number of cores, thereby saving power, by allocating a process with less conflicting instruction execution to a logical core even if a process with conflicting instructions is being executed.

[0103] The computing system 1000 (FIGS. 1 to 3) is a computing system in which a CPU (processor) on a server supports general-purpose instructions and dedicated instructions specialized for specific operations (SIMD operation instructions and dedicated instructions for encryption). The above processor can also be applied to processors other than CPUs, such as GPUs, FPGAs, and ASICs, if they have a SIMD operation execution core specific function.

[0104] The dedicated instruction may be any instruction specialized for a specific operation. In this embodiment, a dedicated instruction for an SIMD instruction or encryption is used as an example, but SIMD / encryption is merely an example, and the dedicated instruction may be applied to dedicated instructions other than SIMD / encryption in the same manner.

[0105] Note that, among the processes described in the above embodiments, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically using known methods. Furthermore, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above documents and drawings can be changed as desired unless otherwise specified. Furthermore, the components of each device shown in the drawings are functionally conceptual and do not necessarily have to be physically configured as shown. In other words, the specific form of distribution and integration of each device is not limited to that shown in the drawings, and all or part of the devices can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc.

[0106] Furthermore, the above-described configurations, functions, processing units, processing means, etc. may be partially or entirely implemented in hardware, for example, by designing them as integrated circuits. The above-described configurations, functions, etc. may also be implemented by software that causes a processor to interpret and execute programs that implement the respective functions. Information such as programs, tables, and files that implement the respective functions may be stored in a memory, a recording device such as a hard disk or a solid-state drive (SSD), or a recording medium such as an integrated circuit (IC) card, a secure digital (SD) card, or an optical disk.

[0107] 11 Physical core 21, 22 Logical core 50 CPU 60 Userland 100, 100A Task scheduler device 110 Acquisition unit for each application's dedicated instruction ratio (dedicated instruction ratio acquisition unit) 120 Core allocation determination unit 130 Core allocation status recording unit 140 Port contention status monitoring unit 150 CPU internal arithmetic unit configuration information recording unit 160 Core allocation unit 170 Port contention status acquisition unit 180 Existing process core allocation change determination unit 1000 Computing system

Claims

1. A task scheduler device in a computing system that executes dedicated instructions specialized for specific calculations, which uses hardware multithreading to make a single physical core appear as multiple logical cores, and assigns execution processes of the dedicated instructions to the logical cores, comprising: a dedicated instruction ratio acquisition unit that acquires the execution ratio of the dedicated instructions of each application running on a server; a CPU intra-processor configuration information recording unit that records the number of CPU intra-processor units as the number of instructions that can be executed simultaneously; a core allocation determination unit that determines a core allocation destination for the same physical core using the dedicated instruction execution ratio of the dedicated instruction ratio acquisition unit and the number of CPU intra-processor units in the CPU intra-processor configuration information recording unit; and a core allocation unit that assigns the core allocation destination determined by the core allocation determination unit to the logical core on which each process can run, based on the process identifier and the logical core identifier.

2. The task scheduler device according to claim 1, wherein said core allocation determination unit allocates each process to said logical core so that processes to be executed do not compete with each other.

3. The task scheduler device according to claim 1, wherein said core allocation determination unit allocates logical cores so as to provide a combination of said dedicated instructions and types of said dedicated instructions that do not conflict with each other in terms of performance.

4. The task scheduler device according to claim 1, characterized in that the core allocation determination unit preferentially allocates a process that executes general-purpose instructions to the physical core to which the process that executes the dedicated instructions is allocated.

5. The task scheduler device according to claim 1, characterized in that the core allocation determination unit selects, from among the logical cores, the logical core in which a process with the lowest degree of contention with a newly started process is running.

6. The task scheduler device according to claim 1, characterized in that the core allocation determination unit, when a process involving instruction conflicts is being executed, allocates the process to another of the physical cores, and allocates a process that is less likely to involve instruction execution conflicts to the remaining logical cores.

7. A task scheduling method for a task scheduler device in a computing system which executes dedicated instructions specialized for specific calculations, using hardware multithreading to make one physical core appear as multiple logical cores, and assigning execution processes of the dedicated instructions to the logical cores, wherein the task scheduler device executes the following steps: acquiring the execution ratio of the dedicated instructions of each application running on a server; recording the number of CPU processing units as the number of instructions which can be executed simultaneously; determining a core assignment destination for the same physical core using the acquired execution ratio of the dedicated instructions and the number of CPU processing units; and assigning the determined core assignment destination to the logical core on which each process can operate, based on the process identifier and the logical core identifier.

8. A program for causing a computer to function as the task scheduler device according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for processing scheduling of vector instruction

    JP1995013963A

  • Workload-based cognitive dynamic computing system optimization

    US20210208932A1