Processor resource management method and device, cloud computing equipment and storage medium

By first starting computing tasks in the cloud computing system and binding them to the target processor for isolation and migrating other tasks, the problems of complexity of processor resource management and insufficient computing power guarantee in the existing technology are solved and more efficient is achieved. computing power services and user experience.

CN118535312APending Publication Date: 2024-08-23ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310151942.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing technology is difficult to guarantee the system computing power of cloud computing tasks, especially in the process of processor resource management and task cleanup, which is time-consuming and complex, resulting in tasks unable to successfully obtain processor resources.

Method used

By first starting the computing task, then binding it to the target processor and isolating it, migrating other tasks to the preset processor, the target processor can focus on running the computing task, and finally releasing the isolation to avoid rebooting the operating system and modifying the processor mask. code.

Benefits of technology

It improves the fault tolerance and computing service quality of computing tasks guaranteed by processor computing power, simplifies the task orchestration process, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535312A
    Figure CN118535312A
Patent Text Reader

Abstract

The invention discloses a processor resource management method and device, cloud computing equipment and a storage medium, and belongs to the technical field of cloud computing. The method comprises the steps that after a to-be-executed calculation task is started, the calculation task is bound to a target processor, and the target processor is isolated; migrating tasks, except the calculation task, on the target processor to other preset processors so as to run the calculation task through the target processor; and after the operation of the computing task is finished, releasing the isolation of the target processor. According to the technical scheme, the technical problem that the system computing power of the cloud computing task is difficult to guarantee in related technologies can be solved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a method and apparatus for managing processor resources, a cloud computing device, and a storage medium. Background Art

[0002] In the field of cloud computing and communication equipment systems, the demand for computing power to ensure the system's ability to handle cloud computing tasks has become increasingly high. In related technologies, the process of re-dividing isolated processors for resource preparation during the system boot phase, or clearing tasks for processors that need to be bound to computing tasks, is time-consuming and complex, and can easily lead to tasks failing to obtain processor resources. In other words, related technologies are difficult to ensure the system computing power for cloud computing tasks. Summary of the invention

[0003] The main purpose of this application is to provide a processor resource management method, cloud computing equipment and storage medium, aiming to solve the technical problem that related technologies are difficult to guarantee the system computing power of cloud computing tasks.

[0004] To achieve the above object, an embodiment of the present application provides a method for managing processor resources, the method comprising: After starting the computing task to be executed, binding the computing task to a target processor and isolating the target processor; Migrating tasks other than the computing task on the target processor to other preset processors, so as to run the computing task through the target processor; After the computing task is finished running, the isolation of the target processor is released.

[0005] In addition, an embodiment of the present application further provides a processor resource management device, the management device comprising a task management unit, a binding unit, an isolation unit and an exclusive unit respectively connected to the task management unit; The task management unit is configured to start the computing task to be executed, and after the computing task is finished running, release the isolation of the target processor bound to the computing task; The binding unit is configured to bind the computing task started by the task management unit to a target processor; The isolation unit is configured to isolate the target processor bound to the computing task; The exclusive unit is configured to migrate tasks other than the computing task on the isolated target processor to other preset processors.

[0006] Each functional unit of the management device implements the steps of the processor resource management method described above during operation.

[0007] In addition, an embodiment of the present application also provides a cloud computing device, which includes: a processor resource management device as described above, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the processor resource management method as described above.

[0008] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the processor resource management method as described above are implemented.

[0009] An embodiment of the present application discloses a method for managing processor resources, which starts a computing task to be executed, binds the computing task to a target processor that provides computing power services, isolates the target processor to which the computing task is bound, and then migrates all tasks on the target processor except the computing task to other preset processors. In this way, the computing task is run by the processor after the above settings are completed. Finally, after the computing task is completed, the isolation unit is released from the isolation of the target processor.

[0010] Thus, the embodiment of the present application starts the computing task first and then performs the binding isolation between the task and the target processor. In this way, there is no need to reboot the operating system to modify the processor mask of the target processor in the operating system scheduling component, and the target processor can be set as an isolated processor from the operating system perspective. Therefore, compared with the related art, the embodiment of the present application effectively improves the fault tolerance of the computing task to obtain the processor computing power guarantee, thereby solving the technical problem that the related art is difficult to guarantee the system computing power of cloud computing tasks, while providing a better user experience.

