WO2023050819A1 - System on chip, virtual machine task processing method and device, and storage medium - Google Patents
System on chip, virtual machine task processing method and device, and storage medium Download PDFInfo
- Publication number
- WO2023050819A1 WO2023050819A1 PCT/CN2022/091613 CN2022091613W WO2023050819A1 WO 2023050819 A1 WO2023050819 A1 WO 2023050819A1 CN 2022091613 W CN2022091613 W CN 2022091613W WO 2023050819 A1 WO2023050819 A1 WO 2023050819A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- processing
- virtual machine
- task
- task request
- main control
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 24
- 238000013507 mapping Methods 0.000 claims abstract description 81
- 238000000034 method Methods 0.000 claims description 64
- 238000004891 communication Methods 0.000 claims description 47
- 230000004044 response Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000006978 adaptation Effects 0.000 description 5
- 238000005192 partition Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 229940012720 subsys Drugs 0.000 description 1
- 238000004148 unit process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/78—Architectures of general purpose stored program computers comprising a single central processing unit
- G06F15/7807—System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure relates to the field of computer technology, and in particular to a system on chip, a virtual machine task processing method and device, and a storage medium.
- Virtualization refers to the division of physical resources into multiple logical partitions through virtualization management software on a physical machine server. The data resources of each partition are isolated from each other and become independent virtual machines.
- virtualization technologies mainly include software virtualization and hardware-assisted virtualization. However, the performance of software virtualization solutions is poor, and the hardware-assisted virtualization solutions require pre-adaptation of hardware, and the cost is relatively high.
- the embodiment of the present disclosure provides a virtual machine task processing method, which is applied to a system-on-chip.
- the task processing method includes: acquiring task requests sent by each virtual machine, wherein, for each task request, the The task request includes a corresponding virtual machine identifier; based on the pre-established mapping relationship between the virtual machine and each processing unit of the system-on-chip, the main control unit of the system-on-chip sends each of the task requests according to the virtual machine identifier Distributed to the corresponding processing unit for processing.
- the main control unit of the system-on-chip will Each of the task requests is distributed to the corresponding processing unit for processing, including: for the task request sent by any one of the virtual machines, the main control unit distributes the task request to the processing unit corresponding to the any one of the virtual machines unit is processed.
- the main control unit of the system-on-chip Identifying and distributing each task request to a corresponding processing unit for processing includes: for the task request sent by any one of the virtual machines, the main control unit splits and processes the task corresponding to the task request to obtain multiple sub- task; the number of the plurality of subtasks is less than or equal to the number of processing units corresponding to any one virtual machine; the main control unit distributes each subtask to one or more of the processing units corresponding to any one virtual machine Multiple processing units perform processing.
- the main control unit of the system on chip according to the virtual machine Identifying and distributing each task request to a corresponding processing unit for processing includes: the main control unit obtaining a task request sent by a virtual machine corresponding to any one processing unit; according to the virtual machine corresponding to any one processing unit Priority, for the task request sent by the virtual machine corresponding to any one of the processing units, determine the processing time corresponding to the task request; according to the processing time, the any processing unit corresponds to the any one processing unit Each task request sent by the virtual machine is processed.
- determining the processing time corresponding to the task request includes: The priority of each virtual machine is set, and the weight value corresponding to each task request sent by the virtual machine corresponding to the arbitrary processing unit is determined; based on the weight value, the task request sent by the virtual machine corresponding to the arbitrary processing unit is determined.
- the any processing unit sequentially processes each task request in the task queue according to the window processing time, including: responding to Within the time window, for each task request in the task queue, if the task request is not processed within the corresponding window processing time, the processing process of the task request is interrupted, and the task request is added to the tail of the task queue .
- the method further includes: based on the mapping relationship, the main control unit sends the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
- the mapping relationship is stored in a memory of the SoC.
- the embodiment of the present disclosure provides a system on chip, including: a main control unit and at least one processing unit; a storage unit storing a pre-established mapping relationship between a virtual machine and each processing unit; wherein, the The main control unit is configured to obtain task requests sent by each virtual machine, and based on the mapping relationship, distribute each task request to a corresponding processing unit for processing according to the virtual machine identifier included in the task request.
- system-on-a-chip in the implementation of the present disclosure further includes: a second communication module, configured to establish a communicable connection with the first communication module of the host computer, and the main control unit obtains the The task request.
- the main control unit is configured to: for the any one of the virtual machines The task request sent by the virtual machine is distributed to the processing unit corresponding to any one of the virtual machines for processing.
- the main control unit is configured to: A task request sent by a virtual machine is split and processed to obtain multiple subtasks; the number of the multiple subtasks is less than or equal to the number of processing units corresponding to any one of the virtual machines; The subtasks are distributed to one or more processing units in the processing units corresponding to any one virtual machine for processing.
- the main control unit is configured to: acquire the A task request sent by a virtual machine corresponding to a processing unit; according to the priority of the virtual machine corresponding to any one processing unit, for the task request sent by the virtual machine corresponding to any one processing unit, determine the processing corresponding to the task request Time: according to the processing time, the any one processing unit sequentially processes each task request sent by the virtual machine corresponding to the any one processing unit.
- the main control unit is configured to: determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units according to the preset priority of each virtual machine; The weight value is used to determine the window processing time of each task request sent by the virtual machine corresponding to the arbitrary processing unit in the current time window; each task sent by the at least two virtual machines corresponding to the arbitrary processing unit The request is distributed to the task queue for queuing; within the current time window, any one of the processing units sequentially processes each task request in the task queue according to the window processing time.
- the main control unit is configured to: in response to each task request in the task queue within the current time window, the task request has not been processed within the corresponding window processing time, The processing process of the task request is interrupted, and the task request is added to the tail of the task queue.
- the main control unit is configured to: based on the mapping relationship, send the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
- an embodiment of the present disclosure provides a virtual machine task processing device, including: a host machine including at least one pre-established virtual machine; and the system-on-chip according to any embodiment of the second aspect, and the The host computer can communicate with each other.
- the embodiments of the present disclosure provide a storage medium storing computer-readable instructions, the computer-readable instructions are used to cause a computer to execute the method according to any embodiment of the first aspect.
- an embodiment of the present disclosure provides a computer program product, including a computer program stored in a memory, and when the computer program instructions are executed by a processor, the method described in any one of the embodiments of the first aspect is implemented.
- the virtual machine task processing method of the embodiment of the present disclosure includes obtaining the task request sent by each virtual machine, the task request includes the corresponding virtual machine identifier, and based on the pre-established mapping relationship between the virtual machine and each processing unit of the system-on-chip, the on-chip
- the main control unit of the system distributes each task request to the corresponding processing unit for processing according to the virtual machine identifier.
- the system on chip schedules and distributes tasks based on the mapping relationship between the virtual machine and the hardware resources, realizes the virtualization of the system on chip, reduces virtualization cost and improves the performance of the virtual machine.
- Fig. 1 is a schematic structural diagram of a system on a chip according to some embodiments of the present disclosure.
- Fig. 2 is a schematic diagram of a virtual machine task processing method according to some implementations of the present disclosure.
- Fig. 3 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
- Fig. 4 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
- Fig. 5 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
- Fig. 6 is a flowchart of a method for processing a virtual machine task according to some implementations of the present disclosure.
- Virtualization is the foundation of cloud computing. Virtualization refers to the division of physical resources into multiple logical partitions on the physical machine server through virtualization management software. The data resources of each partition are isolated from each other and become independent virtual machines.
- the virtualization technology mainly includes software virtualization and hardware-assisted virtualization.
- Software virtualization refers to the interception and simulation of access to physical resources on a physical machine through software methods.
- a common software virtual machine such as QEMU, uses software to simulate the addressing, decoding and execution of the physical platform processor, and the instructions of the client (Guest) are not directly executed on the physical machine platform. Because the software virtualization method has no hardware support, all instructions are simulated by software, so the performance is often relatively poor, and only relatively simple processing tasks can be performed.
- Hardware-assisted virtualization means that the physical machine platform itself provides hardware support for the interception and redirection of special instructions, and even the hardware itself provides additional physical resources to assist software in virtualizing key hardware resources. It can be understood that since the hardware itself provides resource support for virtualization, hardware-assisted virtualization has better performance. However, when implementing virtualization, it is necessary to perform special adaptation on hardware resources in advance to support the virtualization of physical resources, that is, it is necessary to improve the hardware itself, which increases the cost of virtualization.
- SoC System on Chip, system on chip
- GPU graphics processing unit, graphics processor
- SoC also called system on chip.
- SoC often includes a main control unit and multiple processing subsystems.
- the host cannot directly control the processing subsystems in the SoC, so it is impossible to directly virtualize the physical resources of these processing subsystems. Segmentation makes it impossible to leverage existing SoCs for hardware-assisted virtualization.
- embodiments of the present disclosure provide a virtual machine task processing method, device, SoC chip, and storage medium.
- the embodiment of the present disclosure aims to realize virtualization without hardware adaptation of the SoC, and improve the performance of the virtual machine.
- Embodiments of the present disclosure provide a virtual machine task processing method, which can be applied to a system on chip (hereinafter collectively referred to as "SoC").
- SoC system on chip
- FIG. 1 shows the basic structure of SoC.
- a common SoC includes a main control unit 110 and a plurality of processing units 120 .
- the main control unit 110 may be, for example, a CPU (central processing unit, central processing unit).
- Multiple processing units 120 are hardware subsystems (Subsys) of the SoC, and are used to complete task processing.
- the host can only communicate with the processing unit 120 through the main control unit 110 , and cannot directly control each processing unit 120 . Therefore, the Host side cannot directly virtualize the processing unit 120 of the SoC.
- FIG. 2 shows a functional block diagram for implementing virtualization in an embodiment of the present disclosure, which will be described below with reference to FIG. 2 .
- the SoC 100 establishes a communicable connection with the host host 200 through the communication bus 300.
- the host machine 200 is provided with a first communication module 210
- the main control unit 110 of the SoC 100 is integrated with a second communication module 111
- the first communication module 210 and the second communication module 111 establish a communication bus 300 through the communication bus 300. communication connection.
- the first communication module 210 and the second communication module 111 may adopt an inter-core communication manner and use a self-defined communication protocol for communication.
- the communication bus 300 is a PCIe bus
- the corresponding first communication module 210 and the second communication module 111 are also communication modules of the PCIe communication protocol.
- the form of communication between the host machine 200 and the SoC 100 is not limited to PCIe, and can also be any other form suitable for implementation, such as USB, eth-net, etc., which is not limited in the present disclosure.
- FIG. 2 only shows an example in which only one SoC 100 is mounted on the host computer 200. In other embodiments, multiple SoCs can also be mounted on the host computer 200 according to specific requirements. The principle As such, the present disclosure is not limited thereto.
- the host machine 200 can create multiple virtual machines 220 through virtualization management software (VMM), such as VMO, VM1, VM2, . . . , VMn.
- VMM virtualization management software
- each virtual machine 220 can run an independent operating system, and various applications can also be installed on the upper layer of each virtual machine, so that the client (Guest) can directly use the services corresponding to the applications.
- client Guest
- Those skilled in the art can understand and implement this, and the present disclosure will not repeat it.
- a relationship between each virtual machine 220 and the processing unit 120 is established.
- the mapping relationship among them can be stored in the memory of the SoC 100 (not shown in FIG. 2 ), so as to be called and maintained by the main control unit 110.
- the main control unit 110 of the SoC 100 receives the task request, it can determine the processing unit corresponding to the virtual machine sending the task request based on the mapping relationship, and then send the task request to the corresponding processing unit for processing.
- FIG. 3 shows some implementations of the method for processing virtual machine tasks of the present disclosure, which will be described below in conjunction with FIG. 3 .
- the method for processing a virtual machine task in the example of the present disclosure includes step S310 to step S320 .
- the virtual machine 220 when the client end uses the services provided by the virtual machine 220, the virtual machine 220 can send the corresponding information to the SoC 100 through the first communication module 210 using the communication bus 300 as a medium. task request, so that the main control unit 110 of the SoC 100 can obtain the task request sent by each virtual machine through the second communication module 111.
- the task request includes relevant data about executing the task and a virtual machine identifier, and the virtual machine identifier is used to uniquely point to the ID of the virtual machine sending the task request.
- the main control unit of the SoC distributes each task request to the corresponding processing unit for processing according to the virtual machine identifier.
- mapping relationship between the virtual machine 220 and each processing unit 120 of the SoC 100 needs to be established in advance.
- the mapping relationship between the virtual machine 220 and the processing unit 120 can be set based on the user's scenario requirements, purchase conditions, and the like. And after the mapping relationship is set, the mapping relationship can also be adjusted at any time according to the usage requirements and purchase conditions of subsequent users, which will not be described in this disclosure.
- the mapping relationship between the virtual machine 220 and the processing unit 120 can be mainly divided into one-to-one mapping, one-to-many mapping and many-to-one mapping.
- Each virtual machine 220 corresponds to a processing unit in the SoC 100.
- virtual machine VM0 corresponds to processing unit 1200 (hardware subsystem 0)
- virtual machine VM1 corresponds to processing unit 1201 (hardware subsystem 1).
- the virtual machine VMn corresponds to the processing unit 120n (hardware subsystem n).
- Each virtual machine 220 corresponds to at least two processing units in SoC 100.
- the virtual machine VM0 corresponds to the processing unit 1200 (hardware subsystem 0), the processing unit 1201 (hardware subsystem 1) and the processing unit 1202 (hardware subsystem 2).
- Other numbers of one-to-many mappings are also possible, and are not limited to this example.
- Multiple (at least two) virtual machines 220 correspond to one processing unit in SoC 100.
- the virtual machine VM0 and the virtual machine VM1 jointly correspond to the processing unit 1200 (hardware subsystem 0).
- the processing unit 1200 hardware subsystem 0
- other numbers of many-to-one mappings are also possible, and are not limited to this example.
- a corresponding relationship between each virtual machine 220 and the processing unit 120 may be established.
- the main control unit 110 of the SoC 100 receives the task request, it can determine the processing unit corresponding to the virtual machine sending the task request according to the virtual machine identifier in the task request and based on the mapping relationship established above. Furthermore, the main control unit 110 can distribute the task request to one or more corresponding processing units through a preset scheduling and distribution algorithm for processing.
- the main control unit of the SoC is used to implement scheduling and distribution of tasks based on the mapping relationship, and the virtualization of the system on chip is realized by combining software with hardware.
- the embodiment of the present disclosure has higher performance due to the use of hardware-assisted virtualization.
- the embodiment of the present disclosure does not require special adaptation of hardware resources, and virtualization can be realized by using a general-purpose SoC, thereby reducing virtualization costs.
- the virtual machine task processing method of the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, realizing the SoC. Virtualization reduces virtualization costs and improves virtual machine performance.
- the above mapping relationship may be stored and maintained by the host side and the SoC side together, that is, the host side and the SoC side adopt the same mapping relationship.
- the host machine 200 can update the original mapping relationship based on the user's purchase request, and at the same time pass the updated mapping relationship through the first communication module 210 using the communication bus 300 as a medium send to SoC 100, so that SoC 100 updates the original mapping relationship according to the received new mapping relationship.
- the mapping relationship between the virtual machine 220 and the mapping relationship processing unit 120 includes various situations.
- the task processing method of the present disclosure will be described below based on the foregoing three situations respectively.
- the virtual machine VM0 corresponds to the processing unit 1200 (hardware subsystem 0 ) in the SoC in the mapping relationship.
- the virtual machine VMO When the user uses the service of the virtual machine VMO through the client (Guest), the virtual machine VMO sends a task request to the SoC 100 through the first communication module 210 using the communication bus 300 as a communication medium.
- the task request carries the identifier of the virtual machine sending the task request, for example, the identifier of the virtual machine is VMO.
- the SoC 100 After receiving the task request through the second communication module 111, the SoC 100 invokes the pre-stored mapping relationship according to the virtual machine identifier VM0 carried in the task request, and determines that the hardware subsystem corresponding to the virtual machine V0 is the hardware subsystem 0. Then the main control unit 110 can distribute the task corresponding to the task request to the hardware subsystem 0 for processing.
- VMO One-to-many mapping.
- the virtual machine VMO corresponds to hardware subsystem 0 , hardware subsystem 1 and hardware subsystem 2 in the SoC in a mapping relationship.
- the virtual machine VMO When the user uses the service of the virtual machine VMO through the client (Guest), the virtual machine VMO sends a task request to the SoC 100 through the first communication module 210 using the communication bus 300 as a communication medium.
- the task request carries the identifier of the virtual machine sending the task request, for example, the identifier of the virtual machine is VMO.
- the SoC 100 After receiving the task request through the second communication module 111, the SoC 100 invokes the pre-stored mapping relationship according to the virtual machine identifier VM0 carried in the task request, and determines that the hardware subsystem corresponding to the virtual machine V0 is the hardware subsystem 0, Hardware Subsystem 1 and Hardware Subsystem 2.
- the main control unit 110 may split and process the task requested by the task, so as to obtain three subtasks. Then the three subtasks are respectively distributed to three processing units of hardware subsystem 0, hardware subsystem 1 and hardware subsystem 2 for processing. After each processing unit finishes processing the subtasks, the main control unit 110 obtains the final task processing results according to the processing results of the three subtasks.
- the main control unit 110 receives the task request sent by the virtual machine VM0, parses to obtain the task data included in the task request, and then divides the task data based on the number of processing units 120 corresponding to the virtual machine VM0 to obtain Three subtasks are divided, and the three subtasks are respectively sent to three processing units of hardware subsystem 0, hardware subsystem 1 and hardware subsystem 2 for processing. After each processing unit processes the subtasks, the corresponding processing results can be obtained. For example, hardware subsystem 0 obtains the first result data after processing the subtasks, and hardware subsystem 1 obtains the second result data after processing the subtasks. Subsystem 2 obtains third result data after processing the subtasks.
- the main control unit 110 then fuses the first result data, the second result data and the third result data to obtain a task processing result corresponding to the task request.
- the main control unit 110 may split and process the task requested by the task, so as to obtain 2 subtasks. Then distribute these two subtasks to at least one processing unit in hardware subsystem 0, hardware subsystem 1, and hardware subsystem 2 for processing, for example, distribute these two subtasks to hardware subsystem 0, hardware subsystem respectively 1. These two processing units perform processing. After the two processing units process the subtasks, the main control unit 110 obtains the final task processing result according to the processing results of the two subtasks. Therefore, in one-to-many mapping, the number of multiple subtasks is less than or equal to the number of processing units corresponding to one virtual machine.
- mapping relationship the virtual machines VM0 and VM1 both correspond to the hardware subsystem 0 in the SoC.
- the main control unit 110 when only one of the virtual machines VM0 and VM1 sends a task request, the main control unit 110 distributes the task request to the hardware subsystem 0 for processing based on a process similar to one-to-one mapping. I won't repeat it publicly.
- the main control unit 110 can determine the processing time corresponding to each task request according to the priority, so as to distribute and process multiple task requests, as shown below in conjunction with FIG. 4 Embodiments will be described.
- the process of distributing and processing multiple task requests includes S410 to S430.
- the main control unit acquires the task request sent by the virtual machine corresponding to the processing unit.
- both the virtual machines VM0 and VM1 in the mapping relationship correspond to the hardware subsystem 0 in the SoC.
- the main control unit 110 may receive the task requests sent by the virtual machines VM0 and VM1.
- the priority of the virtual machine indicates the priority of processing the task request sent by each virtual machine. Different virtual machines have their own priorities, and the priorities can be preset based on the use requirements and purchase conditions of the client machines corresponding to the virtual machines. For example, in the above example, the priority of the virtual machine VM0 is P1, and the priority of the virtual machine VM1 is P2.
- the processing time indicates the resource occupation of the processing unit by the task request.
- the higher the priority of the virtual machine the longer the resource occupation time of the task request on the processing unit is, that is, the corresponding processing time within a time window is longer.
- the processing time of each task request can be obtained according to the priority of each virtual machine, so that the processing unit can process the task request according to the processing time.
- the processing unit can process the task request according to the processing time.
- the processing unit sequentially processes each task request sent by the virtual machine corresponding to the processing unit.
- the main control unit may distribute each task request to a task queue for queuing.
- the processing unit may sequentially retrieve a task request at the head of the queue from the task queue, and process the task request according to the processing time corresponding to the task request.
- time is divided into consecutive time windows at equal intervals in the time domain. For example, in an example, every 100 ms may be used as a time window. Within a time window, multiple task requests are processed sequentially, but the processing time corresponding to each task request is not necessarily the same, but is determined based on priority.
- the process of determining the processing time corresponding to each task request includes S510 to S520.
- the virtual machines VM0 and VM1 in the mapping relationship correspond to the processing unit 1200 (hardware subsystem 0) in the SoC, and the main control unit 110 simultaneously receives the information sent by the virtual machines VM0 and VM1. task request.
- Each virtual machine is preset with its own priority, for example, the priority of the virtual machine VM0 is P1, and the priority of the virtual machine VM1 is P2.
- the processing time of each task request within the current time window can be determined according to the total duration of the time window.
- the main control unit 110 can sequentially distribute each task request to the task queue for queuing, and wait for the processing unit to call and complete the processing.
- the processing unit sequentially processes each task request in the task queue according to the window processing time.
- the main control unit 110 sequentially distributes each task request to the task queue for queuing, and the processing unit 120 sequentially calls the tasks queued in the task queue.
- the task request at the head of the team is processed according to the processing time corresponding to the task request.
- the task request of the virtual machine VM0 and the task request of the virtual machine VM1 are arranged in sequence in the task queue.
- the hardware subsystem 0 may first call the task request processing s1 duration of the virtual machine VM0, and then call the task request processing s2 duration of the virtual machine VM1.
- the hardware subsystem 0 first calls the task request of the virtual machine VM0 to process the s1 duration, but the task request has not been processed, and at this time it is necessary to interrupt the task request of the virtual machine VM0 The processing process starts to enter the task request processing process of the virtual machine VM1.
- the task request of the interrupted virtual machine VM0 re-enters the queue at the end of the task queue and waits for the next time window.
- the hardware subsystem 0 calls the task request again to continue processing. For example, in the current time window s, the hardware subsystem 0 first calls the task request of the virtual machine VM0 to process s1 and then interrupts, adds the task request of the virtual machine VM0 to the tail of the task queue for queuing, and then calls the virtual machine VM1 The task request is interrupted after processing s2 and enters the next time window.
- the hardware subsystem 0 adds the task request of the virtual machine VM1 to the end of the task queue to continue queuing, and at the same time calls the task request of the virtual machine VM0 again for processing. This cycle is executed until the task request processing is completed.
- the processing duration of each task request in the current time window is also Dynamic adjustment can be made according to the actual processing time of each task request in the previous time window.
- the total duration of T1 is 100ms
- the task processing time of the virtual machine VM0 is 30ms
- the task processing time of the virtual machine VM1 is 70ms.
- the actual task processing time of the virtual machine VM0 takes up 30ms, but the actual task processing time of the virtual machine VM1 only uses 50ms. Therefore, within 100 ms of the next time window T2, the task processing time of the virtual machine VM0 can be adjusted from 30 ms to 50 ms, and the task processing time of the virtual machine VM1 can be adjusted from 70 ms to 50 ms. That is, the processing duration of each task request in each time window can be dynamically fine-tuned based on the task processing situation in the previous time window. Those skilled in the art can understand this, which is not repeated in the present disclosure.
- the task request can be processed based on the priority of the virtual machines, so that physical resources can be allocated reasonably, and the processing speed can be improved. task processing efficiency.
- FIG. 6 shows some implementations of the task processing method of the present disclosure, and the method of the present disclosure will be further described below with reference to FIG. 6 .
- the task processing method of the virtual machine in the example of the present disclosure includes S610 to S640.
- the administrator can pre-allocate physical resources for each virtual machine based on the scenario requirements of each virtual machine user, purchase payment situation, etc., that is, establish each virtual machine and each processing unit mapping relationship between them.
- a larger number of processing units may be set for the virtual machine in the mapping relationship.
- one processing unit can be set for the virtual machine in the mapping relationship, or multiple virtual machines correspond to the same processing unit.
- the main control unit of the SoC obtains the task request sent by each virtual machine on the host machine side.
- each virtual machine when a user uses the services provided by each virtual machine on the host computer side, each virtual machine sends a task to the SoC 100 through the first communication module 210 using the communication bus 300 as a medium. ask.
- the main control unit 110 of the SoC 100 can receive each task request through the second communication module 111.
- the main control unit of the system on chip distributes each task request to a corresponding processing unit for processing according to the virtual machine identifier in the task request.
- the process of scheduling and distributing task requests by the main control unit 110 can be referred to the above implementation manners, which will not be repeated here.
- the main control unit Based on the mapping relationship, the main control unit sends the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
- the processing unit 120 feeds back the processing result corresponding to the task request to the main control unit 110, and then the main control unit 110 sends the processing result to the communication bus through the second communication module 11 300 is sending the media to the host, the host receives the processing result, and based on the above mapping relationship, sends the processing result to the corresponding virtual machine, so that the client (Guest) using the virtual machine can receive the processing result.
- the virtual machine task processing method of the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, realizing the SoC. Virtualization reduces virtualization costs and improves virtual machine performance.
- Embodiments of the present disclosure provide a system-on-chip.
- the system-on-chip of the disclosed example may include: a main control unit and at least one processing unit; a storage unit storing a relationship between a pre-established virtual machine and each processing unit The mapping relationship among them; wherein, the main control unit is configured to obtain the task requests sent by each virtual machine, and based on the mapping relationship, distribute each task request to the corresponding processing unit for processing according to the virtual machine identifier included in the task request.
- the system-on-a-chip of the example of the present disclosure may be shown as SoC 100 in FIG. 1 , including a main control unit 110 and a plurality of processing units 120.
- the SoC 100 also includes a storage unit for storing the pre-established mapping relationship between the virtual machine and each processing unit in the above implementation manner.
- the mapping relationship between the virtual machine and the hardware resource is established, and the main control unit of the SoC is used to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization. Improve virtual machine performance.
- system-on-a-chip of the embodiment of the present disclosure further includes: a second communication module, configured to establish a communicable connection with the first communication module of the host computer, and the main control unit obtains the task request through the second communication module.
- the main control unit is configured to: send to any one of the virtual machines The task request is distributed to the processing unit corresponding to any virtual machine for processing.
- the main control unit is configured to: for any one of the virtual machines The task request sent by the virtual machine, the main control unit splits and processes the task corresponding to the task request to obtain multiple subtasks; the number of multiple subtasks is less than or equal to the number of processing units corresponding to any virtual machine; the main control unit divides each The subtasks are distributed to one or more processing units in the processing units corresponding to any virtual machine for processing.
- the main control unit is configured to: obtain the any one processing A task request sent by the virtual machine corresponding to the unit; according to the priority of the virtual machine corresponding to the any one processing unit, for the task request sent by the virtual machine corresponding to the any one processing unit, determine the processing time corresponding to the task request; According to the processing time, any one of the processing units sequentially processes each task request sent by the virtual machine corresponding to the any one of the processing units.
- the main control unit is configured to: determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units according to the preset priority of each virtual machine; based on the weight value, Determining the window processing time of each task request sent by the virtual machine corresponding to any one processing unit within the current time window; distributing the task requests sent by the at least two virtual machines corresponding to any one processing unit to tasks Queue queuing; within the current time window, any processing unit sequentially processes each task request in the task queue according to the window processing time.
- the main control unit is configured to: in response to each task request in the task queue within the current time window, the task request is not processed within the corresponding window processing time, interrupt the task request processing process, and add the task request to the tail of the task queue.
- the main control unit is configured to: based on the mapping relationship, send the processing result corresponding to the task request to the virtual machine corresponding to the task request.
- the system on chip in the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization And improve virtual machine performance.
- the embodiment of the present disclosure provides a virtual machine task processing device, including: a host machine including at least one pre-established virtual machine; and a system-on-chip, communicably connected to the host machine.
- the virtual machine task processing device of the example of the present disclosure may be shown in FIG. 2 , including a host machine 200 and a system-on-chip 100.
- the host machine 200 is pre-established with multiple virtual machines 220, and the multiple virtual machines 220 can be configured by
- the first communication module 210 establishes a communication connection with the SoC 100 .
- the embodiments of the present disclosure provide a storage medium storing computer-readable instructions, the computer-readable instructions are used to cause a computer to execute the virtual machine task processing method according to any one of the above-mentioned embodiments.
- the mapping relationship between the virtual machine and the hardware resource is established, and the main control unit of the SoC is used to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization. Improve virtual machine performance.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Multi Processors (AREA)
- Computer And Data Communications (AREA)
- Stored Programmes (AREA)
Abstract
Provided is a virtual machine task processing method, which is applied to a system on chip. The task processing method comprises: acquiring task requests sent by virtual machines (S310), wherein for each task request, the task request comprises a corresponding virtual machine identifier; and on the basis of a pre-established mapping relationship between the virtual machines and processing units of the system on chip, a main control unit of the system on chip distributing, according to the virtual machine identifiers, the task requests to the corresponding processing units for processing (S320).
Description
相关申请交叉引用Related Application Cross Reference
本申请主张申请号为202111155033.X、申请日为2021年9月29日的中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application claims the priority of the Chinese patent application with the application number 202111155033.X and the filing date of September 29, 2021. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
本公开涉及计算机技术领域,具体涉及一种片上系统、虚拟机任务处理方法及设备、存储介质。The present disclosure relates to the field of computer technology, and in particular to a system on chip, a virtual machine task processing method and device, and a storage medium.
虚拟化是指在物理机服务器上,通过虚拟化管理软件将物理资源分割为多个逻辑分区,每个分区的数据资源相互隔离,成为独立的虚拟机。目前,虚拟化技术主要包括软件虚拟化以及硬件辅助虚拟化,但是,软件虚拟化方案性能较差,硬件辅助虚拟化方案需要对硬件预先进行适配,成本较高。Virtualization refers to the division of physical resources into multiple logical partitions through virtualization management software on a physical machine server. The data resources of each partition are isolated from each other and become independent virtual machines. At present, virtualization technologies mainly include software virtualization and hardware-assisted virtualization. However, the performance of software virtualization solutions is poor, and the hardware-assisted virtualization solutions require pre-adaptation of hardware, and the cost is relatively high.
发明内容Contents of the invention
第一方面,本公开实施方式提供了一种虚拟机任务处理方法,应用于片上系统,所述任务处理方法包括:获取各个虚拟机发送的任务请求,其中,针对每个所述任务请求,该任务请求包括对应的虚拟机标识;基于预先建立的所述虚拟机与片上系统的各个处理单元之间的映射关系,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理。In a first aspect, the embodiment of the present disclosure provides a virtual machine task processing method, which is applied to a system-on-chip. The task processing method includes: acquiring task requests sent by each virtual machine, wherein, for each task request, the The task request includes a corresponding virtual machine identifier; based on the pre-established mapping relationship between the virtual machine and each processing unit of the system-on-chip, the main control unit of the system-on-chip sends each of the task requests according to the virtual machine identifier Distributed to the corresponding processing unit for processing.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中一个处理单元,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:针对所述任意一个虚拟机发送的任务请求,所述主控单元将该任务请求分发至所述任意一个虚拟机对应的所述处理单元进行处理。In some implementations, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to one of the processing units, the main control unit of the system-on-chip will Each of the task requests is distributed to the corresponding processing unit for processing, including: for the task request sent by any one of the virtual machines, the main control unit distributes the task request to the processing unit corresponding to the any one of the virtual machines unit is processed.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中至少两个处理单元,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:针对所述任意一个虚拟机发送的任务请求,所述主控单元对该任务请求对应的任务进行拆分处理,得到多个子 任务;所述多个子任务的数量小于或等于所述任意一个虚拟机对应的处理单元的数量;所述主控单元将各个子任务分发至所述任意一个虚拟机对应的处理单元中的一个或多个处理单元进行处理。In some embodiments, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to at least two processing units in the processing units, the main control unit of the system-on-chip Identifying and distributing each task request to a corresponding processing unit for processing includes: for the task request sent by any one of the virtual machines, the main control unit splits and processes the task corresponding to the task request to obtain multiple sub- task; the number of the plurality of subtasks is less than or equal to the number of processing units corresponding to any one virtual machine; the main control unit distributes each subtask to one or more of the processing units corresponding to any one virtual machine Multiple processing units perform processing.
在一些实施方式中,对于所述处理单元中任意一个处理单元,响应于所述任意一个处理单元对应所述虚拟机中至少两个虚拟机,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:所述主控单元获取所述任意一个处理单元对应的虚拟机发送的任务请求;根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理。In some implementations, for any one of the processing units, in response to the fact that the any one processing unit corresponds to at least two virtual machines in the virtual machines, the main control unit of the system on chip according to the virtual machine Identifying and distributing each task request to a corresponding processing unit for processing includes: the main control unit obtaining a task request sent by a virtual machine corresponding to any one processing unit; according to the virtual machine corresponding to any one processing unit Priority, for the task request sent by the virtual machine corresponding to any one of the processing units, determine the processing time corresponding to the task request; according to the processing time, the any processing unit corresponds to the any one processing unit Each task request sent by the virtual machine is processed.
在一些实施方式中,根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间,包括:根据预先设置的每个虚拟机的优先级,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求对应的权重值;基于所述权重值,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的窗口处理时间;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理,包括:将所述任意一个处理单元对应的虚拟机发送的各个任务请求分发至任务队列排队;在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理。In some implementations, according to the priority of the virtual machine corresponding to any one of the processing units, for the task request sent by the virtual machine corresponding to any one of the processing units, determining the processing time corresponding to the task request includes: The priority of each virtual machine is set, and the weight value corresponding to each task request sent by the virtual machine corresponding to the arbitrary processing unit is determined; based on the weight value, the task request sent by the virtual machine corresponding to the arbitrary processing unit is determined. The window processing time of each task request within the current time window; according to the processing time, the any processing unit sequentially processes each task request sent by the virtual machine corresponding to the any processing unit, including: Each task request sent by the virtual machine corresponding to any processing unit is distributed to the task queue for queuing; within the current time window, the any processing unit sequentially requests each task in the task queue according to the window processing time to process.
在一些实施方式中,所述在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理,包括:响应于在所述当前时间窗口内,针对所述任务队列中的各个任务请求,该任务请求在对应的窗口处理时间内未处理完成,中断该任务请求的处理进程,并将该任务请求加入所述任务队列的队尾。In some implementations, within the current time window, the any processing unit sequentially processes each task request in the task queue according to the window processing time, including: responding to Within the time window, for each task request in the task queue, if the task request is not processed within the corresponding window processing time, the processing process of the task request is interrupted, and the task request is added to the tail of the task queue .
在一些实施方式中,所述方法还包括:基于所述映射关系,所述主控单元将所述任务请求对应的处理结果,发送至所述任务请求分别对应的虚拟机。In some implementation manners, the method further includes: based on the mapping relationship, the main control unit sends the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
在一些实施方式中,所述映射关系存储于所述片上系统的存储器中。In some implementations, the mapping relationship is stored in a memory of the SoC.
第二方面,本公开实施方式提供了一种片上系统,包括:主控单元和至少一个处理单元;存储单元,存储有预先建立的虚拟机与各处理单元之间的映射关系;其中,所述 主控单元被配置为获取各个虚拟机发送的任务请求,并基于所述映射关系,根据所述任务请求包括的虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理。In the second aspect, the embodiment of the present disclosure provides a system on chip, including: a main control unit and at least one processing unit; a storage unit storing a pre-established mapping relationship between a virtual machine and each processing unit; wherein, the The main control unit is configured to obtain task requests sent by each virtual machine, and based on the mapping relationship, distribute each task request to a corresponding processing unit for processing according to the virtual machine identifier included in the task request.
在一些实施方式中,本公开实施方式的片上系统,还包括:第二通信模块,用于与宿主机的第一通信模块建立可通信连接,所述主控单元通过所述第二通信模块获取所述任务请求。In some implementations, the system-on-a-chip in the implementation of the present disclosure further includes: a second communication module, configured to establish a communicable connection with the first communication module of the host computer, and the main control unit obtains the The task request.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中一个处理单元,所述主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,将该任务请求分发至所述任意一个虚拟机对应的所述处理单元进行处理。In some implementations, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to one of the processing units, the main control unit is configured to: for the any one of the virtual machines The task request sent by the virtual machine is distributed to the processing unit corresponding to any one of the virtual machines for processing.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中至少两个处理单元,所述主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,对该任务请求对应的任务进行拆分处理,得到多个子任务;所述多个子任务的数量小于或等于所述任意一个虚拟机对应的处理单元的数量;将各个子任务分发至所述任意一个虚拟机对应的处理单元中的一个或多个处理单元进行处理。In some implementations, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to at least two of the processing units, the main control unit is configured to: A task request sent by a virtual machine is split and processed to obtain multiple subtasks; the number of the multiple subtasks is less than or equal to the number of processing units corresponding to any one of the virtual machines; The subtasks are distributed to one or more processing units in the processing units corresponding to any one virtual machine for processing.
在一些实施方式中,对于所述处理单元中任意一个处理单元,响应于所述任意一个处理单元对应所述虚拟机中至少两个虚拟机,所述主控单元被配置为:获取所述任意一个处理单元对应的虚拟机发送的任务请求;根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理。In some implementations, for any one of the processing units, in response to the fact that the any one processing unit corresponds to at least two virtual machines in the virtual machines, the main control unit is configured to: acquire the A task request sent by a virtual machine corresponding to a processing unit; according to the priority of the virtual machine corresponding to any one processing unit, for the task request sent by the virtual machine corresponding to any one processing unit, determine the processing corresponding to the task request Time: according to the processing time, the any one processing unit sequentially processes each task request sent by the virtual machine corresponding to the any one processing unit.
在一些实施方式中,所述主控单元被配置为:根据预先设置的每个虚拟机的优先级,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求对应的权重值;基于所述权重值,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的窗口处理时间;将所述任意一个处理单元对应的所述至少两个虚拟机发送的各个任务请求分发至任务队列排队;在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理。In some implementations, the main control unit is configured to: determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units according to the preset priority of each virtual machine; The weight value is used to determine the window processing time of each task request sent by the virtual machine corresponding to the arbitrary processing unit in the current time window; each task sent by the at least two virtual machines corresponding to the arbitrary processing unit The request is distributed to the task queue for queuing; within the current time window, any one of the processing units sequentially processes each task request in the task queue according to the window processing time.
在一些实施方式中,所述主控单元被配置为:响应于在所述当前时间窗口内,针对所述任务队列中的各个任务请求,该任务请求在对应的窗口处理时间内未处理完成,中断该任务请求的处理进程,并将该任务请求加入所述任务队列的队尾。In some implementations, the main control unit is configured to: in response to each task request in the task queue within the current time window, the task request has not been processed within the corresponding window processing time, The processing process of the task request is interrupted, and the task request is added to the tail of the task queue.
在一些实施方式中,所述主控单元被配置为:基于所述映射关系,将所述任务请求对应的处理结果,发送至所述任务请求分别对应的虚拟机。In some implementation manners, the main control unit is configured to: based on the mapping relationship, send the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
第三方面,本公开实施方式提供了一种虚拟机任务处理设备,包括:宿主机,包括预先建立的至少一个虚拟机;和根据第二方面任一实施方式所述的片上系统,与所述宿主机可通信连接。In a third aspect, an embodiment of the present disclosure provides a virtual machine task processing device, including: a host machine including at least one pre-established virtual machine; and the system-on-chip according to any embodiment of the second aspect, and the The host computer can communicate with each other.
第四方面,本公开实施方式提供了一种存储介质,存储有计算机可读指令,所述计算机可读指令用于使计算机执行根据第一方面任一实施方式所述的方法。In a fourth aspect, the embodiments of the present disclosure provide a storage medium storing computer-readable instructions, the computer-readable instructions are used to cause a computer to execute the method according to any embodiment of the first aspect.
第五方面,本公开实施方式提供了一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机程序指令被处理器执行时实现第一方面任一实施方式所述的方法。In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program stored in a memory, and when the computer program instructions are executed by a processor, the method described in any one of the embodiments of the first aspect is implemented.
本公开实施方式的虚拟机任务处理方法,包括获取各个虚拟机发送的任务请求,任务请求包括对应的虚拟机标识,基于预先建立的虚拟机与片上系统的各个处理单元之间的映射关系,片上系统的主控单元根据虚拟机标识将各个任务请求分发至对应的处理单元进行处理。本公开实施方式中,片上系统基于虚拟机与硬件资源之间的映射关系进行任务的调度及分发,实现片上系统的虚拟化,降低虚拟化成本而且提高虚拟机性能。The virtual machine task processing method of the embodiment of the present disclosure includes obtaining the task request sent by each virtual machine, the task request includes the corresponding virtual machine identifier, and based on the pre-established mapping relationship between the virtual machine and each processing unit of the system-on-chip, the on-chip The main control unit of the system distributes each task request to the corresponding processing unit for processing according to the virtual machine identifier. In the embodiments of the present disclosure, the system on chip schedules and distributes tasks based on the mapping relationship between the virtual machine and the hardware resources, realizes the virtualization of the system on chip, reduces virtualization cost and improves the performance of the virtual machine.
为了更清楚地说明本公开具体实施方式中的技术方案,下面将对具体实施方式中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the specific embodiments of the present disclosure, the following will briefly introduce the drawings that need to be used in the specific embodiments. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1是根据本公开一些实施方式中片上系统的结构示意图。Fig. 1 is a schematic structural diagram of a system on a chip according to some embodiments of the present disclosure.
图2是根据本公开一些实施方式中虚拟机任务处理方法的原理图。Fig. 2 is a schematic diagram of a virtual machine task processing method according to some implementations of the present disclosure.
图3是根据本公开一些实施方式中虚拟机任务处理方法的流程图。Fig. 3 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
图4是根据本公开一些实施方式中虚拟机任务处理方法的流程图。Fig. 4 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
图5是根据本公开一些实施方式中虚拟机任务处理方法的流程图。Fig. 5 is a flowchart of a virtual machine task processing method according to some implementations of the present disclosure.
图6是根据本公开一些实施方式中虚拟机任务处理方法的流程图。Fig. 6 is a flowchart of a method for processing a virtual machine task according to some implementations of the present disclosure.
下面将结合附图对本公开的技术方案进行清楚、完整地描述,显然,所描述的实施方式是本公开一部分实施方式,而不是全部的实施方式。基于本公开中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本公开保护的范围。此外,下面所描述的本公开不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。The technical solutions of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described implementations are part of the implementations of the present disclosure, but not all of them. Based on the implementation manners in the present disclosure, all other implementation manners obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure. In addition, the technical features involved in different embodiments of the present disclosure described below may be combined with each other as long as they do not constitute a conflict with each other.
虚拟化是云计算的基础,虚拟化是指在物理机服务器上通过虚拟化管理软件将物理资源分割为多个逻辑分区,每个分区的数据资源相互隔离,成为独立的虚拟机。相关技术中,虚拟化技术主要包括软件虚拟化以及硬件辅助虚拟化。Virtualization is the foundation of cloud computing. Virtualization refers to the division of physical resources into multiple logical partitions on the physical machine server through virtualization management software. The data resources of each partition are isolated from each other and become independent virtual machines. Among the related technologies, the virtualization technology mainly includes software virtualization and hardware-assisted virtualization.
软件虚拟化是指通过软件方法在物理机上实现对物理资源访问的截获和模拟。常见的软件虚拟机例如QEMU,它是通过软件来仿真物理平台处理器的取址、解码和执行,客户机(Guest)的指令并不在物理机平台上直接执行。由于软件虚拟化方法没有硬件支撑,所有指令都是利用软件模拟的,因此性能往往比较差,仅能执行较为简单的处理任务。Software virtualization refers to the interception and simulation of access to physical resources on a physical machine through software methods. A common software virtual machine, such as QEMU, uses software to simulate the addressing, decoding and execution of the physical platform processor, and the instructions of the client (Guest) are not directly executed on the physical machine platform. Because the software virtualization method has no hardware support, all instructions are simulated by software, so the performance is often relatively poor, and only relatively simple processing tasks can be performed.
硬件辅助虚拟化是指物理机平台本身提供了对特殊指令的截获和重定向的硬件支持,甚至硬件本身会提供额外的物理资源来辅助软件实现对关键硬件资源的虚拟化。可以理解,由于硬件本身为虚拟化提供了资源支撑,因此硬件辅助虚拟化具有更好的性能。但是,在实现虚拟化时,需要预先对硬件资源进行特殊适配,使其支持物理资源的虚拟化,也即需要对硬件本身作出改进,提高了虚拟化的成本。Hardware-assisted virtualization means that the physical machine platform itself provides hardware support for the interception and redirection of special instructions, and even the hardware itself provides additional physical resources to assist software in virtualizing key hardware resources. It can be understood that since the hardware itself provides resource support for virtualization, hardware-assisted virtualization has better performance. However, when implementing virtualization, it is necessary to perform special adaptation on hardware resources in advance to support the virtualization of physical resources, that is, it is necessary to improve the hardware itself, which increases the cost of virtualization.
SoC(System on Chip,片上系统)是指具有完整系统集成电路并嵌入软件内容的系统级芯片,目前常见的例如GPU(graphics processing unit,图形处理器)芯片、手机芯片等,都可以称之为SoC,也叫片上系统。SoC (System on Chip, system on chip) refers to a system-level chip with a complete system integrated circuit and embedded software content. Currently, common such as GPU (graphics processing unit, graphics processor) chips, mobile phone chips, etc., can be called SoC, also called system on chip.
SoC往往包括一个主控单元和多个处理子系统,对于虚拟化场景,宿主机(Host)不能直接控制SoC中的处理子系统,因此也就无法直接对这些处理子系统的物理资源进行虚拟化分割,无法利用现有的SoC实现硬件辅助虚拟化。SoC often includes a main control unit and multiple processing subsystems. For virtualization scenarios, the host (Host) cannot directly control the processing subsystems in the SoC, so it is impossible to directly virtualize the physical resources of these processing subsystems. Segmentation makes it impossible to leverage existing SoCs for hardware-assisted virtualization.
相关技术中,需要对SoC进行特殊的适配工作,也即对SoC进行相应的硬件改进,使得宿主机指令可以直接访问到SoC的处理子系统,这无疑增加了虚拟化的成本。In related technologies, it is necessary to perform special adaptation work on the SoC, that is, to perform corresponding hardware improvements on the SoC, so that host instructions can directly access the processing subsystem of the SoC, which undoubtedly increases the cost of virtualization.
基于上述相关技术中存在的缺陷,本公开实施方式提供了一种虚拟机任务处理方法、装置、片上系统芯片以及存储介质。本公开实施方式旨在无需对SoC进行硬件适配的基 础上实现虚拟化,提高虚拟机性能。Based on the defects existing in the above-mentioned related technologies, embodiments of the present disclosure provide a virtual machine task processing method, device, SoC chip, and storage medium. The embodiment of the present disclosure aims to realize virtualization without hardware adaptation of the SoC, and improve the performance of the virtual machine.
本公开实施方式提供了一种虚拟机任务处理方法,该方法可应用于片上系统(以下统一称为“SoC”)。Embodiments of the present disclosure provide a virtual machine task processing method, which can be applied to a system on chip (hereinafter collectively referred to as "SoC").
图1示出了SoC的基础架构,如图1所示,常见的SoC包括主控单元110以及多个处理单元120。主控单元110例如可以是CPU(central processing unit,中央处理单元)。多个处理单元120为SoC的硬件子系统(Subsys),用于完成任务处理。FIG. 1 shows the basic structure of SoC. As shown in FIG. 1 , a common SoC includes a main control unit 110 and a plurality of processing units 120 . The main control unit 110 may be, for example, a CPU (central processing unit, central processing unit). Multiple processing units 120 are hardware subsystems (Subsys) of the SoC, and are used to complete task processing.
基于前述可知,宿主机(Host)端只能通过主控单元110来与处理单元120通信,无法直接控制各个处理单元120。因此,Host端无法直接对SoC的处理单元120进行虚拟化分割。Based on the foregoing, it can be seen that the host (Host) can only communicate with the processing unit 120 through the main control unit 110 , and cannot directly control each processing unit 120 . Therefore, the Host side cannot directly virtualize the processing unit 120 of the SoC.
本公开实施方式中,预先建立宿主机端虚拟机与SoC的处理单元120之间的映射关系,进而通过主控单元110基于该映射关系完成对虚拟机任务的分发及调度,实现对多个处理单元120的虚拟化分割。图2示出了本公开实施方式中实现虚拟化的原理框图,下面结合图2进行说明。In the embodiment of the present disclosure, the mapping relationship between the host-side virtual machine and the processing unit 120 of the SoC is established in advance, and then the main control unit 110 completes the distribution and scheduling of virtual machine tasks based on the mapping relationship, and realizes multiple processing Virtualized partitioning of unit 120 . FIG. 2 shows a functional block diagram for implementing virtualization in an embodiment of the present disclosure, which will be described below with reference to FIG. 2 .
如图2所示,在一些实施方式中,SoC 100与宿主机Host 200通过通信总线300建立可通信连接。在一些实施方式中,宿主机200端设有第一通信模块210,SoC 100的主控单元110集成有第二通信模块111,第一通信模块210和第二通信模块111通过通信总线300建立可通信连接。第一通信模块210和第二通信模块111可采用核间通信方式,使用自定义通信协议进行通信。As shown in FIG. 2, in some implementation manners, the SoC 100 establishes a communicable connection with the host host 200 through the communication bus 300. In some embodiments, the host machine 200 is provided with a first communication module 210, the main control unit 110 of the SoC 100 is integrated with a second communication module 111, and the first communication module 210 and the second communication module 111 establish a communication bus 300 through the communication bus 300. communication connection. The first communication module 210 and the second communication module 111 may adopt an inter-core communication manner and use a self-defined communication protocol for communication.
例如在一个示例中,通信总线300为PCIe总线,对应的第一通信模块210和第二通信模块111也为PCIe通信协议的通信模块。For example, in an example, the communication bus 300 is a PCIe bus, and the corresponding first communication module 210 and the second communication module 111 are also communication modules of the PCIe communication protocol.
本领域技术人员可以理解,宿主机200与SoC 100的通信形式并不局限于PCIe,还可以是其他任何适于实现的形式,例如USB、eth-net等,本公开对此不作限制。Those skilled in the art can understand that the form of communication between the host machine 200 and the SoC 100 is not limited to PCIe, and can also be any other form suitable for implementation, such as USB, eth-net, etc., which is not limited in the present disclosure.
另外,值得说明的是,图2中仅示出了宿主机200上仅挂载一个SoC 100的示例,在其他实施方式中,宿主机200上也可以根据具体需求挂载多个SoC,其原理与之相同,本公开对此不作限制。In addition, it is worth noting that FIG. 2 only shows an example in which only one SoC 100 is mounted on the host computer 200. In other embodiments, multiple SoCs can also be mounted on the host computer 200 according to specific requirements. The principle As such, the present disclosure is not limited thereto.
继续参照图2,宿主机200可以通过虚拟化管理软件(VMM)建立多个虚拟机220,例如VM0、VM1、VM2、……、VMn。在一些实施方式中,每个虚拟机220可以运行独立的操作系统,并且每个虚拟机的上层也可以安装各种应用,以供客户机(Guest)直接使用应用对应的服务。本领域技术人员对此可以理解并实现,本公开不再赘述。Continuing to refer to FIG. 2 , the host machine 200 can create multiple virtual machines 220 through virtualization management software (VMM), such as VMO, VM1, VM2, . . . , VMn. In some implementations, each virtual machine 220 can run an independent operating system, and various applications can also be installed on the upper layer of each virtual machine, so that the client (Guest) can directly use the services corresponding to the applications. Those skilled in the art can understand and implement this, and the present disclosure will not repeat it.
在本公开实施方式中,在实现虚拟化时,并非直接对SoC 100的各个处理单元120进行物理资源分割后分配给每个虚拟机220使用,而是建立每个虚拟机220与处理单元120之间的映射关系,该映射关系可存储于SoC 100的存储器中(图2中未示出),以供主控单元110调用及维护。当SoC 100的主控单元110接收到任务请求时,即可基于该映射关系,确定发送任务请求的虚拟机所对应的处理单元,进而将该任务请求发送至对应的处理单元进行处理。In the embodiment of the present disclosure, when implementing virtualization, instead of directly dividing the physical resources of each processing unit 120 of the SoC 100 and then allocating them to each virtual machine 220, a relationship between each virtual machine 220 and the processing unit 120 is established. The mapping relationship among them can be stored in the memory of the SoC 100 (not shown in FIG. 2 ), so as to be called and maintained by the main control unit 110. When the main control unit 110 of the SoC 100 receives the task request, it can determine the processing unit corresponding to the virtual machine sending the task request based on the mapping relationship, and then send the task request to the corresponding processing unit for processing.
图3示出了本公开虚拟机任务处理方法的一些实施方式,下面结合图3进行说明。FIG. 3 shows some implementations of the method for processing virtual machine tasks of the present disclosure, which will be described below in conjunction with FIG. 3 .
如图3所示,在一些实施方式中,本公开示例的虚拟机任务处理方法包括步骤S310至步骤S320。As shown in FIG. 3 , in some implementation manners, the method for processing a virtual machine task in the example of the present disclosure includes step S310 to step S320 .
S310、获取各个虚拟机发送的任务请求。S310. Obtain a task request sent by each virtual machine.
在一些实施方式中,如图2所示的系统架构,客户机端在使用虚拟机220提供的服务时,虚拟机220可通过第一通信模块210以通信总线300为媒介向SoC 100发送对应的任务请求,从而SoC 100的主控单元110即可通过第二通信模块111获取到各个虚拟机发送的任务请求。In some implementations, with the system architecture shown in FIG. 2 , when the client end uses the services provided by the virtual machine 220, the virtual machine 220 can send the corresponding information to the SoC 100 through the first communication module 210 using the communication bus 300 as a medium. task request, so that the main control unit 110 of the SoC 100 can obtain the task request sent by each virtual machine through the second communication module 111.
任务请求中包括执行任务的相关数据以及虚拟机标识,虚拟机标识用于唯一指向发送该任务请求的虚拟机ID。The task request includes relevant data about executing the task and a virtual machine identifier, and the virtual machine identifier is used to uniquely point to the ID of the virtual machine sending the task request.
S320、基于预先建立的虚拟机与片上系统(SoC)的各个处理单元之间的映射关系,片上系统的主控单元根据虚拟机标识将各个任务请求分发至对应的处理单元进行处理。S320. Based on the pre-established mapping relationship between the virtual machine and each processing unit of the SoC, the main control unit of the SoC distributes each task request to the corresponding processing unit for processing according to the virtual machine identifier.
在一些实施方式中,需要预先建立虚拟机220与SoC 100的各个处理单元120之间的映射关系。In some implementation manners, the mapping relationship between the virtual machine 220 and each processing unit 120 of the SoC 100 needs to be established in advance.
在一些实施方式中,虚拟机220与处理单元120之间的映射关系,可以基于用户的场景需求、购买情况等进行设置。并且在映射关系设置完成之后,也可以根据后续用户的使用需求、购买情况等对映射关系随时进行调整,本公开对此不再赘述。In some implementations, the mapping relationship between the virtual machine 220 and the processing unit 120 can be set based on the user's scenario requirements, purchase conditions, and the like. And after the mapping relationship is set, the mapping relationship can also be adjusted at any time according to the usage requirements and purchase conditions of subsequent users, which will not be described in this disclosure.
对于虚拟机220与处理单元120之间的映射关系,主要可分为一对一映射、一对多映射以及多对一映射。The mapping relationship between the virtual machine 220 and the processing unit 120 can be mainly divided into one-to-one mapping, one-to-many mapping and many-to-one mapping.
1)一对一映射1) One-to-one mapping
每个虚拟机220对应于SoC 100中的一个处理单元,例如图2示例中,虚拟机VM0对应于处理单元1200(硬件子系统0)、虚拟机VM1对应于处理单元1201(硬件子系统 1)、……、虚拟机VMn对应于处理单元120n(硬件子系统n)。Each virtual machine 220 corresponds to a processing unit in the SoC 100. For example, in the example of FIG. 2, virtual machine VM0 corresponds to processing unit 1200 (hardware subsystem 0), and virtual machine VM1 corresponds to processing unit 1201 (hardware subsystem 1). , . . . , the virtual machine VMn corresponds to the processing unit 120n (hardware subsystem n).
2)一对多映射2) One-to-many mapping
每个虚拟机220对应于SoC 100中的至少两个处理单元。例如图2示例中,虚拟机VM0对应于处理单元1200(硬件子系统0)、处理单元1201(硬件子系统1)和处理单元1202(硬件子系统2)。也可以是其他数量的一对多映射,并不局限于本示例。Each virtual machine 220 corresponds to at least two processing units in SoC 100. For example, in the example of FIG. 2 , the virtual machine VM0 corresponds to the processing unit 1200 (hardware subsystem 0), the processing unit 1201 (hardware subsystem 1) and the processing unit 1202 (hardware subsystem 2). Other numbers of one-to-many mappings are also possible, and are not limited to this example.
3)多对一映射3) Many-to-one mapping
多个(至少两个)虚拟机220对应于SoC 100中的一个处理单元。例如图2示例中,虚拟机VM0和虚拟机VM1共同对应于处理单元1200(硬件子系统0)。当然,也可以是其他数量的多对一映射,并不局限于本示例。Multiple (at least two) virtual machines 220 correspond to one processing unit in SoC 100. For example, in the example of FIG. 2 , the virtual machine VM0 and the virtual machine VM1 jointly correspond to the processing unit 1200 (hardware subsystem 0). Of course, other numbers of many-to-one mappings are also possible, and are not limited to this example.
基于上述的映射关系,可以建立每个虚拟机220与处理单元120之间的对应关系。当SoC 100的主控单元110接收到任务请求时,即可根据任务请求中的虚拟机标识,并基于上述建立的映射关系,确定发送该任务请求的虚拟机所对应的处理单元。进而,主控单元110即可通过预置的调度和分发算法将该任务请求分发至对应的一个或多个处理单元中进行处理。Based on the above mapping relationship, a corresponding relationship between each virtual machine 220 and the processing unit 120 may be established. When the main control unit 110 of the SoC 100 receives the task request, it can determine the processing unit corresponding to the virtual machine sending the task request according to the virtual machine identifier in the task request and based on the mapping relationship established above. Furthermore, the main control unit 110 can distribute the task request to one or more corresponding processing units through a preset scheduling and distribution algorithm for processing.
对于主控单元110对各个任务请求进行调度和分发的过程,本公开下述实施方式中进行说明,在此暂不详述。The process of scheduling and distributing each task request by the main control unit 110 will be described in the following embodiments of the present disclosure, and will not be described in detail here.
本公开实施方式中,通过建立虚拟机与硬件资源之间的映射关系,利用SoC的主控单元基于该映射关系实现任务的调度及分发,利用软件结合硬件的方式实现对片上系统的虚拟化。与相关技术中的软件虚拟化方案相比,本公开实施方式由于采用硬件辅助虚拟化,具有更高的性能。而与相关技术中的硬件辅助虚拟化方案相比,本公开实施方式无需对硬件资源进行特殊适配,使用通用SoC即可实现虚拟化,降低虚拟化成本。In the embodiments of the present disclosure, by establishing a mapping relationship between a virtual machine and a hardware resource, the main control unit of the SoC is used to implement scheduling and distribution of tasks based on the mapping relationship, and the virtualization of the system on chip is realized by combining software with hardware. Compared with the software virtualization solution in the related art, the embodiment of the present disclosure has higher performance due to the use of hardware-assisted virtualization. Compared with the hardware-assisted virtualization solution in the related art, the embodiment of the present disclosure does not require special adaptation of hardware resources, and virtualization can be realized by using a general-purpose SoC, thereby reducing virtualization costs.
通过上述可知,本公开实施方式的虚拟机任务处理方法,建立了虚拟机与硬件资源之间的映射关系,利用了SoC的主控单元基于该映射关系进行任务的调度及分发,实现了SoC的虚拟化,降低了虚拟化成本而且提高虚拟机性能。From the above, it can be seen that the virtual machine task processing method of the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, realizing the SoC. Virtualization reduces virtualization costs and improves virtual machine performance.
在一些实施方式中,上述映射关系可由宿主机端和SoC端共同存储和维护,也即宿主机端和SoC端采用同一映射关系。例如,当某个用户付费购买新的硬件资源之后,宿主机200可以基于用户购买请求对原有的映射关系进行更新,同时将更新后的映射关系通过第一通信模块210以通信总线300为媒介发送至SoC 100,从而SoC 100根据接收到的新的映射关系对原有的映射关系进行更新。本领域技术人员对此可以理解,本公开 不再赘述。In some implementation manners, the above mapping relationship may be stored and maintained by the host side and the SoC side together, that is, the host side and the SoC side adopt the same mapping relationship. For example, when a user pays to purchase new hardware resources, the host machine 200 can update the original mapping relationship based on the user's purchase request, and at the same time pass the updated mapping relationship through the first communication module 210 using the communication bus 300 as a medium send to SoC 100, so that SoC 100 updates the original mapping relationship according to the received new mapping relationship. Those skilled in the art can understand this, and the present disclosure will not repeat it here.
基于前述,本公开实施方式中,虚拟机220与映射关系处理单元120的映射关系包括多种情况,下面分别基于前述的三种情况,对本公开任务处理方法进行说明。Based on the foregoing, in the embodiments of the present disclosure, the mapping relationship between the virtual machine 220 and the mapping relationship processing unit 120 includes various situations. The task processing method of the present disclosure will be described below based on the foregoing three situations respectively.
1)一对一映射。如图2所示,在一个示例中,在该映射关系中虚拟机VM0对应SoC中的处理单元1200(硬件子系统0)。1) One-to-one mapping. As shown in FIG. 2 , in an example, the virtual machine VM0 corresponds to the processing unit 1200 (hardware subsystem 0 ) in the SoC in the mapping relationship.
当用户通过客户机(Guest)使用虚拟机VM0的服务时,虚拟机VM0通过第一通信模块210利用通信总线300作为通信媒介,向SoC 100发送任务请求。该任务请求中携带有发送该任务请求的虚拟机标识,例如虚拟机标识为VM0。When the user uses the service of the virtual machine VMO through the client (Guest), the virtual machine VMO sends a task request to the SoC 100 through the first communication module 210 using the communication bus 300 as a communication medium. The task request carries the identifier of the virtual machine sending the task request, for example, the identifier of the virtual machine is VMO.
SoC 100通过第二通信模块111接收到该任务请求后,根据任务请求中携带的虚拟机标识VM0,调用存预先存储的映射关系,确定虚拟机VM0对应的硬件子系统为硬件子系统0。然后主控单元110即可将该任务请求对应的任务分发至硬件子系统0进行处理。After receiving the task request through the second communication module 111, the SoC 100 invokes the pre-stored mapping relationship according to the virtual machine identifier VM0 carried in the task request, and determines that the hardware subsystem corresponding to the virtual machine V0 is the hardware subsystem 0. Then the main control unit 110 can distribute the task corresponding to the task request to the hardware subsystem 0 for processing.
2)一对多映射。如图2所示,一个示例中,在映射关系中虚拟机VM0对应SoC中的硬件子系统0、硬件子系统1以及硬件子系统2。2) One-to-many mapping. As shown in FIG. 2 , in an example, the virtual machine VMO corresponds to hardware subsystem 0 , hardware subsystem 1 and hardware subsystem 2 in the SoC in a mapping relationship.
当用户通过客户机(Guest)使用虚拟机VM0的服务时,虚拟机VM0通过第一通信模块210利用通信总线300作为通信媒介,向SoC 100发送任务请求。该任务请求中携带有发送该任务请求的虚拟机标识,例如虚拟机标识为VM0。When the user uses the service of the virtual machine VMO through the client (Guest), the virtual machine VMO sends a task request to the SoC 100 through the first communication module 210 using the communication bus 300 as a communication medium. The task request carries the identifier of the virtual machine sending the task request, for example, the identifier of the virtual machine is VMO.
SoC 100通过第二通信模块111接收到该任务请求后,根据该任务请求中携带的虚拟机标识VM0,调用存预先存储的映射关系,确定虚拟机VM0对应的硬件子系统为硬件子系统0、硬件子系统1以及硬件子系统2。After receiving the task request through the second communication module 111, the SoC 100 invokes the pre-stored mapping relationship according to the virtual machine identifier VM0 carried in the task request, and determines that the hardware subsystem corresponding to the virtual machine V0 is the hardware subsystem 0, Hardware Subsystem 1 and Hardware Subsystem 2.
由于虚拟机VM0对应3个处理单元,因此为提高任务处理效率,主控单元110可对该任务请求的任务进行拆分处理,从而得到3个子任务。然后将这3个子任务分别分发至硬件子系统0、硬件子系统1以及硬件子系统2三个处理单元进行处理。在每个处理单元对子任务处理完成之后,主控单元110再根据3个子任务的处理结果得到最终的任务处理结果。Since the virtual machine VM0 corresponds to three processing units, in order to improve task processing efficiency, the main control unit 110 may split and process the task requested by the task, so as to obtain three subtasks. Then the three subtasks are respectively distributed to three processing units of hardware subsystem 0, hardware subsystem 1 and hardware subsystem 2 for processing. After each processing unit finishes processing the subtasks, the main control unit 110 obtains the final task processing results according to the processing results of the three subtasks.
在一个示例中,主控单元110接收到虚拟机VM0发送的任务请求,解析得到该任务请求中包括的任务数据,然后基于虚拟机VM0对应的处理单元120的数量将任务数据进行数据分割,得到3个分割后的子任务,并将这3个子任务分别发送至硬件子系统0、硬件子系统1以及硬件子系统2这三个处理单元进行处理。每个处理单元对子任务 进行处理之后,可以得到对应的处理结果,例如硬件子系统0对子任务处理后得到第一结果数据,硬件子系统1对子任务处理后得到第二结果数据,硬件子系统2对子任务处理后得到第三结果数据。主控单元110再对第一结果数据、第二结果数据以及第三结果数据进行融合处理,得到该任务请求对应的任务处理结果。在本公式实施方式中,在虚拟机VM0对应3个处理单元的情况下,为提高任务处理效率,主控单元110可对该任务请求的任务进行拆分处理,从而得到2个子任务。然后将这2个子任务分别分发至硬件子系统0、硬件子系统1以及硬件子系统2中的至少一个处理单元进行处理,例如,将这2个子任务分别分发至硬件子系统0、硬件子系统1这两个处理单元进行处理,在这两个处理单元对子任务处理完成之后,主控单元110再根据2个子任务的处理结果得到最终的任务处理结果。因此,在一对多映射中,多个子任务的数量小于或等于一个虚拟机对应的处理单元的数量。In an example, the main control unit 110 receives the task request sent by the virtual machine VM0, parses to obtain the task data included in the task request, and then divides the task data based on the number of processing units 120 corresponding to the virtual machine VM0 to obtain Three subtasks are divided, and the three subtasks are respectively sent to three processing units of hardware subsystem 0, hardware subsystem 1 and hardware subsystem 2 for processing. After each processing unit processes the subtasks, the corresponding processing results can be obtained. For example, hardware subsystem 0 obtains the first result data after processing the subtasks, and hardware subsystem 1 obtains the second result data after processing the subtasks. Subsystem 2 obtains third result data after processing the subtasks. The main control unit 110 then fuses the first result data, the second result data and the third result data to obtain a task processing result corresponding to the task request. In the embodiment of this formula, when the virtual machine VM0 corresponds to 3 processing units, in order to improve the task processing efficiency, the main control unit 110 may split and process the task requested by the task, so as to obtain 2 subtasks. Then distribute these two subtasks to at least one processing unit in hardware subsystem 0, hardware subsystem 1, and hardware subsystem 2 for processing, for example, distribute these two subtasks to hardware subsystem 0, hardware subsystem respectively 1. These two processing units perform processing. After the two processing units process the subtasks, the main control unit 110 obtains the final task processing result according to the processing results of the two subtasks. Therefore, in one-to-many mapping, the number of multiple subtasks is less than or equal to the number of processing units corresponding to one virtual machine.
通过上述可知,本公开实施方式中,在一个虚拟机对应多个处理单元的情况下,通过对任务请求的任务进行拆分处理,使得多个处理单元并行进行任务处理,提高了任务处理效率。It can be known from the above that, in the embodiments of the present disclosure, when one virtual machine corresponds to multiple processing units, the tasks requested by the task are split and processed so that multiple processing units can process tasks in parallel, thereby improving task processing efficiency.
3)多对一映射。如图2所示,一个示例中,在映射关系中虚拟机VM0、VM1均对应SoC中的硬件子系统0。3) Many-to-one mapping. As shown in FIG. 2 , in an example, in the mapping relationship, the virtual machines VM0 and VM1 both correspond to the hardware subsystem 0 in the SoC.
在一些实施方式中,当仅有虚拟机VM0和VM1其中之一发送任务请求时,主控单元110基于类似于一对一映射的过程将任务请求分发至硬件子系统0进行处理即可,本公开不再赘述。In some implementations, when only one of the virtual machines VM0 and VM1 sends a task request, the main control unit 110 distributes the task request to the hardware subsystem 0 for processing based on a process similar to one-to-one mapping. I won't repeat it publicly.
在另一些实施方式中,当虚拟机VM0和VM1同时发送任务请求时,主控单元110可根据优先级确定各个任务请求对应的处理时间,从而对多个任务请求进行分发处理,下面结合图4实施方式进行说明。In some other implementations, when the virtual machines VM0 and VM1 send task requests at the same time, the main control unit 110 can determine the processing time corresponding to each task request according to the priority, so as to distribute and process multiple task requests, as shown below in conjunction with FIG. 4 Embodiments will be described.
如图4所示,在一些实施方式中,本公开示例的虚拟机任务处理方法中,对多个任务请求进行分发处理的过程包括S410至S430。As shown in FIG. 4 , in some implementations, in the virtual machine task processing method of the example of the present disclosure, the process of distributing and processing multiple task requests includes S410 to S430.
S410、主控单元获取处理单元对应的虚拟机发送的任务请求。S410. The main control unit acquires the task request sent by the virtual machine corresponding to the processing unit.
在一些实施方式中,以前述示例为例,映射关系中虚拟机VM0、VM1均对应SoC中的硬件子系统0。当虚拟机VM0和VM1同时发送任务请求时,主控单元110可以接收到虚拟机VM0和VM1发送的任务请求。In some implementation manners, taking the foregoing example as an example, both the virtual machines VM0 and VM1 in the mapping relationship correspond to the hardware subsystem 0 in the SoC. When the virtual machines VM0 and VM1 send task requests at the same time, the main control unit 110 may receive the task requests sent by the virtual machines VM0 and VM1.
S420、根据处理单元对应的虚拟机的优先级,针对所述处理单元对应的虚拟机发 送的任务请求,确定该任务请求对应的处理时间。S420. According to the priority of the virtual machine corresponding to the processing unit, for the task request sent by the virtual machine corresponding to the processing unit, determine the processing time corresponding to the task request.
在一些实施方式中,虚拟机的优先级表示对各个虚拟机发送的任务请求进行处理的优先程度。不同的虚拟机对应有各自的优先级,该优先级可以基于虚拟机对应的客户机的使用需求、购买情况等进行预先设置。例如上述示例中,虚拟机VM0的优先级为P1,虚拟机VM1的优先级为P2。In some implementation manners, the priority of the virtual machine indicates the priority of processing the task request sent by each virtual machine. Different virtual machines have their own priorities, and the priorities can be preset based on the use requirements and purchase conditions of the client machines corresponding to the virtual machines. For example, in the above example, the priority of the virtual machine VM0 is P1, and the priority of the virtual machine VM1 is P2.
处理时间表示任务请求对处理单元的资源占用程度,虚拟机的优先级越高,其任务请求对处理单元的资源占用时间越长,也即在一个时间窗口内对应的处理时间也越长。The processing time indicates the resource occupation of the processing unit by the task request. The higher the priority of the virtual machine, the longer the resource occupation time of the task request on the processing unit is, that is, the corresponding processing time within a time window is longer.
在本公开实施方式中,可以根据各个虚拟机的优先级来得到每个任务请求的处理时间,从而处理单元即可以根据所述处理时间对任务请求进行处理。该过程可以参照下述实施方式,在此暂不展开。In the embodiments of the present disclosure, the processing time of each task request can be obtained according to the priority of each virtual machine, so that the processing unit can process the task request according to the processing time. For this process, reference may be made to the following implementation manners, which will not be expanded here.
S430、根据所述处理时间,处理单元依次对所述处理单元对应的虚拟机发送的各个任务请求进行处理。S430. According to the processing time, the processing unit sequentially processes each task request sent by the virtual machine corresponding to the processing unit.
在一些实施方式中,主控单元根据各个虚拟机的优先级确定各个任务请求的处理时间之后,即可以将各个任务请求分发至任务队列排队。处理单元可从任务队列中依次调取位于队首的一个任务请求,并且根据该任务请求对应的处理时间,对该任务请求进行处理。In some implementation manners, after the main control unit determines the processing time of each task request according to the priority of each virtual machine, it may distribute each task request to a task queue for queuing. The processing unit may sequentially retrieve a task request at the head of the queue from the task queue, and process the task request according to the processing time corresponding to the task request.
通过上述可知,本公开实施方式中,在多个虚拟机对应一个处理单元的情况下,通过设置优先级,基于虚拟机的优先级对任务请求进行处理,合理分配物理资源,提高任务处理效率。It can be seen from the above that in the embodiments of the present disclosure, when multiple virtual machines correspond to one processing unit, by setting priorities, task requests are processed based on the priorities of the virtual machines, physical resources are allocated reasonably, and task processing efficiency is improved.
本公开一些实施方式中,在图4实施方式的基础上,在对虚拟机VM0和VM1的任务请求进行分发处理时,并非将两者其中之一处理完成之后才处理另一。而是在时域上将时间划分为连续等间距的时间窗口,例如一个示例中,可以将每100ms作为一个时间窗口。在一个时间窗口内,会对多个任务请求依次进行处理,但是每个任务请求所对应的处理时间并不一定相同,而是基于优先级确定的。In some implementations of the present disclosure, on the basis of the implementation in FIG. 4 , when distributing and processing the task requests of the virtual machines V0 and VM1 , the other is not processed until one of them is processed. Instead, time is divided into consecutive time windows at equal intervals in the time domain. For example, in an example, every 100 ms may be used as a time window. Within a time window, multiple task requests are processed sequentially, but the processing time corresponding to each task request is not necessarily the same, but is determined based on priority.
如图5所示,在一些实施方式中,本公开示例的虚拟机任务处理方法中,确定各个任务请求对应的处理时间的过程包括S510至S520。As shown in FIG. 5 , in some implementations, in the virtual machine task processing method of the example of the present disclosure, the process of determining the processing time corresponding to each task request includes S510 to S520.
S510、根据预先设置的每个虚拟机的优先级,确定所述处理单元对应的虚拟机发送的各个任务请求对应的权重值。S510. Determine, according to the preset priority of each virtual machine, a weight value corresponding to each task request sent by the virtual machine corresponding to the processing unit.
S520、基于权重值,确定所述处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的窗口处理时间。S520. Based on the weight value, determine the window processing time of each task request sent by the virtual machine corresponding to the processing unit within the current time window.
在一些实施方式中,仍以前述示例为例,映射关系中虚拟机VM0、VM1均对应SoC中的处理单元1200(硬件子系统0),主控单元110同时接收到虚拟机VM0和VM1发送的任务请求。In some implementations, still taking the foregoing example as an example, the virtual machines VM0 and VM1 in the mapping relationship correspond to the processing unit 1200 (hardware subsystem 0) in the SoC, and the main control unit 110 simultaneously receives the information sent by the virtual machines VM0 and VM1. task request.
每个虚拟机预先设置有各自的优先级,例如虚拟机VM0的优先级为P1,虚拟机VM1的优先级为P2。虚拟机VM0的任务请求的权重值w1即可表示为:w1=P1/(P1+P2),同理,虚拟机VM1的任务请求对应的权重值w2即可表示为:w2=P2/(P1+P2)。Each virtual machine is preset with its own priority, for example, the priority of the virtual machine VM0 is P1, and the priority of the virtual machine VM1 is P2. The weight value w1 of the task request of the virtual machine VM0 can be expressed as: w1=P1/(P1+P2). Similarly, the weight value w2 corresponding to the task request of the virtual machine VM1 can be expressed as: w2=P2/(P1 +P2).
在得到每个任务请求对应的权重值之后,即可根据时间窗口的总时长,确定每个任务请求在当前时间窗口内的处理时间。After obtaining the weight value corresponding to each task request, the processing time of each task request within the current time window can be determined according to the total duration of the time window.
在上述示例中,每个时间窗口的总时长为s,则虚拟机VM0的任务请求所对应的处理时长s1即可表示为:s1=w1*s=P1*s/(P1+P2),同理,虚拟机VM1的任务请求对应的处理时长s2即可表示为:s2=w2*s=P2*s/(P1+P2)。In the above example, the total duration of each time window is s, then the processing duration s1 corresponding to the task request of the virtual machine VM0 can be expressed as: s1=w1*s=P1*s/(P1+P2), and In principle, the processing duration s2 corresponding to the task request of the virtual machine VM1 can be expressed as: s2=w2*s=P2*s/(P1+P2).
在得到每个任务请求的处理时间之后,主控单元110即可将每个任务请求依次分发至任务队列进行排队,等待处理单元调取完成处理。After obtaining the processing time of each task request, the main control unit 110 can sequentially distribute each task request to the task queue for queuing, and wait for the processing unit to call and complete the processing.
S530、在当前时间窗口内,处理单元根据窗口处理时间依次对任务队列中的各个任务请求进行处理。S530. Within the current time window, the processing unit sequentially processes each task request in the task queue according to the window processing time.
在一些实施方式中,在计算得到每个任务请求在当前时间窗口内的处理时间之后,主控单元110将每个任务请求依次分发至任务队列进行排队,处理单元120依次调取任务队列中排在队首的任务请求,并根据该任务请求对应的处理时间进行处理。In some implementations, after calculating the processing time of each task request within the current time window, the main control unit 110 sequentially distributes each task request to the task queue for queuing, and the processing unit 120 sequentially calls the tasks queued in the task queue. The task request at the head of the team is processed according to the processing time corresponding to the task request.
以前述示例为例,任务队列中依次排列有虚拟机VM0的任务请求,以及虚拟机VM1的任务请求。在当前时间窗口s时长中,硬件子系统0可首先调取虚拟机VM0的任务请求处理s1时长,然后调取虚拟机VM1的任务请求处理s2时长。Taking the foregoing example as an example, the task request of the virtual machine VM0 and the task request of the virtual machine VM1 are arranged in sequence in the task queue. In the current time window s duration, the hardware subsystem 0 may first call the task request processing s1 duration of the virtual machine VM0, and then call the task request processing s2 duration of the virtual machine VM1.
在本公开实施方式中,在一个时间窗口的处理时长内,某一任务请求未处理完成的情况下,需要中断该任务请求的处理进程,并将该任务请求重新进入任务队列的队尾进行排队。In the embodiment of the present disclosure, if a certain task request has not been processed within the processing duration of a time window, it is necessary to interrupt the processing process of the task request, and re-enter the task queue at the end of the task queue for queuing .
例如上述示例中,在当前时间窗口s时长中,硬件子系统0首先调取虚拟机VM0的任务请求处理s1时长,但是该任务请求并未处理完成,此时需要中断虚拟机VM0的 任务请求的处理进程,开始进入虚拟机VM1的任务请求处理进程。For example, in the above example, in the current time window s duration, the hardware subsystem 0 first calls the task request of the virtual machine VM0 to process the s1 duration, but the task request has not been processed, and at this time it is necessary to interrupt the task request of the virtual machine VM0 The processing process starts to enter the task request processing process of the virtual machine VM1.
同时,被中断的虚拟机VM0的任务请求重新进入任务队列的队尾排队,等待下一个时间窗口,在下一个时间窗口处,硬件子系统0再次调取该任务请求继续处理。例如,在当前时间窗口s内,硬件子系统0首先调取虚拟机VM0的任务请求处理s1时长后中断,将虚拟机VM0的任务请求加入任务队列的队尾进行排队,然后调取虚拟机VM1的任务请求处理s2时长后中断,进入下一个时间窗口。在下一个时间窗口中,硬件子系统0将虚拟机VM1的任务请求加入任务队列的队尾继续进行排队,同时再次调取虚拟机VM0的任务请求进行处理。如此循环执行,直至任务请求处理完成。At the same time, the task request of the interrupted virtual machine VM0 re-enters the queue at the end of the task queue and waits for the next time window. At the next time window, the hardware subsystem 0 calls the task request again to continue processing. For example, in the current time window s, the hardware subsystem 0 first calls the task request of the virtual machine VM0 to process s1 and then interrupts, adds the task request of the virtual machine VM0 to the tail of the task queue for queuing, and then calls the virtual machine VM1 The task request is interrupted after processing s2 and enters the next time window. In the next time window, the hardware subsystem 0 adds the task request of the virtual machine VM1 to the end of the task queue to continue queuing, and at the same time calls the task request of the virtual machine VM0 again for processing. This cycle is executed until the task request processing is completed.
上述示例中仅示出了两个虚拟机对应同一个处理单元的情况,在其他实施方式中,映射关系中也可以是其他数量的虚拟机对应同一个处理单元,其任务处理的原理与上述示例相同,本公开对此不作赘述。The above example only shows the case where two virtual machines correspond to the same processing unit. In other implementations, other numbers of virtual machines may correspond to the same processing unit in the mapping relationship. The principle of task processing is the same as that of the above example Similarly, this disclosure does not repeat it.
另外,在本公开一些实施方式中,在图5实施方式的基础上,本公开任务处理方法在每个时间窗口中进行任务请求的分发处理时,当前时间窗口中各个任务请求的处理时长,也可以根据前一时间窗口中各个任务请求的实际处理时间进行动态的调整。In addition, in some implementations of the present disclosure, on the basis of the implementation in FIG. 5 , when the task processing method of the present disclosure distributes task requests in each time window, the processing duration of each task request in the current time window is also Dynamic adjustment can be made according to the actual processing time of each task request in the previous time window.
例如,在时间窗口T1中,T1的总时长为100ms,虚拟机VM0的任务处理时间为30ms,虚拟机VM1的任务处理时间为70ms。但是实际任务处理中,虚拟机VM0的实际任务处理时间占满了30ms,然而虚拟机VM1的实际任务处理时间仅使用了50ms。从而,在下一个时间窗口T2的100ms中,即可将虚拟机VM0的任务处理时间由30ms调整至50ms,将虚拟机VM1的任务处理时间由70ms调整至50ms。也即,每一个时间窗口的各个任务请求的处理时长可以基于前一个时间窗口的任务处理情况进行动态的微调。本领域技术人员对此可以理解,本公开不再赘述。For example, in the time window T1, the total duration of T1 is 100ms, the task processing time of the virtual machine VM0 is 30ms, and the task processing time of the virtual machine VM1 is 70ms. However, in actual task processing, the actual task processing time of the virtual machine VM0 takes up 30ms, but the actual task processing time of the virtual machine VM1 only uses 50ms. Therefore, within 100 ms of the next time window T2, the task processing time of the virtual machine VM0 can be adjusted from 30 ms to 50 ms, and the task processing time of the virtual machine VM1 can be adjusted from 70 ms to 50 ms. That is, the processing duration of each task request in each time window can be dynamically fine-tuned based on the task processing situation in the previous time window. Those skilled in the art can understand this, which is not repeated in the present disclosure.
通过上述可知,本公开实施方式中,在多个虚拟机对应一个处理单元的情况下,通过设置虚拟机的优先级,基于虚拟机的优先级对任务请求进行处理,可以合理分配物理资源,提高任务处理效率。From the above, it can be seen that in the embodiment of the present disclosure, when multiple virtual machines correspond to one processing unit, by setting the priority of the virtual machines, the task request can be processed based on the priority of the virtual machines, so that physical resources can be allocated reasonably, and the processing speed can be improved. task processing efficiency.
图6示出了本公开任务处理方法的一些实施方式,下面结合图6对本公开方法进一步说明。FIG. 6 shows some implementations of the task processing method of the present disclosure, and the method of the present disclosure will be further described below with reference to FIG. 6 .
如图6所示,在一些实施方式中,本公开示例的虚拟机的任务处理方法包括S610至S640。As shown in FIG. 6 , in some implementation manners, the task processing method of the virtual machine in the example of the present disclosure includes S610 to S640.
S610、预先建立各个虚拟机与片上系统的各个处理单元之间的映射关系。S610. Pre-establish a mapping relationship between each virtual machine and each processing unit of the SoC.
在一些实施方式中,参见图2所示的系统架构,管理员可以基于各个虚拟机用户的场景需求、购买付费情况等预先为各个虚拟机分配物理资源,也即建立各个虚拟机与各个处理单元之间的映射关系。In some implementations, referring to the system architecture shown in FIG. 2 , the administrator can pre-allocate physical resources for each virtual machine based on the scenario requirements of each virtual machine user, purchase payment situation, etc., that is, establish each virtual machine and each processing unit mapping relationship between them.
在一个示例中,对于硬件资源需求较多、或者购买付费更多的虚拟机,在映射关系中可以为该虚拟机设置更多数量的处理单元。对于硬件资源需求较少、或者付费更少的虚拟机,可在映射关系中为该虚拟机设置1个处理单元,或者多个虚拟机对应同1个处理单元。本领域技术人员可以根据具体场景需求进行设置,本公开对此不再赘述。In an example, for a virtual machine that requires more hardware resources or pays more for purchase, a larger number of processing units may be set for the virtual machine in the mapping relationship. For a virtual machine that requires less hardware resources or pays less, one processing unit can be set for the virtual machine in the mapping relationship, or multiple virtual machines correspond to the same processing unit. A person skilled in the art may perform settings according to specific scenario requirements, which will not be described in detail in this disclosure.
S620、片上系统的主控单元获取宿主机端各个虚拟机发送的任务请求。S620. The main control unit of the SoC obtains the task request sent by each virtual machine on the host machine side.
在一些实施方式中,参见图2所示的系统架构,用户在使用宿主机端的各个虚拟机提供的服务时,各个虚拟机通过第一通信模块210,以通信总线300为媒介向SoC 100发送任务请求。SoC 100的主控单元110通过第二通信模块111即可接收到各个任务请求。In some embodiments, referring to the system architecture shown in FIG. 2 , when a user uses the services provided by each virtual machine on the host computer side, each virtual machine sends a task to the SoC 100 through the first communication module 210 using the communication bus 300 as a medium. ask. The main control unit 110 of the SoC 100 can receive each task request through the second communication module 111.
S630、基于所述映射关系,片上系统的主控单元根据任务请求中的虚拟机标识将各个任务请求分发至对应的处理单元进行处理。S630. Based on the mapping relationship, the main control unit of the system on chip distributes each task request to a corresponding processing unit for processing according to the virtual machine identifier in the task request.
在一些实施方式中,主控单元110对任务请求调度和分发的过程,参见上述实施方式即可,对此不再赘述。In some implementation manners, the process of scheduling and distributing task requests by the main control unit 110 can be referred to the above implementation manners, which will not be repeated here.
S640、基于所述映射关系,主控单元将任务请求对应的处理结果,发送至任务请求分别对应的虚拟机。S640. Based on the mapping relationship, the main control unit sends the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
在一些实施方式中,在每个任务请求处理完成之后,处理单元120将该任务请求对应的处理结果反馈至主控单元110,然后主控单元110将处理结果通过第二通信模块11以通信总线300为媒介发送至宿主机,宿主机接收到处理结果,基于上述映射关系,将处理结果发送至对应的虚拟机,从而使用该虚拟机的客户机(Guest)端即可接收到处理结果。In some implementations, after the processing of each task request is completed, the processing unit 120 feeds back the processing result corresponding to the task request to the main control unit 110, and then the main control unit 110 sends the processing result to the communication bus through the second communication module 11 300 is sending the media to the host, the host receives the processing result, and based on the above mapping relationship, sends the processing result to the corresponding virtual machine, so that the client (Guest) using the virtual machine can receive the processing result.
通过上述可知,本公开实施方式的虚拟机任务处理方法,建立了虚拟机与硬件资源之间的映射关系,利用了SoC的主控单元基于该映射关系进行任务的调度及分发,实现了SoC的虚拟化,降低了虚拟化成本而且提高虚拟机性能。From the above, it can be seen that the virtual machine task processing method of the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, realizing the SoC. Virtualization reduces virtualization costs and improves virtual machine performance.
本公开实施方式提供了一种片上系统,在一些实施方式中,本公开示例的片上系统可包括:主控单元和至少一个处理单元;存储单元,存储有预先建立的虚拟机与各处理单元之间的映射关系;其中,主控单元被配置为获取各个虚拟机发送的任务请求,并 基于映射关系,根据任务请求包括的虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理。Embodiments of the present disclosure provide a system-on-chip. In some embodiments, the system-on-chip of the disclosed example may include: a main control unit and at least one processing unit; a storage unit storing a relationship between a pre-established virtual machine and each processing unit The mapping relationship among them; wherein, the main control unit is configured to obtain the task requests sent by each virtual machine, and based on the mapping relationship, distribute each task request to the corresponding processing unit for processing according to the virtual machine identifier included in the task request.
在一些实施方式中,本公开示例的片上系统可如图1中SoC 100所示,包括主控单元110以及多个处理单元120。同时,SoC 100还包括存储单元,存储单元用于存储上述实施方式中预先建立的虚拟机与各处理单元之间的映射关系。In some implementations, the system-on-a-chip of the example of the present disclosure may be shown as SoC 100 in FIG. 1 , including a main control unit 110 and a plurality of processing units 120. At the same time, the SoC 100 also includes a storage unit for storing the pre-established mapping relationship between the virtual machine and each processing unit in the above implementation manner.
对于主控单元110的利用映射关系实现SoC虚拟化的过程,本领域技术人员参照前述任意实施方式的方法即可,本公开对此不再赘述。For the process of realizing SoC virtualization by using the mapping relationship of the main control unit 110 , those skilled in the art can refer to the method in any of the above-mentioned implementation manners, which will not be repeated in this disclosure.
通过上述可知,本公开实施方式中,建立虚拟机与硬件资源之间的映射关系,利用SoC的主控单元基于该映射关系进行任务的调度及分发,实现SoC的虚拟化,降低虚拟化成本而且提高虚拟机性能。From the above, it can be seen that in the embodiments of the present disclosure, the mapping relationship between the virtual machine and the hardware resource is established, and the main control unit of the SoC is used to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization. Improve virtual machine performance.
在一些实施方式中,本公开实施方式的片上系统,还包括:第二通信模块,用于与宿主机的第一通信模块建立可通信连接,主控单元通过第二通信模块获取任务请求。In some embodiments, the system-on-a-chip of the embodiment of the present disclosure further includes: a second communication module, configured to establish a communicable connection with the first communication module of the host computer, and the main control unit obtains the task request through the second communication module.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,在任意一个虚拟机对应所述处理单元中一个处理单元的情况下,主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,将该任务请求分发至任意一个虚拟机对应的处理单元进行处理。In some implementations, for any one of the virtual machines, if any one of the virtual machines corresponds to one of the processing units, the main control unit is configured to: send to any one of the virtual machines The task request is distributed to the processing unit corresponding to any virtual machine for processing.
在一些实施方式中,对于所述虚拟机中任意一个虚拟机,在任意一个虚拟机对应所述处理单元中至少两个处理单元的情况下,主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,主控单元对该任务请求对应的任务进行拆分处理,得到多个子任务;多个子任务的数量小于或等于任意一个虚拟机对应的处理单元的数量;主控单元将各个子任务分发至任意一个虚拟机对应的处理单元中的一个或多个处理单元进行处理。In some implementations, for any one of the virtual machines, if any one of the virtual machines corresponds to at least two processing units in the processing units, the main control unit is configured to: for any one of the virtual machines The task request sent by the virtual machine, the main control unit splits and processes the task corresponding to the task request to obtain multiple subtasks; the number of multiple subtasks is less than or equal to the number of processing units corresponding to any virtual machine; the main control unit divides each The subtasks are distributed to one or more processing units in the processing units corresponding to any virtual machine for processing.
在一些实施方式中,对于所述处理单元中任意一个处理单元,在任意一个处理单元对应所述虚拟机中至少两个虚拟机的情况下,主控单元被配置为:获取所述任意一个处理单元对应的虚拟机发送的任务请求;根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间;根据处理时间,任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理。In some implementations, for any one of the processing units, if any one of the processing units corresponds to at least two of the virtual machines, the main control unit is configured to: obtain the any one processing A task request sent by the virtual machine corresponding to the unit; according to the priority of the virtual machine corresponding to the any one processing unit, for the task request sent by the virtual machine corresponding to the any one processing unit, determine the processing time corresponding to the task request; According to the processing time, any one of the processing units sequentially processes each task request sent by the virtual machine corresponding to the any one of the processing units.
在一些实施方式中,主控单元被配置为:根据预先设置的每个虚拟机的优先级,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求对应的权重值;基于权重值,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的 窗口处理时间;将所述任意一个处理单元对应的所述至少两个虚拟机发送的各个任务请求分发至任务队列排队;在当前时间窗口内,任意一个处理单元根据窗口处理时间依次对任务队列中的各个任务请求进行处理。In some implementations, the main control unit is configured to: determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units according to the preset priority of each virtual machine; based on the weight value, Determining the window processing time of each task request sent by the virtual machine corresponding to any one processing unit within the current time window; distributing the task requests sent by the at least two virtual machines corresponding to any one processing unit to tasks Queue queuing; within the current time window, any processing unit sequentially processes each task request in the task queue according to the window processing time.
在一些实施方式中,主控单元被配置为:响应于在当前时间窗口内,针对所述任务队列中的各个任务请求,该任务请求在对应的窗口处理时间内未处理完成,中断该任务请求的处理进程,并将该任务请求加入任务队列的队尾。In some implementations, the main control unit is configured to: in response to each task request in the task queue within the current time window, the task request is not processed within the corresponding window processing time, interrupt the task request processing process, and add the task request to the tail of the task queue.
在一些实施方式中,主控单元被配置为:基于映射关系,将任务请求对应的处理结果,发送至任务请求对应的虚拟机。In some implementations, the main control unit is configured to: based on the mapping relationship, send the processing result corresponding to the task request to the virtual machine corresponding to the task request.
通过上述可知,本公开实施方式片上系统,建立虚拟机与硬件资源之间的映射关系,利用SoC的主控单元基于该映射关系进行任务的调度及分发,实现SoC的虚拟化,降低虚拟化成本而且提高虚拟机性能。From the above, it can be seen that the system on chip in the embodiment of the present disclosure establishes the mapping relationship between the virtual machine and the hardware resource, and uses the main control unit of the SoC to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization And improve virtual machine performance.
本公开实施方式提供了一种虚拟机任务处理设备,包括:宿主机,包括预先建立的至少一个虚拟机;和片上系统,与所述宿主机可通信连接。The embodiment of the present disclosure provides a virtual machine task processing device, including: a host machine including at least one pre-established virtual machine; and a system-on-chip, communicably connected to the host machine.
在一些实施方式中,本公开示例的虚拟机任务处理设备可如图2所示,包括宿主机200和片上系统100,宿主机200预先建立有多个虚拟机220,多个虚拟机220可通过第一通信模块210与片上系统100建立通信连接。In some implementations, the virtual machine task processing device of the example of the present disclosure may be shown in FIG. 2 , including a host machine 200 and a system-on-chip 100. The host machine 200 is pre-established with multiple virtual machines 220, and the multiple virtual machines 220 can be configured by The first communication module 210 establishes a communication connection with the SoC 100 .
对于片上系统100和宿主机200利用映射关系实现SoC虚拟化的过程,本领域技术人员参照前述任意实施方式的方法即可,本公开对此不再赘述。For the process of implementing SoC virtualization by the system-on-chip 100 and the host machine 200 using the mapping relationship, those skilled in the art may refer to the method in any of the above-mentioned implementation manners, which will not be repeated in this disclosure.
在一些实施方式中,本公开实施方式提供了一种存储介质,存储有计算机可读指令,所述计算机可读指令用于使计算机执行根据上述任一实施方式所述的虚拟机任务处理方法。In some embodiments, the embodiments of the present disclosure provide a storage medium storing computer-readable instructions, the computer-readable instructions are used to cause a computer to execute the virtual machine task processing method according to any one of the above-mentioned embodiments.
通过上述可知,本公开实施方式中,建立虚拟机与硬件资源之间的映射关系,利用SoC的主控单元基于该映射关系进行任务的调度及分发,实现SoC的虚拟化,降低虚拟化成本而且提高虚拟机性能。From the above, it can be seen that in the embodiments of the present disclosure, the mapping relationship between the virtual machine and the hardware resource is established, and the main control unit of the SoC is used to schedule and distribute tasks based on the mapping relationship, so as to realize the virtualization of the SoC and reduce the cost of virtualization. Improve virtual machine performance.
显然,上述实施方式仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显见的变化或变动仍处于本公开创造的保护范围之中。Apparently, the above-mentioned implementation manners are only examples for clear description, rather than limiting the implementation manners. For those of ordinary skill in the art, on the basis of the above description, other changes or changes in different forms can also be made. It is not necessary and impossible to exhaustively list all the implementation manners here. And the obvious changes or changes derived therefrom are still within the scope of protection of the present disclosure.
Claims (19)
- 一种虚拟机任务处理方法,应用于片上系统,所述任务处理方法包括:A virtual machine task processing method applied to a system on chip, the task processing method comprising:获取各个虚拟机发送的任务请求,其中,针对每个所述任务请求,该任务请求包括对应的虚拟机标识;Acquiring task requests sent by each virtual machine, wherein, for each task request, the task request includes a corresponding virtual machine identifier;基于预先建立的所述虚拟机与片上系统的各个处理单元之间的映射关系,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理。Based on the pre-established mapping relationship between the virtual machine and each processing unit of the SoC, the main control unit of the SoC distributes each task request to a corresponding processing unit according to the virtual machine identifier for processing.
- 根据权利要求1所述的方法,其中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中一个处理单元,The method according to claim 1, wherein, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to one of the processing units,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:The main control unit of the system on chip distributes each of the task requests to corresponding processing units for processing according to the virtual machine identifier, including:针对所述任意一个虚拟机发送的任务请求,所述主控单元将该任务请求分发至所述任意一个虚拟机对应的所述处理单元进行处理。For the task request sent by the any one virtual machine, the main control unit distributes the task request to the processing unit corresponding to the any one virtual machine for processing.
- 根据权利要求1所述的方法,其中,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中至少两个处理单元,The method according to claim 1, wherein, for any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to at least two of the processing units,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:The main control unit of the system on chip distributes each of the task requests to corresponding processing units for processing according to the virtual machine identifier, including:针对所述任意一个虚拟机发送的任务请求,所述主控单元对该任务请求对应的任务进行拆分处理,得到多个子任务;所述多个子任务的数量小于或等于所述任意一个虚拟机对应的处理单元的数量;For the task request sent by any one of the virtual machines, the main control unit splits and processes the task corresponding to the task request to obtain multiple subtasks; the number of the multiple subtasks is less than or equal to that of any one of the virtual machines The number of corresponding processing units;所述主控单元将各个子任务分发至所述任意一个虚拟机对应的处理单元中的一个或多个处理单元进行处理。The main control unit distributes each subtask to one or more processing units in the processing units corresponding to any one virtual machine for processing.
- 根据权利要求1所述的方法,其中,对于所述处理单元中任意一个处理单元,响应于所述任意一个处理单元对应所述虚拟机中至少两个虚拟机,The method according to claim 1, wherein, for any one of the processing units, in response to the fact that the any one processing unit corresponds to at least two virtual machines in the virtual machines,所述片上系统的主控单元根据所述虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理,包括:The main control unit of the system on chip distributes each of the task requests to corresponding processing units for processing according to the virtual machine identifier, including:所述主控单元获取所述任意一个处理单元对应的虚拟机发送的任务请求;The main control unit acquires a task request sent by a virtual machine corresponding to any one of the processing units;根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间;According to the priority of the virtual machine corresponding to any one processing unit, for the task request sent by the virtual machine corresponding to any one processing unit, determine the processing time corresponding to the task request;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理。According to the processing time, the any one processing unit sequentially processes each task request sent by the virtual machine corresponding to the any one processing unit.
- 根据权利要求4所述的方法,其中,根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间,包括:The method according to claim 4, wherein, according to the priority of the virtual machine corresponding to any one of the processing units, for the task request sent by the virtual machine corresponding to any one of the processing units, the processing time corresponding to the task request is determined ,include:根据预先设置的每个虚拟机的优先级,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求对应的权重值;According to the preset priority of each virtual machine, determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units;基于所述权重值,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的窗口处理时间;Based on the weight value, determine the window processing time of each task request sent by the virtual machine corresponding to the arbitrary processing unit within the current time window;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理,包括:According to the processing time, the arbitrary processing unit sequentially processes each task request sent by the virtual machine corresponding to the arbitrary processing unit, including:将所述任意一个处理单元对应的虚拟机发送的各个任务请求分发至任务队列排队;Distributing each task request sent by the virtual machine corresponding to any one of the processing units to a task queue for queuing;在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理。Within the current time window, any one of the processing units sequentially processes each task request in the task queue according to the window processing time.
- 根据权利要求5所述的方法,其中,在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理,包括:The method according to claim 5, wherein, within the current time window, any one of the processing units sequentially processes each task request in the task queue according to the window processing time, including:响应于在所述当前时间窗口内,针对所述任务队列中的各个任务请求,该任务请求在对应的窗口处理时间内未处理完成,中断该任务请求的处理进程,并将该任务请求加入所述任务队列的队尾。In response to each task request in the task queue within the current time window, the task request is not processed within the corresponding window processing time, interrupt the processing process of the task request, and add the task request to the The tail of the task queue described above.
- 根据权利要求1至6任一项所述的方法,还包括:The method according to any one of claims 1 to 6, further comprising:基于所述映射关系,所述主控单元将所述任务请求对应的处理结果,发送至所述任务请求分别对应的虚拟机。Based on the mapping relationship, the main control unit sends the processing results corresponding to the task requests to the virtual machines respectively corresponding to the task requests.
- 根据权利要求1至7任一项所述的方法,其中,所述映射关系存储于所述片上系统的存储器中。The method according to any one of claims 1 to 7, wherein the mapping relationship is stored in a memory of the system-on-chip.
- 一种片上系统,包括:A system on a chip comprising:主控单元和至少一个处理单元;a main control unit and at least one processing unit;存储单元,存储有预先建立的虚拟机与各处理单元之间的映射关系;The storage unit stores a pre-established mapping relationship between the virtual machine and each processing unit;其中,所述主控单元被配置为获取各个虚拟机发送的任务请求,并基于所述映射关系,根据所述任务请求包括的虚拟机标识将各个所述任务请求分发至对应的处理单元进行处理。Wherein, the main control unit is configured to obtain task requests sent by each virtual machine, and based on the mapping relationship, distribute each task request to a corresponding processing unit for processing according to the virtual machine identifier included in the task request .
- 根据权利要求9所述的片上系统,还包括:The system-on-chip according to claim 9, further comprising:第二通信模块,用于与宿主机的第一通信模块建立可通信连接,所述主控单元通过 所述第二通信模块获取所述任务请求。The second communication module is configured to establish a communicable connection with the first communication module of the host computer, and the main control unit obtains the task request through the second communication module.
- 根据权利要求9所述的片上系统,其中,The system on chip according to claim 9, wherein,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中一个处理单元,所述主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,将该任务请求分发至所述任意一个虚拟机对应的所述处理单元进行处理。For any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to one of the processing units, the main control unit is configured to: for the task request sent by the any one of the virtual machines, Distributing the task request to the processing unit corresponding to any one virtual machine for processing.
- 根据权利要求9所述的片上系统,其中,The system on chip according to claim 9, wherein,对于所述虚拟机中任意一个虚拟机,响应于所述任意一个虚拟机对应所述处理单元中至少两个处理单元,所述主控单元被配置为:针对所述任意一个虚拟机发送的任务请求,对该任务请求对应的任务进行拆分处理,得到多个子任务;所述多个子任务的数量小于或等于所述任意一个虚拟机对应的处理单元的数量;将各个子任务分发至所述任意一个虚拟机对应的处理单元中的一个或多个处理单元进行处理。For any one of the virtual machines, in response to the fact that the any one of the virtual machines corresponds to at least two of the processing units, the main control unit is configured to: send a task for the any one of the virtual machines Request, split and process the task corresponding to the task request to obtain multiple subtasks; the number of the multiple subtasks is less than or equal to the number of processing units corresponding to any one of the virtual machines; distribute each subtask to the One or more processing units in the processing units corresponding to any virtual machine perform processing.
- 根据权利要求9所述的片上系统,其中,对于所述处理单元中任意一个处理单元,响应于所述任意一个处理单元对应所述虚拟机中至少两个虚拟机,所述主控单元被配置为:The system on chip according to claim 9, wherein, for any one of the processing units, in response to the fact that the any one processing unit corresponds to at least two virtual machines in the virtual machines, the main control unit is configured for:获取所述任意一个处理单元对应的虚拟机发送的任务请求;Obtaining a task request sent by a virtual machine corresponding to any one of the processing units;根据所述任意一个处理单元对应的虚拟机的优先级,针对所述任意一个处理单元对应的虚拟机发送的任务请求,确定该任务请求对应的处理时间;According to the priority of the virtual machine corresponding to any one processing unit, for the task request sent by the virtual machine corresponding to any one processing unit, determine the processing time corresponding to the task request;根据所述处理时间,所述任意一个处理单元依次对所述任意一个处理单元对应的虚拟机发送的各个任务请求进行处理。According to the processing time, the any one processing unit sequentially processes each task request sent by the virtual machine corresponding to the any one processing unit.
- 根据权利要求13所述的片上系统,其中,所述主控单元被配置为:The system on chip according to claim 13, wherein the main control unit is configured to:根据预先设置的每个虚拟机的优先级,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求对应的权重值;According to the preset priority of each virtual machine, determine the weight value corresponding to each task request sent by the virtual machine corresponding to any one of the processing units;基于所述权重值,确定所述任意一个处理单元对应的虚拟机发送的各个任务请求在当前时间窗口内的窗口处理时间;Based on the weight value, determine the window processing time of each task request sent by the virtual machine corresponding to the arbitrary processing unit within the current time window;将所述任意一个处理单元对应的虚拟机发送的各个任务请求分发至任务队列排队;Distributing each task request sent by the virtual machine corresponding to any one of the processing units to a task queue for queuing;在所述当前时间窗口内,所述任意一个处理单元根据所述窗口处理时间依次对所述任务队列中的各个任务请求进行处理。Within the current time window, any one of the processing units sequentially processes each task request in the task queue according to the window processing time.
- 根据权利要求14所述的片上系统,其中,所述主控单元被配置为:The system on chip according to claim 14, wherein the main control unit is configured to:响应于在所述当前时间窗口内,针对所述任务队列中的各个任务请求,该任务请求在对应的窗口处理时间内未处理完成,中断该任务请求的处理进程,并将该任务请求加入所述任务队列的队尾。In response to each task request in the task queue within the current time window, the task request is not processed within the corresponding window processing time, interrupt the processing process of the task request, and add the task request to the The tail of the task queue described above.
- 根据权利要求9所述的片上系统,其中,所述主控单元被配置为:The system on chip according to claim 9, wherein the main control unit is configured to:基于所述映射关系,将所述任务请求对应的处理结果,发送至所述任务请求分别对应的虚拟机。Based on the mapping relationship, the processing results corresponding to the task requests are sent to the virtual machines respectively corresponding to the task requests.
- 一种虚拟机任务处理设备,包括:A virtual machine task processing device, comprising:宿主机,包括预先建立的至少一个虚拟机;和a host machine, including at least one pre-built virtual machine; and根据权利要求9至16任一项所述的片上系统,与所述宿主机可通信连接。The system-on-a-chip according to any one of claims 9 to 16, which is communicably connected to the host computer.
- 一种存储介质,存储有计算机可读指令,所述计算机可读指令用于使计算机执行根据权利要求1至8任一项所述的方法。A storage medium storing computer-readable instructions for causing a computer to execute the method according to any one of claims 1-8.
- 一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机程序指令被处理器执行时实现如权利要求1-8任一项所述的方法。A computer program product, comprising a computer program stored in a memory, when the computer program instructions are executed by a processor, the method according to any one of claims 1-8 is implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111155033.X | 2021-09-29 | ||
CN202111155033.XA CN113821308B (en) | 2021-09-29 | 2021-09-29 | System on chip, virtual machine task processing method and device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023050819A1 true WO2023050819A1 (en) | 2023-04-06 |
Family
ID=78915964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/091613 WO2023050819A1 (en) | 2021-09-29 | 2022-05-09 | System on chip, virtual machine task processing method and device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113821308B (en) |
WO (1) | WO2023050819A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113821308B (en) * | 2021-09-29 | 2023-11-24 | 上海阵量智能科技有限公司 | System on chip, virtual machine task processing method and device and storage medium |
CN114422455B (en) * | 2022-01-24 | 2023-08-22 | 西安交通大学 | Multidimensional resource management architecture and method based on space-air-ground integrated network |
CN115904634B (en) * | 2023-01-17 | 2023-08-15 | 北京象帝先计算技术有限公司 | Resource management method, system-level chip, electronic component and electronic equipment |
CN117412059B (en) * | 2023-12-12 | 2024-04-16 | 北京象帝先计算技术有限公司 | Video coding and decoding system, equipment and method based on virtualization |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160077884A1 (en) * | 2014-09-16 | 2016-03-17 | Unisys Corporation | Dynamic allocation and assignment of virtual functions within fabric |
CN105786589A (en) * | 2016-02-26 | 2016-07-20 | 成都赫尔墨斯科技有限公司 | Cloud rendering system, server and method |
CN109791500A (en) * | 2016-09-28 | 2019-05-21 | 亚马逊科技公司 | Intermediate host integrated circuit between virtual machine instance and client programmable logic |
US10860380B1 (en) * | 2018-09-28 | 2020-12-08 | Amazon Technologies, Inc. | Peripheral device for accelerating virtual computing resource deployment |
CN112395071A (en) * | 2019-08-12 | 2021-02-23 | 北京百度网讯科技有限公司 | Method, apparatus, electronic device, and storage medium for resource management |
CN113419845A (en) * | 2021-02-22 | 2021-09-21 | 阿里巴巴集团控股有限公司 | Calculation acceleration method and device, calculation system, electronic equipment and computer readable storage medium |
CN113821308A (en) * | 2021-09-29 | 2021-12-21 | 上海阵量智能科技有限公司 | System on chip, virtual machine task processing method and device, and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102307207A (en) * | 2010-09-25 | 2012-01-04 | 广东电子工业研究院有限公司 | System and method for online customizing virtual machine image |
US10514943B2 (en) * | 2016-11-17 | 2019-12-24 | Qualcomm Incorporated | Method and apparatus for establishing system-on-chip (SOC) security through memory management unit (MMU) virtualization |
GB2565770B (en) * | 2017-08-15 | 2019-09-18 | Advanced Risc Mach Ltd | Data processing systems |
CN110362388B (en) * | 2018-04-11 | 2021-08-31 | 中移(苏州)软件技术有限公司 | Resource scheduling method and device |
CN112181620B (en) * | 2020-09-27 | 2022-09-20 | 郑州轻工业大学 | Big data workflow scheduling method for sensing service capability of virtual machine in cloud environment |
CN113296884B (en) * | 2021-02-26 | 2022-04-22 | 阿里巴巴集团控股有限公司 | Virtualization method, virtualization device, electronic equipment, virtualization medium and resource virtualization system |
-
2021
- 2021-09-29 CN CN202111155033.XA patent/CN113821308B/en active Active
-
2022
- 2022-05-09 WO PCT/CN2022/091613 patent/WO2023050819A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160077884A1 (en) * | 2014-09-16 | 2016-03-17 | Unisys Corporation | Dynamic allocation and assignment of virtual functions within fabric |
CN105786589A (en) * | 2016-02-26 | 2016-07-20 | 成都赫尔墨斯科技有限公司 | Cloud rendering system, server and method |
CN109791500A (en) * | 2016-09-28 | 2019-05-21 | 亚马逊科技公司 | Intermediate host integrated circuit between virtual machine instance and client programmable logic |
US10860380B1 (en) * | 2018-09-28 | 2020-12-08 | Amazon Technologies, Inc. | Peripheral device for accelerating virtual computing resource deployment |
CN112395071A (en) * | 2019-08-12 | 2021-02-23 | 北京百度网讯科技有限公司 | Method, apparatus, electronic device, and storage medium for resource management |
CN113419845A (en) * | 2021-02-22 | 2021-09-21 | 阿里巴巴集团控股有限公司 | Calculation acceleration method and device, calculation system, electronic equipment and computer readable storage medium |
CN113821308A (en) * | 2021-09-29 | 2021-12-21 | 上海阵量智能科技有限公司 | System on chip, virtual machine task processing method and device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113821308A (en) | 2021-12-21 |
CN113821308B (en) | 2023-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10467725B2 (en) | Managing access to a resource pool of graphics processing units under fine grain control | |
WO2023050819A1 (en) | System on chip, virtual machine task processing method and device, and storage medium | |
US10275851B1 (en) | Checkpointing for GPU-as-a-service in cloud computing environment | |
CN106844007B (en) | Virtualization method and system based on spatial multiplexing | |
US8533713B2 (en) | Efficent migration of virtual functions to enable high availability and resource rebalance | |
EP2622470B1 (en) | Techniques for load balancing gpu enabled virtual machines | |
US10109030B1 (en) | Queue-based GPU virtualization and management system | |
US10191759B2 (en) | Apparatus and method for scheduling graphics processing unit workloads from virtual machines | |
US7971203B2 (en) | Method, apparatus and system for dynamically reassigning a physical device from one virtual machine to another | |
WO2019148854A1 (en) | Method and device for deploying virtualized network element device | |
CN107707622B (en) | Method and device for accessing desktop cloud virtual machine and desktop cloud controller | |
US20120054740A1 (en) | Techniques For Selectively Enabling Or Disabling Virtual Devices In Virtual Environments | |
WO2017024783A1 (en) | Virtualization method, apparatus and system | |
US9720712B2 (en) | Physical/virtual device failover with a shared backend | |
US10275268B2 (en) | Providing entropy to a guest operating system | |
CN109726005B (en) | Method, server system and computer readable medium for managing resources | |
AU2016414391A1 (en) | Packet processing method in cloud computing system, host, and system | |
US9804874B2 (en) | Consolidation of idle virtual machines on idle logical processors | |
WO2022179423A1 (en) | Virtualization processing system, method and apparatus, and device | |
WO2023093843A1 (en) | Configuration device, scheduling device, configuration method, and scheduling method | |
US20130332696A1 (en) | Shared physical memory | |
CN103744716A (en) | Dynamic interrupt balanced mapping method based on current virtual central processing unit (VCPU) scheduling state | |
US20160328348A1 (en) | Computer and computer i/o control method | |
US10002016B2 (en) | Configuration of virtual machines in view of response time constraints | |
WO2022143714A1 (en) | Server system, and virtual machine creation method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22874217 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |