Task scheduler device, task scheduling method, and program
The task scheduler device optimizes core allocation in vRAN/AI inference by determining execution ratios and allocating logical cores based on CPU arithmetic units, addressing CPU contention and power efficiency issues in SMT technology.
Patent Information
- Application Number
- PCT/JP2023/043343
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-14
- Filing Date
- 2023-12-04
- Publication Date
- 2024-09-19
AI Technical Summary
In vRAN/AI inference technologies, CPU resource contention due to SMT technology leads to performance degradation, especially with vector operation microinstructions, as they compete for limited arithmetic units, resulting in inefficient core allocation and excessive power consumption.
A task scheduler device that determines the execution ratio of dedicated instructions and allocates logical cores based on CPU internal arithmetic unit configuration, using a dedicated instruction ratio acquisition unit and core allocation determination unit to optimize core allocation and reduce contention, thereby ensuring performance and power efficiency.
The solution effectively allocates CPU resources to minimize core usage while maintaining performance, reducing power consumption by optimizing core allocation and minimizing contention between dedicated and general-purpose instructions.
Smart Images

Figure JP2023043343_19092024_PF_FP_ABST
Abstract
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 41 to 43. Figure 41 is a diagram showing the configuration of a CPU equipped with an SIMD unit that executes microinstructions within a core. As shown in Figure 41, 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 41, the physical core 11 comprises 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 a 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 41, 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 41, 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. 42 is a diagram showing the configuration of a CPU when the microinstruction in FIG. 41 is a general-purpose instruction (Scalar). The upper diagram of FIG. 42 explains the operation of the CPU arithmetic unit 25 that executes the general-purpose instruction, and the lower diagram of FIG. 42 shows the parallel execution of the logic cores 21 and 22 in the upper diagram of FIG. 42. 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. 42, 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. 42, the logic cores 21 and 22 can execute the general-purpose instruction in parallel, resulting in little performance degradation.
[0011] FIG. 43 shows the configuration of a CPU when the microinstruction in FIG. 41 is a SIMD operation. The upper diagram of FIG. 43 explains the operation of the CPU arithmetic unit 25 that executes the VECTOR instruction (SIMD), and the lower diagram of FIG. 43 shows the parallel execution of the logic cores 21 and 22 in the upper diagram of FIG. 43. As indicated by the symbol c in the upper diagram of FIG. 43, 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. 43, 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. 44 is a diagram showing the core allocation status. The same components as in FIG. 41 are assigned the same reference numerals. Non-Patent Document 1 is a technology that ensures fairness by allocating a certain 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. 44), and therefore does not satisfy "Requirement 1: Each process is allocated the CPU processing time it requires."
[0013] Linux CFS Scheduler, The Linux Kernel 6.2.0, [online], [Retrieved March 1, 2023], Internet〈URL: https: / / www.kernel.org / doc / html / latest / scheduler / sched-design-CFS.html〉 srsRAN workerpool, [online], [Retrieved November 1, 2023], Internet〈URL: https: / / docs.srsran.com / projects / project / en / latest / knowledge_base / source / gnb_components / source / index.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 which comprises: a dedicated instruction proportion acquisition unit which acquires the execution proportion of dedicated instructions specialized for specific calculations for each application running on a server; a CPU intra-calculator configuration information recording unit which records the number of CPU intra-calculators as the number of instructions that can be executed simultaneously; a core allocation determination unit which 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-calculators in the CPU intra-calculator configuration information recording unit; and a core allocation unit which allocates the logical core on which each process can operate for the core allocation destination determined by the core allocation determination unit 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] FIG. 1 is a schematic configuration diagram of a computing system including a task scheduler device according to a first embodiment of the present invention. FIG. 1 is a configuration diagram of a task scheduler device according to a first embodiment of the present invention, in which a VM / container is arranged using the task scheduler device according to the first embodiment of the present invention. FIG. 2 is a diagram showing, in a table form, the structure of a management database held by an application-dedicated instruction ratio acquisition unit of the task scheduler device according to the first embodiment of the present invention. FIG. 3 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 the first embodiment of the present invention. FIG. 4 is a diagram showing, in a table form, the structure of a management database held by a core allocation status recording unit of the task scheduler device according to the first embodiment of the present invention. FIG. 5 is a diagram showing an example of a table in which a CPU intra-processing unit configuration information recording unit of the task scheduler device according to the first embodiment of the present invention manages information on each port. FIG. 6 is a diagram showing an example of a table in which the CPU intra-processing unit configuration information recording unit of the task scheduler device according to the first embodiment of the present invention records only the maximum degree of parallelism of each instruction. FIG. 7 is a flowchart showing the operation of each unit when a new application is started up in the task scheduler device according to the first embodiment of the present invention. 11 is a diagram showing an example of calculation of load amount in the flowchart of FIG. 10. FIG. 11 is a diagram showing an example of calculation of core contention degree in the flowchart of FIG. 10. FIG. 12 is a flowchart showing judgment logic (part 2) of a core allocation judgment unit of a task scheduler device according to a first embodiment of the present invention. FIG. 13 is a diagram explaining allocation of RAN L1 tasks described in Non-Patent Document 2. FIG. 14 is a diagram explaining the basic idea of the present invention. FIG. 15 is a configuration diagram of a task scheduler device according to a second embodiment of the present invention. FIG. 16 is a configuration diagram of a task scheduler device applied to a vRAN DU system of the present invention. FIG. 17 is a configuration diagram in which a task scheduler device according to the second embodiment of the present invention is arranged for VMs and containers. FIG. 18 is a diagram showing a table of an example data structure of a recording unit for each task-dedicated instruction usage ratio of a task scheduler device according to the second embodiment of the present invention. FIG. 19 is a diagram showing a data structure table of an example data structure of a low latency requirement recording unit of a task scheduler device according to the second embodiment of the present invention.1 is a diagram showing a data structure table of an example of the data structure of each task load recording unit of a task scheduler device according to a second embodiment of the present invention. FIG. 2 is a diagram showing a required isolation degree / number of cores table derived by a required isolation degree / number of cores calculation unit for each task of a core allocation determination unit of a task scheduler device according to a second embodiment of the present invention. FIG. 3 is a diagram showing a required isolation degree / number of cores table used in vRAN derived by a required isolation degree / number of cores calculation unit for each task of a core allocation determination unit of a task scheduler device according to a second embodiment of the present invention. FIG. 4 is a diagram explaining an example of derivation of a required isolation degree / number of cores table of a task scheduler device according to a second embodiment of the present invention. FIG. 5 is a diagram showing a correspondence relationship between priority groups for each task type, used when the required isolation degree / number of cores calculation unit for each task of a task scheduler device according to a second embodiment of the present invention pre-groups the priorities of task execution. FIG. 6 is a diagram showing a correspondence relationship between priority groups for each task type and assigned cores of a task scheduler device according to a second embodiment of the present invention. FIG. 7 is a diagram explaining task allocation when task execution grouping is not performed in a task scheduler device according to a second embodiment of the present invention. 34 is a diagram illustrating task allocation when grouping task executions of a task scheduler device according to a second embodiment of the present invention. FIG. 35 is a flowchart illustrating a core allocation determination sequence of a task scheduler device according to a second embodiment of the present invention. FIG. 36 is a flowchart illustrating a sequence during task processing of a task scheduler device according to a second embodiment of the present invention. FIG. 37 is a flowchart illustrating a core allocation determination sequence of a core allocation determination unit of a task scheduler device according to a second embodiment of the present invention. FIG. 38 is a configuration diagram of a <Modification 1> of a task scheduler device according to a second embodiment of the present invention. FIG. 39 is a flowchart illustrating a core allocation determination sequence of the task scheduler device shown in FIG. 32. FIG. 39 is a configuration diagram of a <Modification 2> of a task scheduler device according to a second embodiment of the present invention. FIG. 39 is a flowchart illustrating a core allocation determination sequence of the task scheduler device shown in FIG. 34. FIG. 39 is a configuration diagram of a <Modification 3> of a task scheduler device according to a second embodiment of the present invention. FIG. 39 is a flowchart illustrating a core allocation determination sequence of the task scheduler device shown in FIG.FIG. 41 is a configuration diagram of a <Modification 4> of a task scheduler device according to a second embodiment of the present invention. FIG. 32 is a flowchart showing a core allocation determination sequence of the task scheduler device shown in FIG. 38. FIG. 43 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 the first and second embodiments of the present invention. FIG. 44 is a diagram showing the configuration of a CPU equipped with a SIMD unit that executes microinstructions in a core. FIG. 45 is a diagram showing the configuration of a CPU when the microinstruction of FIG. 41 is a general-purpose instruction (Scalar). FIG. 46 is a diagram showing the configuration of a CPU when the microinstruction of FIG. 41 is a SIMD operation. FIG. 47 is a diagram showing the core allocation status of existing technology.
[0019] A task scheduler device and the like in an embodiment of the present invention (hereinafter referred to as "the present embodiment") will be described below with reference to the drawings. (First Embodiment) [Overview] FIG. 1 is a schematic configuration diagram of a computing system including a task scheduler device according to a first embodiment of the present invention. Components identical to those in FIG. 41 are designated by the same reference numerals. This first 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 the task scheduler apparatus according to the first 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 determination result of core allocation. The core allocation determination unit 120 notifies the core allocation unit 160 of the identifier of the newly started application and the list of numbers of logical cores to be allocated.
[0039] Other embodiments: It may be configured to have a pre-stored table of the degree of conflict between combinations of each task, obtain a list of processes allocated to each core from the core allocation status recording unit 130, and allocate cores with the combination having the lowest degree of conflict. At this time, the degree of conflict between combinations of each task (FIG. 5) is assumed to be tested and registered before the execution of the system. In addition, in a form like the variation of FIG. 8 described later, in addition to calculating the degree of conflict in units of Ports, it may be configured to consider only the maximum parallelism of instructions and determine 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 allocated to the corresponding core.
[0041] Input: The core allocation status recording unit 130 obtains and updates the core allocation status from the determination of core allocation to a new process by the core allocation determination unit 120.
[0042] Other embodiments: It may also be configured to periodically obtain and update the latest core allocation status from the OS scheduler (for example, update using the Linux taskset command).
[0043] <Port Conflict Status Monitoring Unit 140> The Port conflict status monitoring unit 140 periodically obtains the Port conflict status of each physical core from the Port conflict status acquisition unit 170, and when the degree of conflict exceeds a certain value, notifies the existing process core allocation change determination unit 180 of the number of the physical core with a high degree of conflict.
[0044] Input: The Port conflict status monitoring unit 140 obtains the Port conflict status of each physical core from the Port conflict status acquisition unit 170.
[0045] 《Output》 The Port competition status monitoring unit 140 notifies the existing process core allocation change determination unit 180 of the numbers of the physical cores where Port competition occurs.
[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 (the number of simultaneously executable instructions) for each Port (an example of a table is shown in FIG. 8 described later). The CPU internal arithmetic unit configuration information recording unit 150 takes a form of recording the number of executable instructions for each Port as in the table of FIG. 8 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, the CPU internal arithmetic unit configuration information recording unit 150 may also take a form of recording only the parallelism of various instructions.
[0049] <Core allocation unit 160> The core allocation unit 160 allocates the logical cores 21 and 22 on which each process can operate based on the identifier of the process and the identifiers of the logical cores 21 and 22 as the core allocation destination determined by the core allocation determination unit 120.
[0050] Specifically, the core allocation unit 160 sets the logical cores on which various processes can operate by using the taskset command that can specify the core number on which a process operates in Linux to the OS kernel.
[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 corresponding hardware monitor for the acquisition destination is 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 of new core allocations.
[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 1 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, which divides service functions into reusable modules and runs them in independent virtual machine (VM, container, etc.) environments, allowing them 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 this to a core allocation determination unit 120 arranged 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, "a logical core on which a process with the lowest degree of contention is running" for the newly started process (see the table of inter-application contention in FIG. 5). If a process with instruction conflicts is running, the core allocation determination unit 120 assigns a process with less instruction execution conflicts to the remaining logical core, and ends the processing of this flow.
[0083] Effects of the First Embodiment As described above, the task scheduler device 100 ( FIGS. 2 and 3 ) includes: an application-specific instruction proportion acquisition unit 110 ( FIGS. 2 and 3 ) that acquires the execution proportion of dedicated instructions specialized for a specific operation for each application running on a server; an intra-CPU arithmetic unit configuration information recording unit 150 ( FIGS. 2 and 3 ) that records the number of intra-CPU arithmetic units as the number of simultaneously executable instructions (e.g., the number of executable instructions per port); a core allocation determination unit 120 ( FIGS. 2 and 3 ) that determines a core allocation destination for a same physical core using the execution proportion of the dedicated instructions in the application-specific instruction proportion acquisition unit 110 and the number of intra-CPU arithmetic units in the intra-CPU arithmetic unit configuration information recording unit 150; and a core allocation unit 160 ( FIGS. 2 and 3 ) that allocates, as the core allocation destination determined by the core allocation determination unit 120, the 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. For example, in a computing system 1000 (FIGS. 1 to 3) that executes dedicated instructions, the task scheduler device 100 (FIGS. 2 and 3) uses hardware multithreading, which pseudo-displays one physical core 11 as multiple logical cores 21 and 22, to assign execution processes of dedicated instructions (SIMD instructions) to the logical cores 21 and 22.
[0084] 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.
[0085] The requirements to be achieved can be summarized as follows: Requirement 1: (Performance) [CPU processing time required by 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)] The task scheduler devices 100 and 100A can achieve the above requirements 1 and 2.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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."
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] Note that the dedicated instruction may be any instruction specialized for a specific operation. In the first embodiment, a dedicated instruction for a SIMD instruction or encryption is used as an example, but SIMD / encryption is merely an example, and the dedicated instruction may be similarly applied to dedicated instructions other than SIMD / encryption. Furthermore, the task scheduler device 100 (FIGS. 2 and 3) may be any device that uses hardware multithreading to make one physical core 11 appear as multiple logical cores 21 and 22 in a computing system 1000 (FIGS. 1 to 3) that executes dedicated instructions, and is not necessarily limited to a mode in which execution processes of dedicated instructions (SIMD instructions) are assigned to the logical cores 21 and 22.
[0099] Second Embodiment In the first embodiment, logical cores are allocated to a combination of logical cores within the same physical core such that there is no performance conflict between the logical cores (port conflict: see symbol c in the upper diagram of FIG. 43). That is, in the first embodiment, when processes with instruction conflicts are being executed, the core allocation determination unit 120 (FIG. 2) of the task scheduler apparatus 100 allocates processes with less chance of instruction execution conflicts to the remaining logical cores (S32 in FIG. 13). This makes it possible to ensure performance while reducing the number of cores, thereby saving power.
[0100] The second embodiment illustrates an example of effective utilization of hidden cores (a pair of logical cores that exist in the same physical core by SMT, and that are paired behind the front core) as one of the efficient allocation methods of the first embodiment. In addition to the "dedicated instruction processing contention within the CPU" of the first embodiment, the second embodiment performs core allocation taking into consideration the characteristics of each task (low latency and / or the number of required cores).
[0101] <Effective Utilization of Hidden Cores> The reason why effective utilization of hidden cores is necessary will be explained. FIG. 14 is a diagram explaining the allocation of RAN L1 tasks described in Non-Patent Document 2. FIG. 14 shows a simplified example of a CPU core with an SMT architecture when the microinstruction is a SIMD operation. The CPU 1 shown in FIG. 14 has four physical cores 11 ("four physical cores") (hereinafter referred to as the same physical core 11) and a pair of logical cores ("eight logical cores") (see circles in FIG. 14) that exist in the same physical core 11 using SMT. For example, in CPU 1, logical cores 0 and 5 share the same physical core 11. In this case, of the pair of logical cores 0 and 5 that exist in the same physical core 11, logical core 0 is the "front core" of the same physical core 11, and logical core 5 is the "back core" of the same physical core 11. Incidentally, in the first embodiment, in order to achieve a combination in which the performance of logical cores within the same physical core does not compete with each other, for example, a general-purpose instruction process is assigned to logical core 0 of the same physical core 11, and an SIMD process is assigned to logical core 5.
[0102] Non-Patent Document 2 describes a configuration in which L1 processing tasks are classified into three categories: Uplink, Downlink, and PDSCH, and a core is assigned to each corresponding processing thread. The following describes the case in which the technology in Non-Patent Document 2 is applied to a CPU core with an SMT architecture, as shown in FIG. 14. As shown by the symbol dd in FIG. 14, of the pair of logical cores 2 and 7 present in the same physical core 11, the uplink processing task is assigned to the logical core 2, which is the front core, and is designated as the "uplink processing core." No processing task is assigned to the logical core 7, which is the back core.
[0103] 14, of the pair of logical cores 3 and 8 existing in the same physical core 11, the downlink processing task is assigned to logical core 3 of the front core and made into the "downlink processing core," while as shown by reference sign ff in FIG. 14, the PDSCH processing task is assigned to logical core 8 of the back core and made into the "PDSCH processing core." That is, of logical cores 3 and 8 existing in the same physical core 11, the downlink processing task is assigned to logical core 3 of the front core, and the PDSCH processing task is assigned to logical core 8 of the back core. However, no processing tasks are assigned to logical cores 0 and 5 existing in the same physical core 11, logical cores 1 and 6 existing in the same physical core 11, and logical cores 4 and 9 existing in the same physical core 11.
[0104] In the first embodiment, competition among the three categories of Uplink / Downlink / PDSCH shown in Non-Patent Document 2 is not taken into consideration. Therefore, as shown by the symbol ff in Figure 14, when logical core 8 (back core) of logical cores 3 and 8 existing in the same physical core 11 is assigned, there is a possibility that processing will compete in this same physical core 11, resulting in insufficient processing performance.
[0105] In the first embodiment, for the three categories of uplink / downlink / PDSCH processing, if each task can occupy a physical core, "Requirement 1 (performance) that each task completes its required processing deadline" is satisfied. On the other hand, as shown by the symbol ff in FIG. 14 , when SMT is used, there may be cases where processing performance is insufficient and low latency cannot be achieved. For this reason, it is conceivable that "Requirement 2: (computational resources) that the number of execution cores required to execute each task is minimal (ability to utilize SMT)" is not satisfied.
[0106] <Basic Concept of the Present Invention> The basic concept of the present invention will be described. FIG. 15 is a diagram illustrating the basic concept of the present invention. Components identical to those in FIG. 14 are designated by the same reference numerals. The CPU 1 shown in the lower diagram of FIG. 15 has 12 identical physical cores 11 ("12 physical cores") and a pair of logical cores ("24 logical cores") that exist on the same physical core 11 using SMT (see the circles in FIG. 15). The bold circles in FIG. 15 indicate logical cores among the "24 logical cores" to which tasks are assigned. Furthermore, the types of shading and hatching within the bold circles in FIG. 15 indicate different task requirements. For example, the shading within the bold circles in FIG. 15 indicates tasks with high SIMD utilization and high loads, such as U-plane signal processing and C-plane signal processing (heavy). The hatching within the bold circles in FIG. 15 indicates tasks with low SIMD utilization and low loads, such as U-plane signal processing and C-plane signal processing (light).
[0107] In the second embodiment, core allocation is performed taking into consideration the requirements of each task (low latency and / or the number of required cores) in addition to SIMD operation contention. As shown in the upper diagram of FIG. 15 , the characteristics of tasks to be allocated to logical cores are divided into two task requirements based on SIMD utilization rate, load, etc., and pooled (pool 201, pool 202). Task pool 201 (task pool <1>) pools tasks with high SIMD utilization rate or high load that cannot use HyperThreading. Examples of such tasks include U-plane signal processing and C-plane signal processing (heavy).
[0108] The task pool 202 (task pool <2>) pools tasks that can coexist with other tasks on the same physical core. The task pool 202 (task pool <2>) pools tasks that have low SIMD utilization or low load and are capable of HyperThreading. Such tasks include, for example, C-plane signal processing (light) and other processing.
[0109] In the second embodiment, the CPU 1 shown in the lower diagram of FIG. 15 assigns the front logical cores 4, 6, 8, 10, and 12 of the logical cores residing in the same physical core 11 to the task pool 201 (task pool <1>) shown in the upper diagram of FIG. 15 (arrow gg in FIG. 15 ). The processing task performed by the logical cores 4, 6, 8, 10, and 12 is, for example, C-plane signal processing (heavy). The front logical core 14 of the logical cores residing in the same physical core 11 is, for example, C-plane signal processing (light), and is assigned to the task pool 202 (task pool <1>) shown in the upper diagram of FIG. 15 (arrow hh in FIG. 15 ). Here, the front logical core 14 of the logical cores residing in the same physical core 11 has a low SIMD utilization rate, a low load, and is a task capable of HyperThreading. Therefore, even if the processing is assigned to the back logical core 38, there is no processing contention, and processing performance is not insufficient. 15, the processing task C-plane signal processing (light) of logical core 38, which is the back core of the front core of logical core 14, is assigned to pool 202 (task pool <2>) (arrow ii in FIG. 15). In this way, tasks that can be processed in time even using HyperThreading use the back core (logical core 38, which is the back core), improving CPU utilization.
[0110] [Configuration of the Task Scheduler Apparatus] FIG. 16 is a configuration diagram of a task scheduler apparatus according to a second embodiment of the present invention. Components identical to those in FIG. 2 are designated by the same reference numerals, and overlapping descriptions will be omitted. The task scheduler apparatus 200 shown in FIG. 16 can be applied to the computing system 1000 shown in FIG. 1. As shown in FIG. 16, the task scheduler apparatus 200 is a core allocation scheduler within a server, and includes a CPU 50 (hardware), physical cores 11 (processors) on the CPU 50 (physical core <1>, physical core <2>, ..., physical core <N>), and a userland 60. For example, in the computing system 1000 (FIG. 1) that executes dedicated instructions specialized for specific computations, the task scheduler apparatus 200 allocates execution processes of the dedicated instructions to the logical cores using hardware multithreading, which simulates one physical core as multiple logical cores.
[0111] The task scheduler device 200 includes, in userland 60, an application-specific instruction ratio acquisition unit 110, a task-specific instruction usage ratio recording unit 210, a low latency requirement recording unit 211, a task load amount recording unit 212, a task-required isolation level recording unit 213, a core allocation judgment unit 220, a task-required isolation level / core number calculation unit 221 (required isolation level calculation unit), a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, a core allocation unit 260, a core allocation status recording unit 130, a port contention status monitoring unit 140, a CPU intra-calculator configuration information recording unit 150, a port contention status acquisition unit 170, and an existing process core allocation change judgment unit 180.
[0112] The functional units of the task-specific instruction usage ratio recording unit 210, the low latency requirement recording unit 211, the task load amount recording unit 212, the task required isolation level recording unit 213, the core allocation judgment unit 220, the task required isolation level / core number calculation unit 221, the core allocation determination unit 222, the task processing unit 230, the task queue unit 240, and the core allocation unit 260 will be explained after examples of variations in the overall configuration (Figures 17 and 18).
[0113] 16 shows a configuration example in which the task scheduler device 200 is provided in userland 60, but each functional unit can also be included in the OS. For example, an example in which the task scheduler device 200 is applied to a vRAN DU system will be described.
[0114] This article explains vRAN (virtual Radio Access Network). In wireless access systems for mobile communications, high latency and throughput are required, so base stations (BBUs: Base Band Units) that perform radio signal processing have typically been handled by dedicated hardware (dedicated devices). In recent years, with the widespread use of general-purpose servers (IA: Intel Architecture servers), the performance of general-purpose servers has improved dramatically, and they can now be obtained inexpensively through mass production. As a result, research is underway into vRAN, which uses general-purpose servers to perform radio signal processing in base stations (BBUs) in wireless access systems for LTE (Long Term Evolution) and 5G (five generation).
[0115] In vRAN, general-purpose servers that are inexpensive and readily available can be used as BBU hardware, so a BBU pool can be constructed by using a regional DC (Data Center) or communications building within a radius of several tens of kilometers from the antenna as a centralized location, setting up server racks and installing multiple general-purpose servers in advance (this concept is sometimes referred to as C-RAN (Centralized-RAN)).
[0116] The BBU pool makes it possible to prepare multiple base station hardware (general-purpose servers) in advance, which has the potential advantage of enabling flexible operation, such as quick hardware replacement (switching) in the event of a hardware failure and dynamic scaling out / in in response to increases or decreases in traffic.
[0117] <Example of Allocation of the Same Time Slot for Each Antenna> In a wireless access system, it is sometimes possible to separate the base station functions into a Radio Unit (RU), a Distributed Unit (DU), and a Centralized Unit (CU).
[0118] Users may be assigned to the same time slot on an antenna basis (or on an RU basis in an O-RAN (Open-RAN) compliant vRAN system when the RU and vDU are separated). This allows the antenna / RU to sleep for a longer period of time when the antenna / RU has a sleep function.
[0119] 17 is a configuration diagram of a task scheduler device 200A applied to a vRAN DU system. Components identical to those in FIG. 16 are assigned the same reference numerals, and overlapping descriptions will be omitted. The task scheduler device 200A shown in FIG. 17 is a core allocation scheduler within a server, and includes a CPU 50, which is hardware (HW), physical cores 11 (processors) on the CPU 50 (physical core <1>, physical core <2>, ..., physical core <N>), a vRAN application 60A, and an OS 70A.
[0120] The task scheduler device 200A includes, on the vRAN application 60A, a task-specific instruction usage ratio recording unit 210, a low-latency requirement recording unit 211, a task load amount recording unit 212, a task-required isolation level recording unit 213, a core allocation determination unit 220, a task-required isolation level / core count calculation unit 221, a core allocation determination unit 222, a task processing unit 230, and a task queue unit 240. The task processing unit 230 may include multiple task processing units (not shown). In the task scheduler device 200A, the OS 70A includes a core allocation unit 260. In the task scheduler device 200A applied to the vRAN DU system, the relationship between tasks and execution cores is managed by the vRAN application 60A, not by the OS.
[0121] 18 is a configuration diagram illustrating a task scheduler device 200B in which a VM and container are arranged. The same components as those in FIG. 3 are denoted by the same reference numerals, and redundant descriptions will be omitted. The task scheduler device 200B 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.
[0122] The task scheduler device 200B includes a container / VM80, a container / VM1, and a container / VM2, and each of the containers / VM1 to 2 includes a task required isolation level recording unit 213, a task required isolation level / core number calculation unit 221, a core allocation determination unit 222, a task processing unit 230, and a task queue unit 240.
[0123] When using virtual machines (VMs) or containers, in order to allocate cores across containers / VMs, the core allocation function is aggregated outside each container / VM instance, such as in the OS / VMM, enabling allocation processing across containers / VMs.
[0124] The overall configuration diagram of the task scheduler device (the configuration in which each functional unit is provided in the vRAN application (FIG. 16), the variation in the vRAN DU system (FIG. 17), and the variation in the container / VM (FIG. 18)) has been described above. Next, each functional unit of the task scheduler device in FIGS. 16 to 18 will be described.
[0125] [Functional Units of the Task Scheduler Apparatus] <Task-dedicated instruction usage ratio recording unit 210> The task-dedicated instruction usage ratio recording unit 210 records the task-dedicated instruction usage ratio indicating the ratio at which dedicated instructions in the CPU are used in the execution of each task.
[0126] FIG. 19 is a diagram showing a table 310 of an example data structure (example data configuration) of the task-specific instruction usage ratio recording unit 210. The data structure table 310 of the task-specific instruction usage ratio recording unit 210 records the ratio of dedicated instructions for each task type. For example, the task types are: 1. User data processing (including device information, information about users, and information collected from users, etc.) with a high degree of parallelism; 2. User data processing with a low degree of parallelism; 3. Control data processing (numerical data, character string data, lists, etc.); 4. Synchronous signal processing (duplication, multiplexing, and packet-based timing synchronization processing, including frequency synchronization, phase synchronization, and time synchronization, essential for wireless communications, including 5G networks); and 5. Configuration processing (configuration processing for servers, network devices, or operating systems and software). The ratio of dedicated instructions is set in the range of 1.0 to 0.0 (1.0 is high, 0.0 is low). For example, the ratio of dedicated instructions for 1. User data processing with a high degree of parallelism is 0.8 in FIG. 19. Additionally, the ratio of dedicated instructions for 3. control data processing is 0.8, and these two tasks have a high ratio of dedicated instructions (high SIMD utilization and load). In contrast, the ratio of dedicated instructions for 5. configuration processing task is low at 0.1, and the SIMD utilization and load are low.
[0127] The data in the data structure table 310 may be registered in advance in the task-specific instruction usage ratio recording unit 210 for each task in the task scheduler device 200 of the computing system 1000, or may be calculated and updated by the task scheduler device 200 based on data on whether or not a specific instruction has been executed, obtained from the CPU during execution.
[0128] <Low Latency Requirement Recording Unit 211> The low latency requirement recording unit 211 records the low latency requirements (low latency properties) required for the execution of each task. Specifically, the low latency requirement recording unit 211 records the low latency requirements required for the execution of each L1 task.
[0129] FIG. 20 is a diagram showing a data structure table 320 of an example data structure (data configuration example) of the low latency requirement recording unit 211. The data structure table 320 of the low latency requirement recording unit 211 records low latency requirements for each task type (here, the low latency requirements for each L1 task). For example, the task types are 1. User data processing with a high degree of parallelism, 2. User data processing with a low degree of parallelism, 3. Control data processing, 4. Synchronous signal processing, and 5. Configuration processing. The ratio of dedicated instructions is set within a range of 1.0 to 0.0 (1.0 is high, 0.0 is low). For example, in FIG. 20, the low latency requirement for 1. User data processing with a high degree of parallelism has the strictest low latency requirement at 1.0, and the low latency requirement for 2. User data processing with a low degree of parallelism has the next strictest low latency requirement at 0.8. 5. The configuration processing task has a low latency requirement of 0.1.
[0130] 20 with the data of the data structure table 310 of the task-dedicated instruction usage ratio recording unit 210 shown in FIG. 19, the dedicated instruction ratio in the data structure table 310 and the low latency requirements in the data structure table 320 show similar trends but are not the same. For example, for task type 2. User data processing with a low parallel operation level, the dedicated instruction ratio is low at 0.2 (FIG. 19), but the low latency requirement is high at 0.8 (FIG. 20).
[0131] Here, since the proportion of dedicated instructions in the data structure table 310 of the task-dedicated instruction usage ratio recording unit 210 and the low latency requirements in the data structure table 320 have similar tendencies, the task-required isolation degree / core number calculation unit 221 (described later) of the core allocation determination unit 220 can calculate the required isolation degree (described later) simply by acquiring the task-dedicated instruction usage ratio of each task from the task-dedicated instruction usage ratio recording unit 210 (see the task-required isolation degree calculation unit in claim 2). In this embodiment, the low latency requirement recording unit 211 is provided, which records the low latency requirements required in the execution of each task, and the task-required isolation degree / core number calculation unit 221 (described later) calculates the required isolation degree based on the required isolation degree and the low latency requirement of each task (see claim 8), thereby calculating a more accurate required isolation degree.
[0132] The data in the data structure table 310 is registered in advance in the low latency requirement recording unit 211 of the task scheduler device 200 of the computing system 1000 .
[0133] <Each Task Load Recording Unit 212> The each task load recording unit 212 records the load required for the calculation of each task. For example, the each task load recording unit 212 records the load required for the calculation of each L1 task.
[0134] FIG. 21 shows a data structure table 330 of an example data structure (example data configuration) of each task load recording unit 212. The data structure table 330 of each task load recording unit 212 records the load amount for each task type (ranging from 1 to 5, with 1 being small and 5 being large). For example, task types are: 1. User data processing with a high degree of parallelism, 2. User data processing with a low degree of parallelism, 3. Control data processing, 4. Synchronous signal processing, and 5. Configuration processing. The load amount is set within a range of 1 to 5 (1 being small and 5 being large). In general, as with the low latency requirement shown in FIG. 20, the load amount for each task type increases in the order of 1. User data processing with a high degree of parallelism (there is a positive correlation between the load amount and the low latency requirement).
[0135] The data in the data structure table 330 of each task load recording unit 212 is registered in advance in the low latency requirement recording unit 211 of the task scheduler device 200 of the computing system 1000 .
[0136] <Role of Each Table> In this embodiment, the task required isolation / number of cores calculation unit 221 ( FIGS. 16 to 18 ) of the core allocation determination unit 220 combines data from the data structure table 310 of the task-specific instruction usage ratio recording unit 210, data from the data structure table 320 of the low latency requirement recording unit 211, and data from the data structure table 330 of each task load recording unit 212 to derive the required isolation / number of cores table 340 ( FIG. 22 ). The derivation of the required isolation / number of cores table 340 of each task load recording unit 212 will be described later with reference to FIG. 24 .
[0137] As mentioned above, the low latency requirements in the data structure table 320 of the low latency requirement recording unit 211 (FIG. 20) and the load amounts in the data structure table 330 of each task load amount recording unit 212 (FIG. 21) have similar tendencies, so a combination of the data structure table 310 of each task-dedicated instruction usage ratio recording unit 210 shown in FIG. 19 with the low latency requirements in the data structure table 320 of the low latency requirement recording unit 211 (FIG. 20) or a combination of the data structure table 310 of each task-dedicated instruction usage ratio recording unit 210 shown in FIG. 19 with the load amounts in the data structure table 330 of each task load amount recording unit 212 (FIG. 21) may be used.
[0138] <Required isolation level recording unit 213 for each task> The required isolation level recording unit 213 for each task (Figures 16 to 18) records the required isolation level / number of cores table 340 (Figure 22) derived by the required isolation level / number of cores calculation unit 221 for each task (Figures 16 to 18) of the core allocation determination unit 220, and the required isolation level / number of cores table 350 (Figure 23) used in vRAN.
[0139] FIG. 22 is a diagram showing a required isolation level / core count table 340 derived by the required isolation level / core count calculation unit 221 for each task of the core allocation determination unit 220. As shown in FIG. 22, the required isolation level / core count table 340 records the required isolation level and the required number of cores for each task type. The "required isolation level" is a concept first used by the inventors. The "required isolation level" determines whether other tasks can be executed on the same physical core. More specifically, the "required isolation level" determines what percentage of a single physical core needs to be occupied. The "required number of cores" is determined based on the load amount for each task type and is the number of CPU cores required for the task.
[0140] For example, in FIG. 22, when the task type is 1. User data processing with a high degree of parallelism, the required isolation level is 0.8 and the required number of cores is 4. Therefore, when allocating cores to this task, four logical cores are required, and the required isolation level is 0.8, so this task will occupy almost all of the logical cores on the same physical core. Here, since the required isolation levels for 4. Synchronization signal processing and 5. Configuration processing are both 0.1, there is still a possibility that they could be allocated as back-end cores on the same physical core, but this may be avoided from the perspective of processing stability, etc.
[0141] On the other hand, in Figure 22, when the task type is 2. User data processing with a low parallel computation degree, the required isolation level is 0.2 and the required number of cores is 3. Therefore, it is possible to assign all or part of 3. Control data processing, 4. Synchronous signal processing, and 5. Configuration processing as back cores of the same physical core.
[0142] FIG. 23 is a diagram showing a required isolation level / core count table 350 used in vRAN derived by the required isolation level / core count calculation unit 221 for each task of the core allocation determination unit 220. As shown in FIG. 23, the required isolation level / core count table 350 used in vRAN records the required number of cores and required isolation level for each task type. The required isolation level used in vRAN indicates whether SMT can coexist on the same physical core. In FIG. 23, the task types of user data processing with a high parallel computation level and control data processing have a required isolation level of 1.0, and logical cores on the same physical core cannot be assigned (SMT coexistence not allowed). In this example, the required number of cores for these two tasks is 5.
[0143] <Core Allocation Determining Unit 220> The core allocation determining unit 220 has the same function as the core allocation determining unit 120 (Figures 2 and 3) of the first embodiment. When processes with instruction conflicts are being executed, the core allocation determining unit 120 (Figures 2 and 3) allocates processes with less instruction conflicts to the remaining logical cores ("SIMD operation conflict"). That is, like the core allocation determining unit 120 (Figures 2 and 3), the core allocation determining unit 220 determines the allocation destination of cores to the same physical core using the execution rate of dedicated instructions from the application-dedicated instruction rate acquiring unit 110 and the number of intra-CPU arithmetic units from the intra-CPU arithmetic unit configuration information recording unit 150.
[0144] In addition to the above functions, the core allocation determination unit 220 has the following functional units: a task required isolation level / core number calculation unit 221 , and a core allocation determination unit 222 .
[0145] <Required isolation level / core number calculation unit 221 for each task> The required isolation level / core number calculation unit 221 for each task calculates the required isolation level, which indicates what percentage of a single physical core an executing CPU core needs to occupy. In this embodiment, the required isolation level / core number calculation unit 221 for each task calculates the required isolation level based on the required isolation level of each task and a low latency requirement.
[0146] Furthermore, the task-required isolation degree / core number calculation unit 221 acquires the load amount from the task load amount recording unit 212 and calculates the number of physical cores required for execution based on the acquired load amount. The task-required isolation degree / core number calculation unit 221 then calculates the required isolation degree and the number of physical cores required for execution by the CPU core executing the task in the task processing unit 230.
[0147] The required isolation level indicates what percentage of a single physical core must be occupied. In other words, tasks must be assigned to one physical core so that the total does not exceed 1.0. For example, a value of 1.0 means that other tasks cannot be executed on the same physical core, and 0.0 means there is no restriction.
[0148] Specifically, the required isolation level / core number calculation unit 221 for each task indexes the required isolation level between 0.0 and 1.0, with 1.0 being the maximum value, and the core allocation determination unit 222 makes it impossible for other tasks to be executed on the same physical core if the required isolation level is 1.0, and selects one or more core numbers for each physical core to allocate tasks so that the total required isolation level does not exceed 1.0.
[0149] The calculation of the required isolation degree and the resetting of the core allocation by the required isolation degree / core number calculation unit for each task 221 may be performed repeatedly at regular time intervals.
[0150] The required isolation level and number of cores calculation unit 221 for each task has a in which the required isolation level and number of cores are calculated (derived) for each task based on the table values of the task-specific instruction usage ratio recording unit 210, the low latency requirement recording unit 211, and the task load amount recording unit 212, and a <grouping form> in which task execution priorities are grouped in advance.
[0151] In the , the task-required isolation / core count calculation unit 221 derives required isolation / core count tables 340, 350 (FIGS. 22, 23) based on the data structure table 310 (FIG. 19) of the task-specific instruction usage ratio recording unit 210, the data structure table 320 (FIG. 20) of the low latency requirement recording unit 211, and the data structure table 330 (FIG. 21) of the task load amount recording unit 212. The derivation procedure will be described later (FIG. 24).
[0152] In the <grouping mode>, the required isolation level and number of cores calculation unit 221 for each task pre-groups and stores the task execution priorities for each task type as task execution groups. Specifically, the required isolation level and number of cores calculation unit 221 for each task assigns the corresponding cores using tables ( FIGS. 25 and 26 ) that show the correspondence between each task type and the priority group. The grouping procedure will be described later ( FIGS. 27 and 28 ).
[0153] <Core Allocation Determination Unit 222> The core allocation determination unit 222 selects the required number of physical cores that satisfy the required isolation level based on the required isolation level of each task. If the required isolation level is a predetermined maximum value, the core allocation determination unit 222 disables execution of other tasks on the same physical core, and selects one or more core numbers for each physical core within a range in which the required isolation level does not exceed the maximum value, and assigns tasks to the selected physical core. In this embodiment, the core allocation determination unit 222 selects the required number of physical cores that satisfy the required isolation level based on the required isolation level of each task and the number of physical cores. For example, if the required isolation level is 1.0, a physical core on which no other tasks are being executed is selected, and an instruction to allocate the task is issued.
[0154] That is, when the required isolation level is 1.0, the core allocation determination unit 222 does not allow other tasks to be executed on the same physical core, and selects one or more core numbers for one physical core to allocate tasks to such that the total required isolation level does not exceed 1. The operation sequence of the core allocation determination unit 222 will be described later.
[0155] As another embodiment, other than the method of selecting a specific core number, a configuration may be adopted in which CPU cores are divided into multiple groups in advance, and each task is executed on a CPU core to which each group belongs, as in the <grouping configuration> (FIGS. 25 and 26). In the <grouping configuration>, the core allocation determination unit 222 selects a core number corresponding to a CPU core to which a task execution group belongs, and assigns the task to the CPU core.
[0156] The core allocation determination unit 222 selects core numbers for pairs of logical cores that exist on the same physical core according to SMT, and allocates tasks to them.
[0157] <Task Processing Unit 230> The task processing unit 230 repeatedly acquires tasks from the task queue unit 240, and processes the tasks if they are available. The task processing unit 230 is executed by one of the CPU cores. There are multiple types of task processing units 230, each capable of processing different tasks. For example, in the case of a virtual radio access network (vRAN) that implements wireless signal processing using software, there is software corresponding to each signal processing task, such as "control data processing," "synchronization signal processing," and "user data processing."
[0158] <Task queue unit 240> The task queue unit 240 is a data recording unit that manages tasks processed by the CPU. Each task is composed of two items: a processing type and data to be processed. This may be a management structure for running tasks, such as a process management data structure in an OS task scheduler.
[0159] <Core allocation unit 260> The core allocation unit 260 allocates a logical core on which each process can run based on the process identifier and the logical core identifier for the core allocation destination determined by the core allocation determination unit 220. The core allocation unit 260 sets the logical core on which each process can run based on the process identifier and the logical core identifier. In Linux, this corresponds to the taskset command, which can specify the core number on which a process runs to the OS kernel.
[0160] The core allocation unit 260 sets the CPU core that will execute each task based on the core selection result of the core allocation determination unit 222. An example is the taskset command in the Linux OS. Furthermore, when a "method of assigning tasks to corresponding groups" such as the <grouping form> (FIGS. 25 and 26) is selected as a variation of the core allocation determination unit 222, the following occurs. That is, the core allocation unit 260 sets the CPU core by using the cgroups command, which defines the CPU cores and processing times of execution tasks managed by the OS as resource groups in advance and assigns tasks to the respective groups.
[0161] [Example of Derivation of Required Isolation Level and Number of Cores Table 340 ( FIG. 22 )] An example of derivation of the required isolation level and number of cores table 340 will be described. Note that this is an example of the above-mentioned . FIG. 24 is a diagram illustrating an example of derivation of the required isolation level and number of cores table 340 ( FIG. 22 ). The required isolation level and number of cores calculation unit 221 for each task ( FIGS. 16 to 18 ) of the core allocation determination unit 220 derives the required isolation level and number of cores table 340 ( FIG. 22 ) using the data structure table 310 ( FIG. 19 ) of each task-specific instruction usage ratio recording unit 210, the data structure table 320 ( FIG. 20 ) of the low latency requirement recording unit 211, and the data structure table 330 ( FIG. 21 ) of each task load amount recording unit 212.
[0162] As indicated by arrow jj in FIG. 24 , the "required isolation" in the required isolation / number of cores table 340 is calculated based on the "proportion of dedicated instructions" in the data structure table 310 of the task-specific instruction usage ratio recording unit 210 and the "low latency requirements for each task" in the data structure table 320 of the low latency requirement recording unit 211 (arrow kk in FIG. 24 ). Specifically, the task-specific required isolation / number of cores calculation unit 221 multiplies the table value in the data structure table 310 of the task-specific instruction usage ratio recording unit 210 by the table value in the data structure table 320 of the low latency requirement recording unit 211 for each task type to calculate the "required isolation" for each task type. For example, if the task type is 1.0 and the degree of parallelism (high) among user data processing, the calculation is 0.8 (proportion of dedicated instructions) × 1.0 (low latency requirements for each task) = 0.8 (required isolation).
[0163] 24, for each task type, the "load amount" in the data structure table 330 of each task load recording unit 212 is used as the "required number of cores" in the required isolation level / number of cores table 340. Similarly, the required isolation level / number of cores calculation unit 221 for each task derives the required isolation level / number of cores table 350 (FIG. 23) used in vRAN.
[0164] As a result of the above, the required isolation level and number of cores table 340 (lower diagram in FIG. 24) is derived. The derived required isolation level and number of cores table 340 (FIG. 22) and the required isolation level and number of cores table 350 (FIG. 23) used in vRAN are stored in the required isolation level recording unit 213 for each task (FIGS. 16 to 18).
[0165] [Pre-Grouping of Task Execution Priorities <Grouping Form>] The following describes the <grouping form> of pre-grouping task execution priorities. FIG. 25 is a diagram showing the correspondence between priority groups for each task type, which is used when the required isolation level / core count calculation unit 221 for each task pre-groups task execution priorities. FIG. 26 is a diagram showing the correspondence between the priority groups for each task type in FIG. 25 and assigned cores. As shown in FIG. 25, the first correspondence table 360 between task types and priority groups stores task execution groups for each task type in a tabular form in advance. The task types are 1. user data processing with a high degree of parallelism, 2. user data processing with a low degree of parallelism, 3. control data processing, 4. synchronization signal processing, and 5. configuration processing. The task execution groups are an isolation / high-priority group, a medium-priority group, and a low-priority group. In FIG. 25, the task types 1. user data processing with a high degree of parallelism and 2. User data processing with a low degree of parallelism is grouped into the isolated / high-priority task execution group. Task type 3. Control data processing is grouped into the medium-priority task execution group. Task types 4. Synchronous signal processing and 5. Configuration processing are grouped into the low-priority task execution group.
[0166] 26, a second correspondence table 370 between task execution groups and corresponding core numbers stores task execution groups and corresponding core numbers in a tabular format in advance. In Fig. 26, the isolated / high-priority group is assigned core numbers 0, 1, 2, and 3, the medium-priority group is assigned core numbers 4 and 10, and the low-priority group is assigned core number 6 (see core numbers 0, 1, 2, and 3, core numbers 4, 10, and core number 6 of the logical cores indicated by circles in Fig. 27, which will be described later).
[0167] In this way, the task required isolation level / core count calculation unit 221 first refers to the first correspondence table 360 to determine the task execution group from the task type, and then refers to the second correspondence table 370 to assign a core number from the task execution group.
[0168] [Grouping of Task Execution <Grouping Form>] The effects of grouping task execution as described above and not grouping are compared and explained below. FIG. 27 is a diagram explaining task allocation when grouping task execution is not performed. FIG. 28 is a diagram explaining task allocation when grouping task execution is performed. The CPU 1 shown in FIGS. 27 and 28 has six identical physical cores 11 ("physical 6-cores") and a pair of logical cores ("logical 12-cores") present in the same physical core 11 (see circles in FIGS. 27 and 28).
[0169] If task execution is not grouped as shown in FIG. 27, tasks 1 to 5 (1. User data processing with high parallelism, 2. User data processing with low parallelism, 3. Control data processing, 4. Synchronization signal processing, 5. Configuration processing) are assigned to logical cores as follows. In other words, as shown in FIG. 27, if task execution is not grouped, core allocation is required that isolates physical cores as much as possible according to the tasks that require isolation. In this case, six physical cores 11 are required. As shown by the bold circles in FIG. 27, tasks 1 to 5 are assigned to the logical cores of the six physical cores 11 (all "front cores").
[0170] When grouping task execution as shown in FIG. 28, the task execution groups are grouped into an isolated / high-priority group, a medium-priority group, and a low-priority group (FIG. 25), and the task execution groups are assigned corresponding core numbers (FIG. 26).
[0171] As shown in the lower diagram of Figure 28, tasks 1 and 2 (1. User data processing with high parallel calculation degree, 2. User data processing with low parallel calculation degree) are in the isolated / high priority group (Figure 25), and by referring to the second correspondence relationship table 370 in Figure 26, they are assigned to the logical cores with the corresponding core numbers 0, 1, 2, and 3 as tasks requiring isolation (see the thick circle hatching in Figure 28).
[0172] Furthermore, task 3 (3. Control data processing) is in the medium priority group ( FIG. 25 ), and is assigned to the corresponding logical cores with core numbers 4 and 10 by referring to the second correspondence table 370 in FIG. 26 (see the thick circle reverse hatching in FIG. 28 ). Here, since the medium priority group is a task that does not require isolation, the cores assigned to the medium priority group can be accommodated in the same physical core 11, and are assigned to the logical core with core number 4 ("front core") and the logical core with core number 10 ("back core") of the same physical core 11. In other words, the cores assigned to the medium priority group (task 3 (3. Control data processing)) are assigned to the logical core with core number 4 ("front core") and the logical core with core number 10 ("back core") of the same physical core 11.
[0173] Furthermore, task 5 (5. Config Processing) is in the low-priority group and, like the medium-priority group, is a task that does not require isolation. For this reason, task 5 (5. Config Processing) is assigned to the logical core with core number 10 ("back core") of the same physical core 11 (see the thick circle shading in Figure 28). Therefore, in addition to task 3 (3. Control Data Processing), task 5 (5. Config Processing) is also assigned to the logical core with core number 10 ("back core") of the same physical core 11.
[0174] In this way, when task execution is grouped, tasks requiring isolation (1. user data processing with a high degree of parallelism, 2. user data processing with a low degree of parallelism) are assigned to the "front core" of the logical core of the physical core 11. Furthermore, tasks not requiring isolation (3. control data processing, 5. configuration processing) are accommodated in the same physical core 11. Specifically, among the tasks not requiring isolation, 3. control data processing is assigned to the logical core with core number 4 ("front core") and the logical core with core number 10 ("back core") of the same physical core 11. Furthermore, among the tasks not requiring isolation, 5. configuration processing is assigned to the logical core with core number 10 ("back core") of the same physical core 11, along with 3. control data processing. As a result, as shown by the thick circle hatching / reverse hatching in FIG. 28, the task execution group of FIG. 26 can be satisfied with five physical cores, thereby reducing the number of cores required.
[0175] 29 is a flowchart showing the core allocation sequence. In step S41, the task-required isolation / core count calculation unit 221 (FIGS. 16 to 18) calculates the "required isolation" and the number of physical cores required for execution by the CPU core that will execute the task for the task processing unit 230.
[0176] An example of a calculation method for each task from the task-specific instruction usage ratio recording unit 210 (FIG. 19: data structure table 31), the low latency requirement recording unit 211 (FIG. 20: data structure table 320), and the task load amount recording unit 212 (FIG. 21: data structure table 330) is shown below.
[0177] <Method of calculating the required degree of isolation> Because the degree of parallel processing within a CPU core is limited for dedicated instructions installed in a CPU, it is desirable to increase the degree of isolation (to occupy a physical core) for tasks with a high degree of dedicated instruction utilization. For this reason, the required task isolation / core number calculation unit 221 uses the value corresponding to each task recorded in the "dedicated instruction utilization rate" field in the data structure table 310 ( FIG. 19 ) of the dedicated instruction utilization rate recording unit 210 for each task.
[0178] <Method of Calculating the Required Number of Cores> The required number of cores is calculated based on the “amount of load” and the “low latency required to complete processing of the task.” Therefore, the task-required isolation / core number calculation unit 221 multiplies the “low latency requirement for each task” in the data structure table 320 ( FIG. 20 ) of the low latency requirement recording unit 211 by the value obtained from the data structure table 330 ( FIG. 21 ) of the task load amount recording unit 212, and calculates the required number of cores by multiplying the result by a fixed coefficient for calculating the number of CPU cores.
[0179] In step S42, the core allocation determination unit 222 (FIGS. 16 to 18) selects the required number of physical cores that satisfy the required isolation level based on the required isolation level and the required number of cores for each task. For example, if the required isolation level is 1.0, the core allocation determination unit 222 selects a physical core on which no other tasks are being executed and issues a task allocation instruction. In other words, the core allocation determination unit 222 selects logical cores of the same physical core and issues a task allocation instruction until the required isolation level reaches 1.0 (for example, if the current required isolation level is 0.8, tasks with a required isolation level of 0.2 can be assigned to the same physical core until the required isolation level reaches 1.0). Note that instead of selecting specific core numbers, a configuration may be adopted in which CPU cores are divided into multiple groups in advance, and each task is executed on a CPU core belonging to each group, as described with reference to FIGS. 25 and 26 .
[0180] In step S43, the core allocation unit 260 (FIGS. 16 to 18) sets the CPU core that will execute each task based on the core selection results of the core allocation determination unit 222, and then ends the processing flow. The core allocation unit 260 sets the CPU core that will execute each task, for example, using the taskset command in the Linux OS. As a variation of the core allocation determination unit 222, as described with reference to FIGS. 25 and 26, if the "method of assigning tasks to corresponding groups" is selected, the execution tasks managed by the OS may be defined in advance as resource groups based on CPU cores and processing times, and the cgroups command may be used to assign tasks to each group.
[0181] [Task Processing Sequence] Figure 30 is a flowchart showing the task processing sequence. In step S51, the task processing unit 230 (Figures 16 to 18) repeatedly obtains tasks from the task queue unit 240, and if a task is available, processes the task. Each task processing unit 230 is executed by one of the CPU cores. There are multiple types of task processing units 230, each capable of processing different tasks. For example, in the example of vRAN, which realizes wireless signal processing by software, there is software corresponding to each signal processing task, such as "control data processing," "synchronization signal processing," and "user data processing."
[0182] [Core Allocation Determination Sequence of Core Allocation Determination Unit 222] Figure 31 is a flowchart showing the core allocation determination sequence of the core allocation determination unit 222. When the program starts, the core allocation determination unit 222 (Figures 16 to 18) checks the CPU core number 0 and acquires the task allocation status of the CPU core in step S61. In step S62, the core allocation determination unit 222 determines whether the current task allocation amount of the CPU core in question is greater than the required isolation level. If the current task allocation amount of the CPU core in question is not greater than the required isolation level (S62: No), the core number is incremented to check the CPU core number +1, and the process returns to step S61.
[0183] If the current task allocation amount of the CPU core is greater than the required isolation level (S62: Yes), in step S63, it is determined whether the number of allocated cores satisfies the number of cores required for each task. If the number of allocated cores satisfies the number of cores required for each task (S63: Yes), the processing of this flow ends. If the number of allocated cores does not satisfy the number of cores required for each task (S63: No), the process returns to step S61.
[0184] [Modifications of the Second Embodiment] The task scheduler device of this embodiment can be modified as follows.
[0185] <Variation 1> Figure 32 is a configuration diagram of <Variation 1> of a task scheduler device according to the second embodiment of the present invention. Components that are the same as those in Figure 16 are assigned the same reference numerals, and overlapping descriptions will be omitted. The task scheduler device 200B shown in Figure 32 includes, in userland 60, an application-specific instruction ratio acquisition unit 110, a task-specific instruction usage ratio recording unit 210, a core allocation judgment unit 220B, a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, a core allocation unit 260, 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 port contention status acquisition unit 170, and an existing process core allocation change judgment unit 180. That is, the task scheduler device 200B shown in Fig. 32 has a configuration in which the low latency requirement recording unit 211, the task load amount recording unit 212, and the task required isolation level recording unit 213 are removed from the task scheduler device 200 in Fig. 16. Also, the core allocation determination unit 220B of the task scheduler device 200B shown in Fig. 32 has a configuration in which the task required isolation level / core number calculation unit 221 is removed from the core allocation determination unit 220 in Fig. 16.
[0186] The core allocation determination unit 222 of the core allocation judgment unit 220B shown in FIG. 32 selects the required number of physical cores based on the task-specific instruction utilization ratio of each task in the task-specific instruction utilization ratio recording unit 210.
[0187] Figure 33 is a flowchart showing the core allocation determination sequence of the task scheduler device 200B shown in Figure 32. The same steps as in the flow of Figure 29 are assigned the same step numbers. When the flow starts, in step S42B, the core allocation determination unit 222 (Figure 32) of the task scheduler device 200B selects the required number of physical cores based on the task-dedicated instruction usage ratio of each task in the task-dedicated instruction usage ratio recording unit 210.
[0188] In step S43, the core allocation unit 260 (FIG. 32) sets the CPU core that will execute each task based on the core selection result of the core allocation determination unit 222, and then ends the processing of this flow.
[0189] <Modification 2> Figure 34 is a configuration diagram of a task scheduler device according to a second embodiment of the present invention. Components identical to those in Figure 16 are designated by the same reference numerals, and overlapping descriptions will be omitted. The task scheduler device 200C shown in Figure 34 includes, in userland 60, an application-specific instruction ratio acquisition unit 110, a task-specific instruction usage ratio recording unit 210, a low-latency requirement recording unit 211, a core allocation judgment unit 220C, a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, a core allocation unit 260, 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 port contention status acquisition unit 170, and an existing process core allocation change judgment unit 180. That is, the task scheduler device 200C shown in Fig. 34 has a configuration in which the task load recording unit 212 and the task required isolation level recording unit 213 are removed from the task scheduler device 200 in Fig. 16. Also, the core allocation determination unit 220C of the task scheduler device 200C shown in Fig. 34 has a configuration in which the task required isolation level / core number calculation unit 221 is removed from the core allocation determination unit 220 in Fig. 16.
[0190] The core allocation determination unit 222 of the core allocation judgment unit 220C shown in FIG. 34 selects the required number of physical cores based on the task-specific instruction usage rate of each task-specific instruction usage rate recording unit 210 and the low latency requirements of the low latency requirement recording unit 211.
[0191] Figure 35 is a flowchart showing the core allocation determination sequence of the task scheduler device 200C shown in Figure 34. The same processes as in the flow of Figure 29 are assigned the same step numbers. When the flow starts, in step S42C, the core allocation determination unit 222 (Figure 34) of the task scheduler device 200C selects the required number of physical cores based on the task-specific instruction usage ratio of each task-specific instruction usage ratio recording unit 210 and the low-latency requirements of the low-latency requirement recording unit 211.
[0192] In step S43, the core allocation unit 260 (FIG. 34) sets the CPU core that will execute each task based on the core selection result of the core allocation determination unit 222, and then ends the processing of this flow.
[0193] <Variation 3> Figure 36 is a configuration diagram of <Variation 3> of a task scheduler device according to the second embodiment of the present invention. Components that are the same as those in Figure 16 are assigned the same reference numerals, and overlapping descriptions will be omitted. The task scheduler device 200D shown in Figure 36 includes, in userland 60, an application-specific instruction ratio acquisition unit 110, a task-specific instruction usage ratio recording unit 210, a task load amount recording unit 212, a core allocation determination unit 220, a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, a core allocation unit 260, 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 port contention status acquisition unit 170, and an existing process core allocation change determination unit 180. That is, the task scheduler device 200D shown in Fig. 36 has a configuration in which the task low latency requirement recording unit 211 and the task required isolation level recording unit 213 are removed from the task scheduler device 200 in Fig. 16. Also, the core allocation determination unit 220D of the task scheduler device 200D shown in Fig. 36 has a configuration in which the task required isolation level / core number calculation unit 221 is removed from the core allocation determination unit 220 in Fig. 16.
[0194] The core allocation determination unit 222 of the core allocation judgment unit 220D shown in FIG. 36 selects the required number of physical cores based on the task-dedicated instruction usage rate of each task-dedicated instruction usage rate recording unit 210 and the load amount of each task load amount recording unit 212.
[0195] Figure 37 is a flowchart showing the core allocation determination sequence of the task scheduler device 200D shown in Figure 36. The same steps as in the flow of Figure 29 are assigned the same step numbers. When the flow starts, in step S42D, the core allocation determination unit 222 (Figure 36) of the task scheduler device 200D selects the required number of physical cores based on the task-dedicated instruction usage ratio of each task in the task-dedicated instruction usage ratio recording unit 210 and the load amount in each task load amount recording unit 212.
[0196] In step S43, the core allocation unit 260 (FIG. 36) sets the CPU core that will execute each task based on the core selection result of the core allocation determination unit 222, and then ends the processing of this flow.
[0197] <Modification 4> Figure 38 is a configuration diagram of a task scheduler device according to a second embodiment of the present invention. Components identical to those in Figure 16 are designated by the same reference numerals, and overlapping descriptions will be omitted. The task scheduler device 200E shown in Figure 38 includes, in userland 60, an application-specific instruction ratio acquisition unit 110, a task-specific instruction usage ratio recording unit 210, a task-required isolation level recording unit 213, a core allocation determination unit 220E, a task-required isolation level / core count calculation unit 221E (required isolation level calculation unit), a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, a core allocation unit 260, 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 port contention status acquisition unit 170, and an existing process core allocation change determination unit 180. 38 has a configuration in which the task scheduler device 200E shown in Fig. 16 does not include the task low latency requirement recording unit 211 and the task load amount recording unit 212. Also, the core allocation determination unit 220E of the task scheduler device 200E shown in Fig. 38 includes a task required isolation level / core number calculation unit 221E and a core allocation determination unit 222.
[0198] 38 calculates the required isolation level, which indicates the percentage of a single physical core that an executing CPU core must occupy. The core allocation determination unit 222 selects the required number of physical cores that satisfy the required isolation level, based on the required isolation level of each task.
[0199] Figure 39 is a flowchart showing the core allocation determination sequence of the task scheduler apparatus 200E shown in Figure 38. The same processes as in the flow of Figure 29 are assigned the same step numbers. When the flow starts, in step S41E, the required isolation level / core number calculation unit 221E (Figure 38) of the core allocation determination unit 220E for each task calculates the required isolation level, which indicates what percentage of a single physical core the CPU core to be executed needs to occupy. In step S42E, the core allocation determination unit 222 (Figure 38) of the core allocation determination unit 220E selects the required number of physical cores that satisfy the required isolation level, based on the required isolation level of each task.
[0200] In step S43, the core allocation unit 260 (FIG. 38) records the required isolation level calculated by the required task isolation level / number of cores calculation unit 221E (FIG. 38) in the required task isolation level recording unit 213 (FIG. 38).
[0201] Effect of the Second Embodiment As described above, the task scheduler apparatus 200, 200A (FIGS. 16 to 18) includes an application-dedicated instruction ratio acquisition unit 110 (FIGS. 16 to 18) that acquires the execution ratio of dedicated instructions specialized for specific operations for each application running on the server, an intra-CPU arithmetic unit configuration information recording unit 150 (FIGS. 16 to 18) that records the number of intra-CPU arithmetic units as the number of simultaneously executable instructions (for example, the number of executable instructions per port), a core allocation determination unit 120 (FIGS. 16 to 18) that determines a core allocation destination to the same physical core using the execution ratio of the dedicated instructions in the application-dedicated instruction ratio acquisition unit 110 and the number of intra-CPU arithmetic units in the intra-CPU arithmetic unit configuration information recording unit 150, and a core allocation determination unit 120 that determines a core allocation destination to a logical core on which each process can run, based on the identifier of the process and the identifiers of the logical cores 21, 22, as the core allocation destination determined by the core allocation determination unit 120. a task-specific instruction usage ratio recording unit 210 (FIGS. 16-18) that records a task-specific instruction usage ratio indicating the ratio of dedicated instructions in the CPU to be used in the execution of each task; a low latency requirement recording unit 211 (FIGS. 16-18) that records the low latency requirements required in the execution of each task; a task-specific load amount recording unit 212 (FIGS. 16-18) that records the load amount required for the calculation of each task; a task-specific required isolation calculation unit (task-specific required isolation / core number calculation unit 221) (FIGS. 16-18) that calculates the required isolation indicating what percentage of a single physical core must be occupied by the CPU core that executes the task; and a core allocation determination unit 222 (FIGS. 16-18) that selects the required number of physical cores that satisfy the required isolation based on the required isolation of each task.
[0202] (1) Effect of satisfying "Requirement 1: Each process is allocated the CPU processing time it requires" for tasks with high processing performance or tasks prone to contention. In the first embodiment, logical cores are assigned within the same physical core so that performance conflicts between the logical cores are avoided. This allows performance to be ensured while reducing the number of cores, thereby achieving power savings. In the second embodiment, in addition to the effect of the first embodiment, for tasks with high processing performance or tasks prone to contention, the required isolation level is calculated and physical cores are isolated to avoid intra-core contention. This satisfies the requirement that "the CPU processing performance required for each task is allocated within a certain time" (meets the "low latency requirement"). For example, even when there is contention among the three categories of Uplink / Downlink / PDSCH shown in Non-Patent Document 2 (FIG. 14), isolating physical cores and avoiding intra-core contention can eliminate processing contention within the same physical core and suppress insufficient processing performance.
[0203] (2) Effect of satisfying "Requirement 2: The number of execution cores required to execute each task must be the minimum" for tasks that require high processing performance or that are prone to contention. When using (allocating) hidden cores, processing contention may result in insufficient processing performance, leading to delays, etc. For example, the three-tiered classification of Uplink / DownLink / PDSCH shown in Non-Patent Document 2 (FIG. 14) does not take contention into account, so when a hidden core is allocated, processing contention may occur, leading to insufficient processing performance.
[0204] In this embodiment, the required task isolation level for each task (e.g., L1 task) is calculated (or, as claimed in claim 13, a table is set in advance) to distinguish between tasks that require high processing performance and tasks that can use SMT (which also leads to the satisfaction of "Requirement 1 (performance)"). Then, tasks that require low latency, low processing performance, or tasks that are unlikely to cause contention are assigned to coexisting cores (such as hidden cores) using SMT. This allows SMT to be utilized, and "Requirement 2: The number of execution cores required to execute each task must be minimal" can be satisfied. Furthermore, by effectively utilizing hidden cores, the number of unused CPU execution cores is reduced, thereby contributing to power savings.
[0205] (3) Summary In this embodiment, in addition to the "dedicated instruction processing conflicts within the CPU" in the first embodiment, core allocation is performed taking into consideration the characteristics of each task (low latency and / or the number of required cores). In other words, by allocating tasks to hidden cores after checking processing conflicts from surrounding information, hidden cores can be effectively used without conflicts. This is suitable for application to a vRAN L1 scheduler that takes conflicts in SMT into consideration.
[0206] The task scheduler device 200, 200A (Figures 16 to 18) is provided with a low latency requirement recording unit 211 that records the low latency requirements required for the execution of each task, and a required isolation degree calculation unit for each task (required isolation degree / number of cores calculation unit for each task 221) (Figures 16 to 18) calculates the required isolation degree based on the required isolation degree and low latency requirements of each task.
[0207] By doing this, a low latency requirement recording unit 211 is provided that records the low latency requirements required for the execution of each task, and the required isolation level / number of cores calculation unit 221 for each task (Figures 16 to 18) calculates the required isolation level based on the required isolation level and low latency requirements of each task, thereby enabling a more accurate calculation of the required isolation level.
[0208] The task scheduler device 200, 200A (Figures 16 to 18) is provided with a task load recording unit 212 that records the load required for the calculation of each task, and a task required isolation calculation unit (task required isolation / core number calculation unit 221) (Figures 16 to 18) calculates the number of physical cores required for execution based on the load, and a core allocation determination unit 222 selects the required number of physical cores that satisfy the required isolation based on the required isolation and number of physical cores for each task.
[0209] By doing this, the task scheduler device 200, 200A uses the load amount for each task type as the required number of cores, and the required isolation level / number of cores calculation unit 221 for each task can derive the required isolation level / number of cores table 340 (Figure 24).
[0210] In the task scheduler device 200B (Figure 32) of <Variant 1>, the task scheduler device 200B includes, in userland 60, a task-specific instruction usage ratio recording unit 210 that records each task-specific instruction usage ratio, which indicates the ratio at which dedicated instructions in the CPU are used in the execution of each task, a core allocation judgment unit 220B, a core allocation determination unit 222 that selects the required number of physical cores based on each task-specific instruction usage ratio, a task processing unit 230, a task queue unit 240, and a core allocation unit 260.
[0211] By doing this, the task scheduler device 200B can select the required number of physical cores based on the task-specific instruction utilization ratio of each task in the task-specific instruction utilization ratio recording unit 210, thereby achieving the effect of the "dedicated instruction processing contention within the CPU" of the first embodiment, i.e., the effect of eliminating processing contention in the same physical core and suppressing insufficient processing performance.
[0212] In the task scheduler device 200C (Figure 34) of <Variant 2>, the task scheduler device 200C includes, in userland 60, a task-specific instruction usage ratio recording unit 210 that records each task-specific instruction usage ratio, which indicates the ratio at which dedicated instructions in the CPU are used in the execution of each task, a low latency requirement recording unit 211 that records the low latency requirements required in the execution of each task, a core allocation judgment unit 220C, a core allocation determination unit 222, a task processing unit 230, a task queue unit 240, and a core allocation unit 260.
[0213] By doing this, the task scheduler device 200C can select the required number of physical cores based on the task-specific instruction usage ratio of each task in the task-specific instruction usage ratio recording unit 210 and the low latency requirements in the low latency requirement recording unit 211, thereby further improving the effect of the ``dedicated instruction processing contention within the CPU'' of the first embodiment from the perspective of low latency.
[0214] In a task scheduler device 200D (FIG. 36) of <Variant 3>, the task scheduler device 200D includes a task-dedicated instruction usage ratio recording unit 210 that records a task-dedicated instruction usage ratio indicating the ratio of dedicated instructions in the CPU that are used in the execution of each task, a task load amount recording unit 212 that records the load amount required for the calculation of each task, a core allocation judgment unit 220, a core allocation determination unit 222 that selects the required number of physical cores that satisfy the required degree of isolation based on the required degree of isolation of each task, a task processing unit 230, a task queue unit 240, and a core allocation unit 260.
[0215] By doing this, the task scheduler device 200D selects the required number of physical cores based on the task-dedicated instruction usage ratio of each task in the task-dedicated instruction usage ratio recording unit 210 and the load amount in each task load amount recording unit 212, thereby accurately selecting the number of physical cores that matches the load amount, and further improving the effect of the ``dedicated instruction processing contention within the CPU'' of the first embodiment.
[0216] In a task scheduler device 200E (FIG. 38) of <Modification 4>, the task scheduler device 200E includes a task-specific instruction usage ratio recording unit 210 that records a task-specific instruction usage ratio indicating the ratio of dedicated instructions in a CPU to be used in the execution of each task, a task-specific isolation degree recording unit 213, a core allocation determination unit 220E, and a task-specific isolation degree calculation unit 220F that calculates a required isolation degree indicating what percentage of a single physical core an executing CPU core needs to occupy. The system includes a task required isolation level / core number calculation unit 221E (required isolation level calculation unit), a core allocation determination unit 222 that records the required isolation level derived by the task required isolation level / core number calculation unit 221E (Figure 38) in the task required isolation level recording unit 213 (Figure 38), a task processing unit 230, a task queue unit 240, and a core allocation unit 260 that records the required isolation level derived by the task required isolation level / core number calculation unit 221E (Figure 38) in the task required isolation level recording unit 213 (Figure 38).
[0217] By doing this, the task scheduler device 200E can achieve the effects of the first embodiment, as well as satisfy the requirement that "the CPU processing performance required for each task is allocated within a certain period of time" (satisfy the "low latency requirement") by calculating the required isolation level and isolating physical cores for tasks that require high processing performance or that are prone to conflict, thereby avoiding intra-core conflicts in processing.
[0218] In the task scheduler device 200, 200A (Figures 16 to 18), the core allocation determination unit 222 (Figures 16 to 18) makes it impossible to execute other tasks on the same physical core when the required isolation level is a predetermined maximum value, and selects one or more core numbers for each physical core to assign tasks to within a range in which the required isolation level does not exceed the maximum value.
[0219] In this way, the core allocation determination unit 222 of the task scheduler apparatus 200, 200A can select the required number of physical cores that satisfy the required degree of isolation based on the required degree of isolation of each task and the number of physical cores.
[0220] In the task scheduler devices 200, 200A (Figures 16 to 18), the required isolation calculation unit for each task (required isolation degree / core number calculation unit for each task 221) (Figures 16 to 18) indexes the required isolation degree between 0 and 1, with 1 being the maximum value (in this embodiment, the significant value is one decimal place, and 1.0 is the maximum value between 0.0 and 1.0), and the core allocation determination unit 222 (Figures 16 to 18) does not allow other tasks to be executed on the same physical core when the required isolation degree is 1, and selects one or more core numbers for each physical core to allocate tasks so that the total required isolation degree does not exceed 1.
[0221] In this way, the core allocation determination unit 222 of the task scheduler apparatus 200, 200A can select the required number of physical cores that satisfy the required isolation level based on the required isolation level of each task and the number of physical cores. For example, if the required isolation level is 1.0, it is not possible to execute other tasks on the same physical core, and one or more core numbers can be selected for each physical core to allocate tasks so that the total required isolation level does not exceed 1.
[0222] Here, the manner in which the required task isolation level for each task is calculated (Figures 19 to 21, Figure 24) calculates the required isolation level, isolates physical cores, avoids intra-core processing conflicts, and then selects multiple core numbers for logical cores ("hidden cores") that allow other tasks to be executed on the same physical core until the required isolation level reaches 1.0, thereby enabling more detailed and effective use of hidden cores.
[0223] In the task scheduler devices 200, 200A (Figures 16 to 18), the required isolation level calculation unit for each task (required isolation level / core number calculation unit for each task 221) (Figures 16 to 18) groups and stores the task execution priorities for each task type in advance as task execution groups, and the core allocation determination unit 222 selects the corresponding core number for the CPU core to which the task execution group belongs and assigns the task.
[0224] In this way, the core allocation determination unit 222 (FIGS. 16 to 18) of the task scheduler apparatus 200, 200A can select the core number corresponding to the CPU core to which the task execution group belongs and allocate the task. For example, as shown in FIG. 28, the task execution group in FIG. 26 can be satisfied with five physical cores, thereby reducing the number of cores.
[0225] The mode of performing advance table settings (FIGS. 25 and 26) has the advantage of requiring less processing in task allocation than the mode of calculating the required task isolation level for each task (FIGS. 19 to 21 and 24).
[0226] In the task scheduler devices 200 and 200A (FIGS. 16 to 18), the core allocation determination unit 222 selects core numbers for pairs of logical cores that exist on the same physical core according to SMT, and allocates tasks to them.
[0227] In this way, the task scheduler devices 200 and 200A distinguish between tasks that require high processing performance and tasks that can use SMT by setting a table in advance for tasks (e.g., L1 tasks). Then, tasks that require low latency, low processing performance, or tasks that are unlikely to cause contention are assigned to coexisting cores (such as hidden cores) by SMT.
[0228] In this embodiment, the task scheduler devices 200, 200A (FIGS. 16 to 18) are configured to include recording units such as the task-specific instruction usage ratio recording unit 210, the low latency requirement recording unit 211, and the task load amount recording unit 212. However, these recording units are merely names used for convenience in order to clarify the components of the invention. The task-required isolation / core number calculation unit 221 may be any unit capable of acquiring the task-specific instruction usage ratio, low latency requirements, and task load amount, and may be called a task-specific instruction usage ratio acquisition unit, a low latency requirement acquisition unit, or a task load amount acquisition unit. Generally, when acquiring information, the acquired information is saved.
[0229] [Hardware Configuration] The task scheduler apparatuses 100, 100A (FIGS. 2 and 3) according to the first embodiment and the task scheduler apparatuses 200, 200A-200E (FIGS. 16 to 18, 32, 34, 36, and 38) according to the second embodiment are realized, for example, by a computer 900 having a configuration as shown in Fig. 40. Fig. 40 is a hardware configuration diagram showing an example of the computer 900 that realizes the functions of the task scheduler apparatuses 100, 100A (FIGS. 2 and 3) and the task scheduler apparatuses 200, 200A-200E (FIGS. 16 to 18, 32, 34, 36, and 38) according to the second embodiment. The computer 900 includes 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 .
[0230] The CPU 901 operates based on programs stored in the ROM 902 or the HDD 904, and controls the various components of the task scheduler apparatuses 100 and 100A (FIGS. 2 and 3) and the task scheduler apparatuses 200, 200A-200E according to the second embodiment (FIGS. 16 to 18, 32, 34, 36, and 38). The ROM 902 stores a boot program executed by the CPU 901 when the computer 900 is started, programs dependent on the hardware of the computer 900, and the like.
[0231] 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.
[0232] 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.
[0233] 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.
[0234] For example, when the computer 900 functions as the task scheduler apparatuses 100, 100A (FIGS. 2 and 3) configured as an apparatus according to the first embodiment and the task scheduler apparatuses 200, 200A-200E (FIGS. 16 to 18, 32, 34, 36, and 38) according to the second embodiment, the CPU 901 of the computer 900 executes a program loaded onto the RAM 903 to realize the functions of the task scheduler apparatuses 100, 100A and 200, 200A-200E. Furthermore, the HDD 904 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 load a program related to a target process from another device via a communication network (NW 920).
[0235] Note that, among the processes described in the above embodiments and modifications, 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.
[0236] 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.
[0237] DESCRIPTION OF SYMBOLS 11 Physical core 21, 22 Logical core 50 CPU 60 Userland 100, 100A, 200, 200A, 200B, 200C, 200D, 200E Task scheduler device 110 Acquisition unit for each application-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 In-CPU arithmetic unit configuration information recording unit 160, 260 Core allocation unit 170 Port contention status acquisition unit 180 Existing process core allocation change determination unit 210 Recording unit for each task-dedicated instruction usage ratio 211 Low latency requirement recording unit 212 Recording unit for each task load amount 213 Recording unit for each task required isolation level 220, 220B, 220C, 220E Core allocation determination unit 221, 221E Required isolation level / number of cores calculation unit for each task (required isolation level calculation unit) 222 Core allocation determination unit 230 Task processing unit 240 Task queue unit 310, 320, 330 Data structure table 340 Required isolation level / number of cores table 360 First correspondence relationship table 370 Second correspondence relationship table 1000 Computing system
Claims
1. A task scheduler device comprising: a dedicated instruction ratio acquisition unit that acquires the execution ratio of dedicated instructions specialized for specific calculations 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 of the CPU intra-processor configuration information recording unit; and a core allocation unit that assigns the logical core on which each process can operate to the core allocation destination determined by the core allocation determination unit based on a process identifier and a logical core identifier.
2. A task scheduler device comprising: a dedicated instruction ratio acquisition unit that acquires an execution ratio of dedicated instructions specialized for a specific calculation for 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 assignment 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; a core allocation unit that assigns the logical core on which each process can operate based on a process identifier and a logical core identifier for the core assignment destination determined by the core allocation determination unit; a task-specific instruction utilization ratio recording unit that records a task-specific instruction utilization ratio indicating the ratio at which dedicated instructions in the CPU are used in the execution of each task; and a core allocation determination unit that selects the required number of physical cores based on the task-specific instruction utilization ratio.
3. 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.
4. The task scheduler device according to claim 1, characterized in that said core allocation determination unit allocates logical cores so as to provide a combination of said dedicated instructions and their types that does not conflict with each other in terms of performance.
5. 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.
6. 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.
7. 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.
8. The task scheduler device according to claim 2, further comprising a low latency requirement recording unit which records the low latency requirements required in the execution of each task, wherein the core allocation determination unit selects the required number of physical cores based on the task-specific instruction usage ratio of each task and the low latency requirements.
9. A task scheduler device as described in claim 8, further comprising: a task load recording unit that records the load required for the calculation of each task; and the core allocation determination unit selects the required number of physical cores based on the task-specific instruction usage ratio and the load.
10. A task scheduler device as described in claim 2, further comprising: a required isolation degree calculation unit for each task that calculates a required isolation degree indicating what percentage of a single physical core the CPU core to be executed needs to occupy; and the core allocation determination unit selects the required number of physical cores that satisfy the required isolation degree based on the required isolation degree of each task.
11. The task scheduler device described in claim 10, characterized in that the core allocation determination unit disables the execution of other tasks on the same physical core when the required degree of isolation is a predetermined maximum value, and selects one or more core numbers for one physical core to assign tasks to, within a range in which the required degree of isolation does not exceed the maximum value.
12. The task scheduler device described in claim 10, characterized in that the calculation unit for the required isolation level for each task exponentially converts the required isolation level into a value between 0 and 1, with 1 being the maximum value, and the core allocation determination unit makes it impossible to execute other tasks on the same physical core when the required isolation level is 1, and selects one or more core numbers for one physical core to allocate tasks to such that the total required isolation level does not exceed 1.
13. The task scheduler device according to claim 10, characterized in that the calculation unit for each task's required isolation level pre-groups and stores the priority of task execution for each task type as a task execution group, and the core allocation determination unit selects a corresponding core number for a CPU core to which the task execution group belongs and assigns the task to the CPU core.
14. The task scheduler device according to claim 2, characterized in that the core allocation determination unit selects a core number for a pair of logical cores existing in the same physical core by SMT (Simultaneous Multi Threading) and allocates a task to the pair.
15. 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, wherein the task scheduler device executes the following steps: acquiring the execution ratio of the dedicated instructions for 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 logical core on which each process can operate to the determined core assignment destination based on the process identifier and the logical core identifier.
16. 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, wherein the task scheduler device executes the following steps: acquiring the execution ratio of the dedicated instructions for 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; allocating the logical core on which each process can operate to the determined core assignment destination based on the process identifier and the logical core identifier; recording the dedicated instruction usage ratio for each task, which indicates the ratio at which dedicated instructions in the CPU are used in the execution of each task; and selecting the required number of physical cores which satisfy the required degree of isolation based on the dedicated instruction usage ratio for each task.
17. A program for causing a computer to function as a task scheduler device according to any one of claims 1 to 14.
Citation Information
Patent Citations
Resource management method and device
CN116089089A
Method for processing scheduling of vector instruction
JP1995013963A
Image processing device, power control method and power control program
JP2017011385A
Electronic control device and method for allocating multi-core
JP2019179397A
Information processor and task management program
JP2020144737A