[0011] Furthermore, the embodiment of the present application also performs dynamic migration processing on other tasks on the target processor that are not related to the task. In this way, the target processor can provide sufficient computing resources for the operation of the computing task, further ensuring the computing service quality of the processor for the computing task. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a structural diagram of an operating device of a hardware operating environment involved in an embodiment of the present application; Figure 2 A flowchart of a first embodiment of a method for managing processor resources according to an embodiment of the present application; Figure 3 A flowchart of a feasible embodiment of a method for managing processor resources involved in an embodiment of the present application; Figure 4 A flowchart of the execution steps of the method for managing processor resources involved in the embodiment of the present application; Figure 5 A flowchart of a second embodiment of a method for managing processor resources according to an embodiment of the present application; Figure 6 A flowchart of another feasible embodiment of the method for managing processor resources involved in the embodiment of the present application; Figure 7 A flowchart of a third embodiment of a method for managing processor resources according to an embodiment of the present application; Figure 8 A flowchart of another feasible embodiment of the method for managing processor resources involved in the embodiment of the present application; Fig. 9 A schematic diagram of the structure of a processor resource management device involved in an embodiment of the present application.

[0013] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0014] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0015] At present, in the field of cloud computing and communication equipment systems, when the operating system schedules and binds the processor to perform computing tasks, it can choose to set some processors on the server or the processors of the virtual machine as isolated processors during the boot phase, and then start and bind the cloud computing tasks to be calculated to the processors in the isolated state. However, this method requires the pre-division of a separate isolated processor resource pool during the boot phase, which results in a long time for the processor resources to be set up; and the quota management of the overall processor resource pool is also relatively rigid; more importantly, the processor that has been set by the operating system to enter the isolated processor resource pool but has not yet been assigned a computing task will be in an idle state and cannot be used by the operating system for other purposes; in addition, the task scheduling system that interfaces with the operating system also needs to use whether the processor is in an isolated state as a key parameter for scheduling, which makes the overall scheduling process of the computing task very complicated.

[0016] Alternatively, there is another way to process cloud computing tasks, that is, all processors on the server managed by the operating system or all processors of the virtual machine are uniformly initialized to create a shared processor resource pool, and then, before the computing task starts, some processors on the server or some processors of the virtual machine are first set as isolated processors, and then all tasks on the target processor (including physical processors and / or processors of virtual machines) are cleared, and then the task is started and bound to the target processor in the isolated state, and after the task is executed, the processor in the isolated state is recovered and reset to a shared processor and returned to the processor resource pool. However, even if this method can achieve the goal of not restarting the operating system, since clearing the tasks on the target processor is a time-consuming step, the subsequent binding and running of tasks cannot give users a good experience, and this method still has poor fault tolerance for computing tasks to obtain server computing power guarantees.

[0017] In light of the above, in the field of cloud computing and communication equipment systems, the demand for computing power guarantee for the system to process cloud computing tasks has become increasingly high. In the related technologies, the re-dividing of isolated processors for resource preparation during the system boot phase, or the task cleaning of processors that need to be bound to computing tasks, are both time-consuming and complex operations, which can easily lead to the inability of tasks to obtain processor resources smoothly. That is, the related technologies are difficult to guarantee the system computing power of cloud computing tasks.

[0018] To solve the above technical problems, the embodiment of the present application provides a method for managing processor resources, by first starting the current computing task to be executed, then binding the computing task to the target processor that provides computing power services, and isolating the target processor with the bound computing task, and then migrating all tasks on the target processor except the computing task to other preset processors. In this way, the computing task is run by the processor after completing the above settings, and finally, after the computing task is completed, the isolation unit is released from the isolation of the target processor.

[0019] Thus, the embodiment of the present application starts the computing task first and then performs the binding isolation between the task and the target processor. In this way, there is no need to reboot the operating system to modify the processor mask of the target processor in the operating system scheduling component, and the target processor can be set as an isolated processor from the operating system perspective. Therefore, compared with the related art, the embodiment of the present application effectively improves the fault tolerance of the computing task to obtain the processor computing power guarantee, thereby solving the technical problem that the related art is difficult to guarantee the system computing power of cloud computing tasks.

[0020] Furthermore, the embodiment of the present application also performs dynamic migration processing on other tasks on the target processor that are not related to the task. In this way, the target processor can provide sufficient computing resources for the operation of the computing task, further ensuring the computing service quality of the processor for the computing task.

[0021] For example, please refer to Figure 1 , Figure 1 This is a schematic diagram of the operating equipment structure of the hardware operating environment involved in the embodiment of the present application.

[0022] like Figure 1 As shown, the operating device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0023] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the operating equipment. Figure 1 The operating device involved in the embodiment of the present application may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0024] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a computer program.

[0025] exist Figure 1In the running device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the running device of the present application can be set in the running device, and the running device calls the computer program stored in the memory 1005 through the processor 1001, and performs the following operations: After starting the computing task to be executed, binding the computing task to a target processor and isolating the target processor; Migrating tasks other than the computing task on the target processor to other preset processors, so as to run the computing task through the target processor; After the computing task is finished running, the isolation of the target processor is released.

[0026] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations: After the computing task is finished, the target processor is set to a preset manageable state for scheduling and running new tasks, wherein the manageable state includes: an isolated state and a shared state.

[0027] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations: The target processor is set to the isolated state or the shared state according to task scheduling requirements.

[0028] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and before executing the operation of isolating the target processor, further perform the following operations: detecting a manageability state of the target processor; When it is detected that the manageable state is the isolated state, performing the step of migrating tasks other than the computing task on the target processor to other preset processors; In the case where it is detected that the manageable state is the shared state, the steps of isolating the target processor and migrating tasks other than the computing task on the target processor to other preset processors are performed.

[0029] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and after executing the operation of starting the computing task to be executed and before the operation of binding the computing task to the target processor, further perform the following operations: Parse the received task request; When it is confirmed through analysis that the task request carries a computing power guarantee requirement, the task request is taken as a computing task to be executed and started.

[0030] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations: After the computing task is started, an operation termination event of the computing task is monitored, so as to determine that the operation of the computing task is completed when the operation termination event is detected.

[0031] Exemplarily, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations: In the case where an exclusive completion notification is detected, the target processor is controlled to execute the computing task, wherein the exclusive completion notification is generated after tasks other than the computing task on the target processor are migrated to the other processors.

[0032] Based on the overall concept of the processor resource management method provided by the above-mentioned embodiment scheme of the present application, various embodiments of the processor resource management method are proposed. It should be noted that the processor resource management method provided by the present application is applied to a cloud computing device having the same or similar structural design as the above-mentioned operating device, and it should be understood that based on the different design needs of actual applications, in different feasible implementation schemes, the processor resource management method can of course also be applied to other terminal devices. In order to facilitate the understanding and explanation of the technical solution, the following text uses the cloud computing device as the executor of the solution implementation to explain the processor resource management method provided by the present application.

[0033] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the steps of an embodiment of a method for managing processor resources provided by the present application. It should be noted that although a logical order is shown in the flowchart, in some cases, the method for managing processor resources provided by the present application can of course also perform the steps shown or described in a different order than that here.

[0034] like Figure 2 As shown, the processor resource management method provided by the present application may include the following steps: Step S10, after starting the computing task to be executed, binding the computing task to a target processor and isolating the target processor.

[0035] In this embodiment, after receiving a task request and determining the computing task that needs to be executed for cloud computing processing by parsing the task request, the cloud computing device can first start the computing task to bind the computing task to the currently available target processor, and after the binding is completed, isolate the target processor bound to the current computing task.

[0036] In this embodiment, the above-mentioned computing tasks are units of computing power arrangement in the operating system of the cloud computing device, including processes, threads, containers, virtual machines, etc. It should be understood that based on the different design needs of actual applications, in different feasible implementation schemes, computing tasks can certainly be of different types, but no matter what type the computing task is, it can be run according to the management method of processor resources provided in this application. Therefore, the management method of processor resources provided in the embodiment of the present application is not limited to the specific type of the computing task.

[0037] The target processor mentioned above can be all processor objects in the operating system of the cloud computing device that can support the processor scheduling function. Exemplarily, the target processor can be a physical CPU (central processing unit), a physical CPU core, a physical CPU hyperthread, a virtual machine CPU, a virtual machine CPU core or a virtual machine CPU hyperthread.

[0038] Step S20, migrating tasks other than the computing task on the target processor to other preset processors, so as to run the computing task through the target processor.

[0039] In this embodiment, after the cloud computing device starts the computing task to be executed, binds it to the target processor and performs isolation processing on the target processor, the cloud computing device further performs dynamic task migration processing on the target processor to migrate all or part of the tasks other than the computing task on the target processor to other preset processors, thereby providing sufficient computing power through the target processor to run the computing task.

[0040] In this embodiment, the tasks other than the currently executed computing tasks on the target processor refer to: irrelevant tasks that have no impact on the computing operation of the computing task. The other preset processors are other processors managed by the task scheduling system connected to the operating system of the cloud computing device, and the other processors may also be one or more of the above-mentioned physical CPU, physical CPU core, physical CPU hyperthread, virtual machine CPU, virtual machine CPU core, and virtual machine CPU hyperthread.

[0041] Step S30, after the computing task is completed, the isolation of the target processor is released.

[0042] In this embodiment, after the cloud computing device performs dynamic task migration on the target processor so that the target processor can run the bound computing task, if the cloud computing device detects that the target processor has completed processing the computing task, that is, the running of the computing task on the current cloud computing device has ended, the cloud computing device can lift the isolation of the target processor, thereby reclaiming the resources of the target processor for subsequent task scheduling.

[0043] For example, Figure 3 As shown, in a feasible embodiment, in the above step S10, after starting the computing task to be executed and before binding the computing task to the target processor, the processor resource management method provided by the present application may also include: Step A, parsing the received task request; In this embodiment, the cloud computing device may receive a task request initiated by a task scheduling system connected to the operating system, and then parse the task request.

[0044] In this embodiment, the task orchestration system refers to the scheduling component of the operating system in the cloud computing device, Kubenetes (abbreviated as K8s, which is an abbreviation formed by replacing the 8 characters "ubernete" in the middle of the name with 8. It is an open source and is used to manage containerized applications on multiple hosts in the cloud platform), Openstack (OpenStack is an open source cloud computing management platform project, a combination of a series of software open source projects), and other third-party orchestration systems that support computing power guarantee features.

[0045] Step B: When it is confirmed through analysis that the task request carries a computing power guarantee requirement, the task request is treated as a computing task to be executed and started.

[0046] In this embodiment, after the cloud computing device parses the task request initiated by the task scheduling system, if it is parsed that the task request is a request with computing power guarantee service requirements, the cloud computing device determines that the task request is a computing task that requires sufficient computing power, and immediately starts the computing task. After that, the cloud computing device can execute the process shown in the above steps S10, S20 and S30 to process the computing task and manage the processing resources.

[0047] For example, Figure 4As shown, after receiving the task request initiated by the task scheduling system and parsing that the task request is a task request with computing power guarantee requirements defined by the task scheduling system, the cloud computing device immediately starts the computing task corresponding to the task request. Then, the cloud computing device binds the computing task to the target physical CPU or virtual machine vCPU. Then, the cloud computing device performs isolation operations on the target physical CPU or virtual machine vCPU, and sets the target physical CPU or virtual machine vCPU bound to the computing task as a CPU in an isolated state from the perspective of the operating system. Finally, the cloud computing device performs task dynamic migration processing on the target physical CPU or virtual machine vCPU where the computing task is located, so as to migrate all other tasks on the target physical CPU or virtual machine vCPU that are not related to the computing task to one or more other CPUs managed by the above-mentioned task scheduling system, thereby using the target physical CPU or virtual machine vCPU to provide all of its own computing power to run the computing task, so that the computing task can obtain sufficient computing power guarantee. Moreover, the cloud computing device can start monitoring whether the computing task has been completed at any time point after starting the above-mentioned computing task. After monitoring and confirming that the computing task has been completed, the cloud computing device can reset the target physical CPU or target virtual machine vCPU bound to run the computing task to the manageable state defined by the above-mentioned task scheduling system to facilitate subsequent task scheduling processing.

[0048] In this embodiment, the computing power guarantee service demand can also be referred to as the computing power guarantee service requirement. In addition, the task scheduling system can also generally include in the initiated task request a list of identifiers of the target processors to which the task needs to be bound for operation, and the identifier of each processor in the list generally uses the CPU id identified by the operating system as an example, so that after receiving the task request and parsing the identifier list of the target processors to which the task needs to be bound for operation, the cloud computing device can call the corresponding target processor to perform task binding.

[0049] In this embodiment, after receiving a task request and determining the computing task that needs to be executed by cloud computing processing by parsing the task request, the cloud computing device can first start the computing task to bind the computing task to the currently available target processor, and then, after the binding is completed, isolate the target processor bound to the current computing task. After that, the cloud computing device further performs task dynamic migration on the target processor to migrate all or part of the tasks on the target processor except the computing task to other preset processors, so as to provide sufficient computing power to run the computing task through the target processor. Finally, if the cloud computing device detects that the target processor has completed processing the computing task, that is, the operation of the computing task on the current cloud computing device has ended, the cloud computing device can contact the isolation made for the target processor, so as to recycle the resources of the target processor for subsequent task scheduling.

[0050] Thus, this embodiment starts the computing task first and then performs the binding isolation between the task and the target processor. In this way, there is no need to reboot the operating system to modify the processor mask of the target processor in the operating system scheduling component, and the target processor can be set as an isolated processor from the operating system perspective. Therefore, compared with the related art, the embodiment of the present application effectively improves the fault tolerance of the computing task to obtain the processor computing power guarantee, thereby solving the technical problem that the related art is difficult to guarantee the system computing power of cloud computing tasks, and also improves the user experience.

[0051] Furthermore, the embodiment of the present application also performs dynamic migration processing on other tasks on the target processor that are not related to the task. In this way, the target processor can provide sufficient computing resources for the operation of the computing task, further ensuring the computing service quality of the processor for the computing task.

[0052] In addition, based on the first embodiment of the method for managing processor resources provided by the present application, a second embodiment of the method for managing processor resources is proposed.

[0053] like Figure 5 As shown, in the second embodiment of the method for managing processor resources provided in the present application, the method for managing processor resources may further include: Step S40, after the computing task is finished, setting the target processor to a preset manageable state for scheduling and running new tasks, wherein the manageable state includes: an isolated state and a shared state.

[0054] In this embodiment, if the cloud computing device detects that the above-mentioned target processor has completed processing the bound computing task, that is, the execution of the computing task on the current cloud computing device has ended, the cloud computing device can also set the target processor to the isolation state or sharing state required by the above-mentioned task scheduling system when reclaiming the resources of the target processor, so as to provide the task scheduling system with the scheduling processing of new tasks.

[0055] Exemplarily, in a feasible embodiment, the above step of “setting the target processor to a preset manageable state” may include: Step S401: setting the target processor to the isolated state or the shared state according to task scheduling requirements.

[0056] In this embodiment, the task scheduling requirement is: the task scheduling system connected to the operating system of the cloud computing device defines the processor resources based on user needs. The operating system receives the task scheduling requirements transmitted in real time by the task scheduling system, and parses the task scheduling requirements to determine whether the recovered target processor needs to be set to an isolated state or a shared state.

[0057] For example, in this embodiment, if the target processor that the cloud computing device currently needs to recycle is in an isolated state, and the task scheduling requirements currently received and parsed from the task scheduling system also determine that the target processor needs to be set to an isolated state, the cloud computing device directly recycles the processor without setting its state. However, if the target processor that the cloud computing device currently needs to recycle is in an isolated state, but the task scheduling requirements currently received and parsed determine that the target processor needs to be set to a shared state, the cloud computing device first sets the target processor to a shared state, and then recycles its resources.

[0058] For example, Figure 6 As shown, in a feasible embodiment, before the cloud computing device performs isolation processing on the target processor bound with the computing task, the processor resource management method provided by the present application may also include: Step a, detecting the manageability state of the target processor; In this embodiment, since the cloud computing device may have set the target processor running the previous computing task to an isolated state based on the task scheduling requirements defined by the above-mentioned task scheduling system, after the cloud computing device starts the current computing task to be executed and binds the computing task to the same target processor, before further isolating the target processor bound to the computing task, it is also necessary to detect whether the target processor itself is already in an isolated state.

[0059] Step b, when it is detected that the manageable state is the isolated state, executing the step of migrating the tasks on the target processor except the computing task to other preset processors; In this embodiment, when the cloud computing device is detecting the state of the target processor bound to the computing task, if it is detected that the target processor itself is in an isolated state, the cloud computing device can directly execute the above-mentioned step of "migrating tasks other than the computing task on the target processor to other preset processors" for the target processor, thereby migrating all or part of the tasks other than the computing task on the target processor to other preset processors, thereby providing sufficient computing power through the target processor to run the computing task.

[0060] Step c, when it is detected that the manageable state is the shared state, executing the steps of isolating the target processor and migrating tasks other than the computing task on the target processor to other preset processors.

[0061] In this embodiment, when the cloud computing device detects the state of the target processor itself, if it is detected that the target processor itself is in a shared state, the cloud computing device first performs the above-mentioned step of "isolating the target processor" for the target processor to isolate the target processor bound to the current computing task, and then performs the above-mentioned step of "migrating tasks other than the computing task on the target processor to other preset processors" for the target processor to migrate all or part of the tasks other than the computing task on the target processor to other preset processors, so as to provide sufficient computing power through the target processor to run the computing task.

[0062] For example, Figure 4 As shown, when the cloud computing device binds the computing task to the target CPU and starts to set the target physical CPU or virtual machine vCPU bound with the computing task to an isolated state from the perspective of the operating system, it first detects whether the target physical CPU or target virtual machine vCPU is currently an isolated CPU. If it is detected that the target physical CPU or target virtual machine vCPU is not currently an isolated CPU, the state of the target physical CPU or target virtual machine vCPU is set to an isolated state. If the target physical CPU or target virtual machine vCPU is currently an isolated CPU, the tasks on the target physical CPU or virtual machine vCPU that are not related to the computing task to be executed are directly migrated to other CPUs in whole or in part.

[0063] In this embodiment, if the cloud computing device detects that the above-mentioned target processor has completed processing the bound computing task, that is, the execution of the computing task on the current cloud computing device has ended, the cloud computing device can also set the target processor to the isolation state or sharing state required by the above-mentioned task scheduling system when reclaiming the resources of the target processor, so as to provide the task scheduling system with the scheduling processing of new tasks.

[0064] Since the cloud computing device may have set the target processor to an isolated state based on the task scheduling requirements, the cloud computing device needs to detect whether the target processor is already in an isolated state before isolating the target processor bound to the current computing task. In this way, if the cloud computing device detects that the target processor itself is in an isolated state, the cloud computing device can directly migrate all or part of the tasks on the target processor except the computing task to other preset processors, thereby providing sufficient computing power to run the computing task through the target processor. If the cloud computing device detects that the target processor itself is in a shared state, the target processor bound to the current computing task is first isolated, and then all or part of the tasks on the target processor except the computing task are migrated to other preset processors, thereby providing sufficient computing power to run the computing task through the target processor.

[0065] Therefore, the processor resource management method provided in the present application effectively simplifies the complexity of the task scheduling system. The task scheduling system can call the processor resources on the cloud computing device through a simple scheduling algorithm, and the installation and upgrade of the physical server and virtual machine operating system of the cloud computing device can also be simplified accordingly.

[0066] In addition, based on the first embodiment and / or the second embodiment of the method for managing processor resources provided by the present application, a third embodiment of the method for managing processor resources is proposed.

[0067] like Figure 7 As shown, in the third embodiment of the method for managing processor resources provided in the present application, the method for managing processor resources may further include: Step I: After starting the computing task, monitor the running termination event of the computing task to determine that the running of the computing task is completed when the running termination event is detected.

[0068] In this embodiment, after starting the computing task to be executed, the cloud computing device can monitor the operation termination event / operation exit event of the computing task as needed. In this way, after monitoring the operation termination event / operation exit event, the cloud computing device can determine that the operation of the computing task currently being executed by the target processor has ended.

[0069] For example, the cloud computing device may monitor the operation termination event / operation exit event of the computing task at any time point after the computing task is started according to the requirements of the specific scenario. Thus, when it is determined that the computing task has ended by monitoring the operation termination event / operation exit event, the above-mentioned operation of reclaiming resources on the target processor is performed.

[0070] In this embodiment, the processor resource management method provided in the present application monitors and manages computing tasks, thereby ensuring that the target processor used in the running process of the computing task can remain in a manageable state.

[0071] For example, please refer to Figure 8 In a feasible embodiment, the above step of "running the computing task through the target processor" may include: Step II: when an exclusive completion notification is detected, control the target processor to run the computing task, wherein the exclusive completion notification is generated after migrating tasks other than the computing task on the target processor to the other processors.

[0072] In this embodiment, after the cloud computing device confirms that the target processor bound to the currently executed computing task is in an isolated state and performs task dynamic migration processing on the target processor to migrate other tasks on the target processor that are not related to the computing task to other processors, the cloud computing device can generate an exclusive completion notification. In this way, when the cloud computing device detects the exclusive completion notification during real-time monitoring, it can control the target processor to use all of its own computing power to run the computing task.

[0073] In this embodiment, the cloud computing device controls the target processor to start running the computing task only after it determines that there are no tasks unrelated to the computing task on the target processor bound to the computing task. In this way, it is ensured that the target processor uses all of its computing power to run the computing task, thereby providing sufficient computing power guarantee for the computing task.

[0074] In addition, please refer to Fig. 9, an embodiment of the present application further provides a processor resource management device, the processor resource management device comprising: a task management unit, a binding unit, an isolation unit and an exclusive unit respectively connected to the task management unit; The task management unit is configured to start the computing task to be executed, and after the computing task is finished running, release the isolation of the target processor bound to the computing task; The binding unit is configured to bind the computing task started by the task management unit to a target processor; The isolation unit is configured to isolate the target processor bound to the computing task; The exclusive unit is configured to migrate tasks other than the computing task on the isolated target processor to other preset processors.

[0075] In this embodiment, the processor resource management device can also be referred to as a device for ensuring the service quality of task computing power. The task management unit (also referred to as the task lifecycle management unit) is mainly responsible for completing lifecycle operations such as task running and stopping, and managing the task running status based on the request of the external task scheduling system. The binding unit is mainly used to provide binding operations between computing tasks and the target CPU that runs the tasks from the perspective of operating system scheduling. The computing power required for the computing tasks is provided by the target CPU to which they are bound. In addition, the binding unit supports binding a computing task to one or more target physical CPUs, and also supports binding a task to one or more target virtual machine vCPUs.

[0076] In addition, the isolation unit of the management device mainly provides dynamic isolation of the target physical CPU or virtual machine vCPU bound to the computing task, that is, without rebooting the operating system, the CPU mask of the target physical CPU or virtual machine vCPU in the operating system scheduling component is modified, so that it is no longer received by the operating system as an optional CPU for running scheduling. The isolation unit supports setting one or more target physical CPUs as isolated CPUs from the perspective of operating system scheduling, and also supports setting one or more target virtual machine vCPUs as isolated CPUs from the perspective of operating system scheduling.

[0077] The exclusive unit of the management device mainly provides dynamic exclusive migration of irrelevant tasks to the target physical CPU or virtual machine vCPU bound to the computing task (migrating all tasks irrelevant to the current computing task to be executed to other processors), so that only the current computing task to be executed runs on the target physical CPU or virtual machine vCPU. Similarly, the exclusive unit also supports dynamic exclusive migration of irrelevant tasks on one or more target physical CPUs, and supports dynamic exclusive migration of irrelevant tasks on one or more target virtual machine vCPUs.

[0078] Exemplarily, the task management unit is further configured to set the target processor to a preset manageable state for scheduling and running new tasks after the computing task is completed, wherein the manageable state includes: an isolated state and a shared state.

[0079] Exemplarily, the task management unit is further configured to set the target processor to the isolated state or the shared state according to a preset task scheduling requirement.

[0080] Exemplarily, the isolation unit is further configured to detect the manageability state of the target processor; and isolate the target processor when it is detected that the manageability state is the shared state.

[0081] Exemplarily, the task management unit is further configured to parse a preset task request; when the analysis confirms that the task request carries a computing power guarantee requirement, the task request is treated as a computing task to be executed and started.

[0082] Exemplarily, the task management unit is further configured to monitor an operation termination event of the computing task after starting the computing task, so as to determine that the operation of the computing task is terminated when the operation termination event is detected.

[0083] Exemplarily, the task management unit is further configured to control the target processor to run the computing task when an exclusive completion notification is detected, wherein the exclusive completion notification is generated after migrating tasks other than the computing task on the target processor to the other processors.

[0084] For example, Figure 4 As shown, when the processor resource management device provided by the embodiment of the present application is running, the task management unit first receives and parses the task request with the computing power guarantee service requirement, and then the task management unit determines the task request as a computing task that is currently to be executed and requires computing power guarantee, and starts the computing task.

[0085] Then, the task management unit requests the binding unit to bind the computing task to the target physical CPU or virtual machine vCPU, and the binding unit binds the computing task to the target physical CPU or virtual machine vCPU according to the received request.

[0086] Afterwards, the task management unit further requests the isolation unit to set the target physical CPU or virtual machine vCPU where the computing task is located as the isolated CPU from the perspective of the operating system. The isolation unit first analyzes and determines whether the target physical CPU or target virtual machine vCPU bound to the computing task is already an isolated CPU at the current moment. If the target physical CPU or target virtual machine vCPU is not currently an isolated CPU, the isolation unit sets the state of the target physical CPU or target virtual machine vCPU to an isolated CPU, and informs the task life unit that the binding has been completed. If the target physical CPU or target virtual machine vCPU is currently an isolated CPU, the isolation unit directly informs the task management unit that the binding has been completed.

[0087] The task management unit requests the exclusive unit to migrate irrelevant tasks on the target physical CPU or virtual machine vCPU where the task is located to other CPUs. The exclusive unit will migrate the tasks irrelevant to the computing task on the target physical CPU or virtual machine vCPU where the computing task is located to other CPUs, and inform the task life unit that the exclusivity has been completed. Then, after receiving the exclusive completion notification fed back by the exclusive unit, the task management unit can control the target physical CPU or virtual machine vCPU to start running the computing task with its own full computing power.

[0088] In addition, the task management unit can monitor the termination / exit event of the computing task at any time point after the computing task is started according to the requirements of the specific scenario. Therefore, according to the received task termination / exit event, the target physical CPU or target virtual machine vCPU where the computing task is located is set to the isolation state or sharing state defined by the task scheduling system.

[0089] The processor resource management device provided in this application adopts the processor resource management method in the above embodiment to solve the technical problem that it is difficult to ensure the system computing power of cloud computing tasks in the related technology. Compared with the related technology, the beneficial effects of the processor resource management device provided in the embodiment of this application are the same as the beneficial effects of the processor resource management method provided in the above embodiment, and the other technical features in the processor resource management device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0090] In addition, an embodiment of the present application also provides a cloud computing device, which includes: a processor resource management device as described above, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the processor resource management method as described above or the steps of the processor resource management method as described above.

[0091] In addition, an embodiment of the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the processor resource management method as described above or the steps of the processor resource management method as described above.

[0092] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0094] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for managing processor resources, characterized in that: The method comprises: After starting the computing task to be executed, binding the computing task to a target processor and isolating the target processor; Migrating tasks other than the computing task on the target processor to other preset processors, so as to run the computing task through the target processor; After the computing task is finished running, the isolation of the target processor is released.

2. The method for managing processor resources according to claim 1, wherein: The method further comprises: After the computing task is finished, the target processor is set to a preset manageable state for scheduling and running new tasks, wherein the manageable state includes: an isolated state and a shared state.

3. The method for managing processor resources according to claim 2, wherein: The step of setting the target processor to a preset manageable state includes: The target processor is set to the isolated state or the shared state according to task scheduling requirements.

4. The method for managing processor resources according to claim 2, wherein: Before isolating the target processor, the method further includes: detecting a manageability state of the target processor; When it is detected that the manageable state is the isolated state, performing the step of migrating tasks other than the computing task on the target processor to other preset processors; In the case where it is detected that the manageable state is the shared state, the steps of isolating the target processor and migrating tasks other than the computing task on the target processor to other preset processors are performed.

5. The method for managing processor resources according to claim 1, wherein: After starting the computing task to be executed and before binding the computing task to the target processor, the method further includes: Parse the received task request; When it is confirmed through analysis that the task request carries a computing power guarantee requirement, the task request is taken as a computing task to be executed and started.

6. The method for managing processor resources according to any one of claims 1 to 5, characterized in that: The method further comprises: After the computing task is started, an operation termination event of the computing task is monitored, so as to determine that the operation of the computing task is completed when the operation termination event is detected.

7. The method for managing processor resources according to any one of claims 1 to 5, characterized in that: The step of running the computing task by the target processor includes: In the case where an exclusive completion notification is detected, the target processor is controlled to execute the computing task, wherein the exclusive completion notification is generated after tasks other than the computing task on the target processor are migrated to the other processors.

8. A processor resource management device, characterized in that: The management device comprises a task management unit, a binding unit, an isolation unit and an exclusive unit respectively connected to the task management unit; The task management unit is configured to start the computing task to be executed, and after the computing task is finished running, release the isolation of the target processor bound to the computing task; The binding unit is configured to bind the computing task started by the task management unit to a target processor; The isolation unit is configured to isolate the target processor bound to the computing task; The exclusive unit is configured to migrate tasks other than the computing task on the isolated target processor to other preset processors.

9. A cloud computing device, characterized in that: The cloud computing device comprises: a processor resource management device as described in claim 8, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the processor resource management method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for managing processor resources according to any one of claims 1 to 7 are implemented.