Method and device for dynamically allocating resources in real-time system operation and real-time system

By using shared memory and partition management methods in real-time systems, dynamically adjusting partition resource configuration solves the problem in the existing technology that resource allocation changes require recompiling and burning, and achieves fast and efficient resource management and system stability. .

CN118779097AActive Publication Date: 2024-10-15INTEWELL (GUANGZHOU) SOFEWARE TECH CO LTD

Patent Information

Application Number
CN202410793581.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-15
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing real-time operating systems require recompiling and burning the entire system when changing partition resource allocation, resulting in a cumbersome and time-consuming process.

Method used

By introducing shared memory and partition management methods into real-time systems, partition resource configurations are allowed to be dynamically adjusted, and resource configuration changes are only performed on the partitions that need to be changed, without the need to restart the entire system or compile and burn the entire system.

Benefits of technology

It realizes rapid and dynamic adjustment of partition resource configuration during real-time system operation, simplifies resource management, improves efficiency, and ensures the real-time and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779097A_ABST
    Figure CN118779097A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for dynamically allocating resources in real-time system operation and a real-time system, and the method comprises the steps: obtaining a resource change request for at least one second partition in each second partition, the resource change request comprising to-be-changed resource configuration; reading the stored current resource configuration of each second partition from the shared memory; judging whether the resource change is reasonable or not according to the resource configuration to be changed and the current resource configuration of each second partition; and when the resource change is reasonable, updating the current resource configuration of the corresponding at least one second partition in the shared memory according to the to-be-changed resource configuration, and enabling the at least one second partition to execute the change of the resource configuration according to the updated current resource configuration. According to the method, the operating system is allowed to dynamically adjust the resource configuration of the partition during running, and the whole system does not need to be restarted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of operating system resource allocation, and in particular to a method and device for dynamically allocating resources during operation of a real-time system, a real-time system, a computing device, and a storage medium. Background Art

[0002] Existing time-sharing and partitioned real-time operating systems, such as VxWorks and Intewell OS, include multiple partitions (VMs for short). Each partition has its own resources (CPU core, memory, bus, peripherals, etc.). Before the operating system is started, it is necessary to allocate resources to each partition. The allocation process is as follows: Figure 1 As shown, including:

[0003] 1. Partition division: First, the system needs to be divided into multiple independent partitions.

[0004] 2. Resource allocation: Next, allocate corresponding resources to each partition according to its needs.

[0005] 3. Generate configuration files: Generate static configuration files for each partition. These files describe the resource allocation of the partition in detail.

[0006] 4. Compile configuration files: Compile static configuration files so that they can be recognized and executed by the device.

[0007] 5. Download configuration file: Download the compiled configuration file to the device.

[0008] 6. System initialization: When the device starts, the system will initialize the resources of each partition, including reading, parsing and initializing the resource information in the static configuration file.

[0009] Currently, resource allocation is done through static configuration files before compilation, which means that once the system starts running, the resources of each partition are isolated and exclusive, and cannot be adjusted dynamically. Figure 2 .

[0010] If you need to change the resource allocation of any partition, you must recompile the entire system files (including executable programs and configuration files). Then, you need to form a new burning file, download and burn it to the device, and then restart the device to reinitialize the resources of each partition in the system. This process is cumbersome and time-consuming because it requires restarting the entire device and recompiling and burning the entire system. Summary of the invention

[0011] In view of the above problems in the prior art, the present application provides a method and apparatus for dynamically allocating resources during the operation of a real-time system, a real-time system, a computing device and a storage medium to solve the problem that when changing the resource allocation of any partition, the entire device needs to be restarted and the entire system needs to be recompiled and burned.

[0012] To achieve the above-mentioned purpose, the first aspect of the present application provides a method for dynamically allocating resources during operation of a real-time system, comprising:

[0013] Obtaining a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed;

[0014] Reading the stored current resource configuration of each second partition from the shared memory;

[0015] Judging whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition;

[0016] When the resource change is reasonable, the current resource configuration of the at least one second partition corresponding to the shared memory is updated according to the resource configuration to be changed, and the at least one second partition executes the resource configuration change according to the updated current resource configuration.

[0017] From the above, the present application does not need to recompile and burn the entire system. It only needs to obtain the resource change request of the partition to be changed, and combine it with the current resource configuration of each second partition stored in the shared memory to determine whether the resource change is reasonable. When it is reasonable, update the current resource configuration in the shared memory and the partition to be changed. There is no need to restart the entire device. You only need to restart the partition to be changed and let the partition to be changed execute the resource configuration change according to the updated current resource configuration. The process is simple and saves time.

[0018] As a possible implementation of the first aspect, the following also includes:

[0019] When resource changes are unreasonable, reject the changes.

[0020] As a possible implementation manner of the first aspect, judging whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition includes:

[0021] Determine the deletion of resources and / or the addition of resources in the resource change according to the resource configuration to be changed and the current resource configuration of each second partition;

[0022] When it is determined that only resource deletion is included, whether the resource deletion is reasonable or not is determined, and if not, the change is rejected; if reasonable, the change is allowed;

[0023] When it is determined that only the added resources are included, whether the added resources are reasonable or not is determined, if not, the change is rejected; if reasonable, the change is allowed;

[0024] When it is determined that the resource deletion and resource addition are included, it is determined whether the resource deletion is reasonable. If the resource deletion is unreasonable, the change is rejected; if the resource deletion is reasonable, it is determined whether the resource addition is reasonable. If the resource addition is unreasonable, the change is rejected; if the resource addition is reasonable, the change is allowed.

[0025] As a possible implementation of the first aspect, the resource configuration to be changed includes one or more of the following resources: CPU cores occupied by the partition, memory occupied by the partition, peripherals occupied by the partition, and interrupt numbers occupied by the partition;

[0026] The determining whether the resource change is reasonable includes at least one of the following:

[0027] Determine whether the CPU cores occupied by the partition are deleted. If the CPU cores occupied by the partition are deleted, it is unreasonable. If the CPU cores occupied by the partition are not deleted, it is reasonable.

[0028] Determine whether the memory occupied by the partition is deleted. If the memory occupied by the partition is deleted, it is unreasonable. If the memory occupied by the partition is not deleted, it is reasonable.

[0029] Determine whether the memory occupied by the added partition conflicts. If the address of the memory occupied by the added partition does not overlap with the address of the memory occupied by other second partitions, and the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is smaller than the memory size of the real-time system, then there is no conflict. If the address of the memory occupied by the added partition overlaps with the address of the memory occupied by other second partitions, and / or the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is larger than the memory size of the real-time system, then there is a conflict.

[0030] Determine whether the peripherals occupied by the added partition are reasonable. If the peripherals occupied by the added partition exist in the real-time system, it is reasonable. If the peripherals occupied by the added partition do not exist in the real-time system, it is unreasonable.

[0031] Determine whether the IO multiplexing of the peripherals occupied by the added partition conflicts. If the peripherals occupied by the added partition are peripherals occupied by other second partitions, then there is a conflict. If the peripherals occupied by the added partition are not peripherals occupied by other second partitions, then there is no conflict.

[0032] Determine whether the base address of the peripheral occupied by the added partition is within the available address range of the real-time system, if yes, it is reasonable, if not, it is unreasonable;

[0033] Determine whether the interrupt number occupied by the added partition conflicts. If the interrupt number occupied by the added partition is repeated with the interrupt number in other second partitions, then there is a conflict. If the interrupt number occupied by the added partition is not repeated with the interrupt number in other second partitions, then there is no conflict.

[0034] As a possible implementation manner of the first aspect, causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes:

[0035] When including deleting resources, causing the at least one second partition to delete resources according to the deleting resources;

[0036] Write the current running context data to the shared memory and stop running;

[0037] Read the updated current resource configuration from the shared memory for initialization;

[0038] After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

[0039] As a possible implementation manner of the first aspect, causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes:

[0040] When it includes adding resources, causing the at least one second partition to write the current running context data into the shared memory and stop running;

[0041] Read the updated current resource configuration from the shared memory for initialization;

[0042] After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

[0043] As a possible implementation manner of the first aspect, the current resource configuration of each second partition stored in the shared memory is written by each second partition.

[0044] As a possible implementation manner of the first aspect, the method for dynamically allocating resources during operation of the real-time system is run in a first partition, and the first partition is used to manage the shared memory and the second partitions.

[0045] To achieve the above-mentioned object, the second aspect of the present application provides a device for dynamically allocating resources during operation of a real-time system, comprising:

[0046] A resource change request acquisition module, used to acquire a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed;

[0047] A current resource configuration reading module, used for reading the current resource configuration of each second partition stored in the shared memory;

[0048] A change rationality judgment module, used to judge whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition;

[0049] The change module is used to update the current resource configuration of the at least one second partition corresponding to the shared memory according to the resource configuration to be changed when the resource change is reasonable, and enable the at least one second partition to execute the resource configuration change according to the updated current resource configuration.

[0050] To achieve the above-mentioned object, the third aspect of the present application provides a real-time system, comprising: a first partition, at least one second partition, and a shared memory;

[0051] Each of the second partitions is configured with resources used by it, and the corresponding resource configuration is written into the share for storage;

[0052] The first partition is executed with the method described in any one of the first aspects.

[0053] A fourth aspect of the present application provides a computing device, including:

[0054] processor, and

[0055] A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor executes any of the methods described in the first aspect above.

[0056] A fifth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a computer, the computer implements any of the methods described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a flow chart of the existing method of allocating resources in real-time system;

[0058] Figure 2 This is a schematic diagram of resource isolation of existing partitions;

[0059] Figure 3 is a structural schematic diagram of a real-time system provided in an embodiment of the present application;

[0060] Figure 4 It is a flowchart of an embodiment of a method for dynamically allocating resources during operation of a real-time system provided by an embodiment of the present application;

[0061] Figure 5A flowchart of a specific implementation method of a method for dynamically allocating resources during operation of a real-time system provided in an embodiment of the present application;

[0062] Figure 6 It is a structural schematic diagram of a device for dynamically allocating resources in real-time system operation provided by an embodiment of the present application;

[0063] Figure 7 It is a structural schematic diagram of a computing device provided in an embodiment of the present application.

[0064] It should be understood that the size and shape of each block diagram in the above structural diagram are for reference only and should not constitute an exclusive interpretation of the embodiment of the present invention. The relative position and inclusion relationship between the blocks presented in the structural diagram are only schematic representations of the structural association between the blocks, and do not limit the physical connection method of the embodiment of the present invention. DETAILED DESCRIPTION

[0065] The technical solution provided by the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of the present application are mainly to illustrate the possible implementation methods of the technical solution of the present application and should not be interpreted as the only limitation on the technical solution of the present application. It is known to those of ordinary skill in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.

[0066] It should be understood that the solution for dynamically allocating resources during operation of a real-time system provided in the embodiments of the present application includes a method, device, and real-time system for dynamically allocating resources during operation of a real-time system. Since the principles of solving the problems in these technical solutions are the same or similar, some repetitions may not be repeated in the following specific embodiments, but it should be considered that these specific embodiments have been referenced to each other and can be combined with each other.

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. If there is any inconsistency, the meaning described in this specification or the meaning derived from the content recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. In order to accurately describe the technical contents in this application, and in order to accurately understand the present invention, the following explanation or definition is given to the terms used in this specification before describing the specific embodiments.

[0068] [Implementation of the real-time system of the present application]

[0069] In the existing system, if the resource allocation of any partition needs to be changed, the entire device must be restarted and the entire system must be recompiled and burned. In order to solve this problem, this application proposes a real-time system that uses the "shared memory" + "configuration" + "partition management" method between partitions to achieve dynamic adjustment of partition resource division during the operation of the real-time system. Figure 3 As shown, the real-time system includes: a first partition, at least one second partition, and a shared memory;

[0070] Each of the second partitions is configured with resources used by it, and the corresponding resource configuration is written into the share for storage;

[0071] The first partition runs a method for dynamically allocating resources during real-time system operation.

[0072] In specific implementation, the first partition is a fixed management partition: Management VM, referred to as MVM. Except for this management partition (MVM), the second partitions are all ordinary partitions (VM). Users can add, delete, and configure each ordinary partition as they wish. The management partition MVM must be running when the system is up and is indispensable. This partition is not a business partition and does not implement business logic. The management partition has the following permissions: start (start), stop (stop), suspend (suspend), and resume (resume) other second partitions. During system operation, MVM can initiate a request for resource changes to each second partition VM. MVM maintains the resource configuration table of each second partition VM in SHM, and maintains and judges the changes.

[0073] On the hardware device, a shared memory (SHM) is allocated as the global shared memory. This shared memory can be accessed and modified by all partitions (the first partition and the second partition) at the same time. After the MVM is started, it will always monitor the content of the SHM.

[0074] When the system is running and the second partition VM is initialized, each second partition VM partition actively writes its current resource configuration (including 1. the CPU core number on which the VM runs; 2. the memory start address, end address, and size of the VM; 3. the peripherals assigned to the VM, as well as the base address and size of the peripherals; 4. the interrupt number assigned to the VM) into the shared memory SHM. After the system's second partition VM is initialized, SHM completes the collection and filling of resource information for each second partition VM, and writes an end flag. At this point, the MVM determines that the second partition VM information has been collected by monitoring the end flag, reads and parses the resource configuration information of each second partition from the SHM, and forms a total resource configuration table that is stored in the SHM for unified management.

[0075] The following describes in detail how the first partition implements dynamic resource allocation during real-time system operation.

[0076] [Implementation example of a method for dynamically allocating resources during real-time system operation]

[0077] The present application provides a method for dynamically allocating resources during real-time system operation, such as Figure 4 As shown, the method includes:

[0078] S410: Obtain a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed;

[0079] S420: Reading the stored current resource configuration of each second partition from the shared memory;

[0080] S430: judging whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition;

[0081] S440: When the resource change is reasonable, update the current resource configuration of the at least one second partition corresponding to the shared memory according to the resource configuration to be changed, and enable the at least one second partition to execute the resource configuration change according to the updated current resource configuration.

[0082] In some embodiments, it also includes:

[0083] When resource changes are unreasonable, reject the changes.

[0084] In some embodiments, the above-mentioned method for dynamically allocating resources during operation of a real-time system is executed in a first partition, and the first partition is used to manage the shared memory and the second partitions.

[0085] In some embodiments, the current resource configuration of each second partition stored in the shared memory is written by each second partition.

[0086] In specific implementation, when the second partition VM is initialized, each second partition VM partition actively writes its current resource configuration (including 1. the CPU core number of the VM; 2. the memory start address, end address, and size of the VM; 3. the peripherals assigned to the VM, as well as the base address and size of the peripherals; 4. the interrupt number assigned to the VM) into the shared memory SHM. Among them, the current resource configuration is stored in the form of a configuration table and written into the shared memory SHM.

[0087] In specific implementation, in step S401, if the user wants to change the resources of the second partition, a resource change request needs to be generated. The resource change request includes the resource configuration to be changed, such as Figure 5As shown, the left side shows the resource configuration before the change, and the right side shows the resource configuration after the change. Then the first partition obtains the resource change request for subsequent processing.

[0088] In some embodiments, judging whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition includes:

[0089] Determine the deletion of resources and / or the addition of resources in the resource change according to the resource configuration to be changed and the current resource configuration of each second partition;

[0090] When it is determined that only resource deletion is included, whether the resource deletion is reasonable or not is determined, and if not, the change is rejected; if reasonable, the change is allowed;

[0091] When it is determined that only the added resources are included, whether the added resources are reasonable or not is determined, if not, the change is rejected; if reasonable, the change is allowed;

[0092] When determining whether the resource deletion includes resource deletion and resource addition, determine whether the resource deletion is reasonable. If the resource deletion is unreasonable, reject the change. If the resource deletion is reasonable, determine whether the resource addition is reasonable. If the resource addition is unreasonable, reject the change. If the resource addition is reasonable, allow the change.

[0093] In specific implementation, when only deleting resources is involved, it is only necessary to determine whether deleting resources is reasonable. If it is reasonable, the change is allowed, otherwise the change is rejected. When only adding resources is involved, it is only necessary to determine whether adding resources is reasonable. If it is reasonable, the change is allowed, otherwise the change is rejected. When both deleting resources and adding resources are included, it is necessary to determine whether deleting resources is reasonable first. When deleting resources is reasonable, it is determined whether adding resources is reasonable. When deleting resources is unreasonable, the change is rejected, and the subsequent determination of whether adding resources is reasonable will not be made. Changes are allowed only when both deleting resources and adding resources are determined to be reasonable.

[0094] In some embodiments, the resource configuration to be changed includes one or more of the following resources: CPU cores occupied by the partition, memory occupied by the partition, peripherals occupied by the partition, and interrupt numbers occupied by the partition;

[0095] The determining whether the resource change is reasonable includes at least one of the following:

[0096] Determine whether the CPU cores occupied by the partition are deleted. If the CPU cores occupied by the partition are deleted, it is unreasonable. If the CPU cores occupied by the partition are not deleted, it is reasonable.

[0097] Determine whether the memory occupied by the partition is deleted. If the memory occupied by the partition is deleted, it is unreasonable. If the memory occupied by the partition is not deleted, it is reasonable.

[0098] Determine whether the memory occupied by the added partition conflicts. If the address of the memory occupied by the added partition does not overlap with the address of the memory occupied by other second partitions, and the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is smaller than the memory size of the real-time system, then there is no conflict. If the address of the memory occupied by the added partition overlaps with the address of the memory occupied by other second partitions, and / or the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is larger than the memory size of the real-time system, then there is a conflict.

[0099] Determine whether the peripherals occupied by the added partition are reasonable. If the peripherals occupied by the added partition exist in the real-time system, it is reasonable. If the peripherals occupied by the added partition do not exist in the real-time system, it is unreasonable.

[0100] Determine whether the IO multiplexing of the peripherals occupied by the added partition conflicts. If the peripherals occupied by the added partition are peripherals occupied by other second partitions, then there is a conflict. If the peripherals occupied by the added partition are not peripherals occupied by other second partitions, then there is no conflict.

[0101] Determine whether the base address of the peripheral occupied by the added partition is within the available address range of the real-time system, if yes, it is reasonable, if not, it is unreasonable;

[0102] Determine whether the interrupt number occupied by the added partition conflicts. If the interrupt number occupied by the added partition is repeated with the interrupt number in other second partitions, then there is a conflict. If the interrupt number occupied by the added partition is not repeated with the interrupt number in other second partitions, then there is no conflict.

[0103] In specific implementation, the resource change for each second partition may be resource deletion or resource addition (which may include adding new resources or changing the range and size of existing resources). When executing step S430, the resource deletion and / or resource addition in the resource change may be determined based on the resource configuration to be changed and the current resource configuration of each second partition. Then, it is determined whether the resource deletion and / or resource addition is reasonable. The specific determination is as follows:

[0104] (1) CPU cores occupied by partitions: Deletion is not allowed. Therefore, when changing resources, you must first determine whether the CPU cores occupied by the partitions have been deleted. If they have been deleted, it means that the deletion is unreasonable and the resource change is rejected. Changes and replacements are allowed. If changes and replacements are made, they must be CPU cores allowed by the real-time system.

[0105] (2) Memory occupied by the partition: Deletion is not allowed, so first determine whether the memory occupied by the partition has been deleted. If it has been deleted, it means that the deletion is unreasonable and the resource change is rejected.

[0106] It allows modification and replacement, and allows modification of memory size, memory start address and end address. So if it is not deleted, then determine whether it is changed. If it is changed, then determine whether the memory conflicts. Including:

[0107] (21) Some peripherals need to occupy memory. MVM determines whether the size of the modified memory is within the allowable range, that is, the modified memory size is added to the memory size of other second partitions and compared with the memory size of the entire system. If it is smaller than the memory size of the entire system, it means that the modified memory size is within the allowable range and there is no conflict. If it is larger than the memory size of the entire system, it means that the modified memory size is not within the allowable range and there is a conflict.

[0108] (22) Determine whether the occupied memory overlaps with the address of the memory occupied by other existing second partitions, that is, determine whether the start address and end address of the modified memory overlap with the start address and end address of the memory occupied by other existing second partitions. If there is no overlap, it means there is no conflict. If there is overlap, it means there is a conflict.

[0109] If there is no conflict, then the MVM can update the configuration table in the SHM.

[0110] The CPU core and memory are judged first, and then the deletion / addition of peripherals is judged.

[0111] (3) Peripherals occupied by the partition, including the base address and size of the peripherals. Peripherals can be deleted or added. There is no need to judge whether the deletion of peripherals is reasonable, and the deletion of peripherals can be executed directly. However, the rationality of adding peripherals needs to be judged:

[0112] (31) Determine whether the newly allocated peripheral resources are reasonable? The newly allocated peripheral resources must be peripherals existing in this real-time system, otherwise they will be rejected.

[0113] (32) Determine whether there is a peripheral IO reuse conflict? Strictly abide by the concept of time-sharing partitions. The same peripherals are not allowed to exist in a VM. If a second partition (VM) is assigned the same peripheral, it is judged as a peripheral IO reuse conflict. If such a conflict is detected, the real-time system should reject the resource change request to ensure the stability and reliability of the real-time system.

[0114] (33) Is the peripheral base address reasonable? The peripheral base address refers to the starting address of a peripheral in the memory mapping space or I / O address space of a computer system. The peripheral base address must be within the available address range of the real-time system.

[0115] (4) Interrupt numbers occupied by partitions: For time-sharing partition systems, interrupt numbers are distributed. Many peripherals of each VM may have their own interrupt numbers. As peripherals are deleted / added, interrupt numbers need to be deleted / added accordingly. The number of peripherals and interrupt numbers in each second partition should be the same. The interrupt numbers in two second partitions should not be repeated (i.e., they should not conflict). Conflicts in interrupt numbers will cause the drivers of the two peripherals to crash. So how do you determine whether the interrupt number of the new peripheral conflicts? That is, determine whether the interrupt number occupied by the modified partition is repeated with the interrupt number in other second partitions. If so, it means that there is a conflict in the interrupt number, and MVM directly refuses to change.

[0116] The purpose of the above judgment process is to ensure that resource changes will not have a negative impact on the stability and performance of the system. Through reasonable judgment, the system can avoid potential problems caused by improper resource allocation, such as resource conflicts, system overload or service interruption.

[0117] In some embodiments, causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes:

[0118] When including deleting resources, causing the at least one second partition to delete resources according to the deleting resources;

[0119] Write the current running context data to the shared memory and stop running;

[0120] Read the updated current resource configuration from the shared memory for initialization;

[0121] After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

[0122] During specific implementation, in step 440, the following operations are performed for the deletion and change of resources: MVM updates the configuration table of the changed VM in SHM, notifies the changed VM, MVM stops the running of the changed VM, VM ends the device-related threads in the VM, VM uninstalls the driver of the deleted resource, releases the memory, and then the VM is suspended, the VM copies the current running context data to the shared memory SHM (including process context, interrupt context), stops the VM running, the VM is restarted, the VM obtains the new resource configuration (in the form of a configuration table) from the SHM, and initializes the new configuration. After the initialization is completed, the VM is suspended and the running context is copied from the SHM to the VM, the VM running state is restored, and the resource deletion is completed.

[0123] In some embodiments, causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes:

[0124] When it includes adding resources, causing the at least one second partition to write the current running context data into the shared memory and stop running;

[0125] Read the updated current resource configuration from the shared memory for initialization;

[0126] After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

[0127] During specific implementation, in step 440, the following operations are performed for the addition and change of resources: MVM updates the configuration table of the changed VM in SHM, MVM notifies the changed VM, VM is suspended, and the current running context data is copied to the shared memory SHM (including process context, interrupt context), MVM stops the running of the changed VM, VM is restarted, VM obtains the new resource configuration (in the form of a configuration table) from SHM, and initializes the new configuration. After initialization, VM is suspended, and the running context is copied from SHM to VM, the VM running state is restored, and the addition of resources is completed.

[0128] The above-mentioned updating of the configuration table of the corresponding VM in SHM is performed after determining that the resource change is reasonable, that is, before executing the resource deletion / addition change operation, or it can be performed during the resource deletion / addition change operation, that is, after the VM copies the current running context data to the shared memory SHM and stops the VM operation.

[0129] From the above, the present application obtains the resource change request of the partition to be changed, and combines it with the current resource configuration of each second partition stored in the shared memory to determine whether the resource change is reasonable. When it is reasonable, the shared memory and the current resource configuration in the partition to be changed are updated, and the partition to be changed is allowed to execute the resource configuration change according to the updated current resource configuration. The present application allows the operating system to quickly and dynamically adjust the resource configuration of the partition at runtime without restarting the entire system, which can improve the resource allocation of time-sharing partitions. The shared memory is used to save and restore the running status of the partition, ensuring that the running status of the partition can be effectively managed and restored during the resource change process. At the same time, the use of shared memory also improves the switching efficiency, and the real-time performance of the real-time system is guaranteed to a certain extent. The process is simple and saves time.

[0130] [Specific implementation method of the method for dynamically allocating resources during real-time system operation]

[0131] The embodiment of the present application provides a specific implementation process of a method for dynamically allocating resources during operation of a real-time system. The application scenarios of the method are as follows:

[0132] The total resources of the real-time system are as follows:

[0133] CPU core: CPU core 1, CPU core 2, CPU core 3;

[0134] Peripherals: GPIO0, GPIO1;

[0135] UART0, UART1, UART2, UART3;

[0136] SPI0, SPI1;

[0137] I2C0, I2C1;

[0138] USB0;

[0139] GMAC0;

[0140] Memory: Total RAM (1000MB)

[0141] Virtual interrupts: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.

[0142] The real-time system consists of three partitions: VM1, VM2, and VM3. The initial resource configuration for VM1, VM2, and VM3 is as follows:

[0143] The resources of VM1 include: CPU core 1, RAM (100MB), GPIO0, SPI0, UART0, USB0, GMAC0, virtual interrupts 1, 2, 3, 4, 5;

[0144] VM2's resources include: CPU core 2, RAM (200MB), GPIO1, SPI1, UART1, I2C0, virtual interrupts 6, 7, 8, 9;

[0145] The resources of VM3 include: CPU core 3, RAM (100MB), UART2, UART3, I2C1, virtual interrupts 10, 11, 12.

[0146] When a user wants to modify the resource configuration of any partition, the specific process of the method in the embodiment of the present application is as follows: Figure 5 As shown, including:

[0147] 1. First, after the system is initialized and runs, the three partitions (VM1, VM2, and VM3) write their current resource configurations into the shared memory in the form of configuration tables. After the current resource configurations are written, the end mark is written into the shared memory.

[0148] 2. After the management partition detects the end mark, it reads the current resource configuration of each of the three partitions (VM1, VM2, and VM3) from the shared memory, parses it to form a resource configuration summary table, and sends it to the shared memory for storage.

[0149] Then the user wants to change the resource configuration of VM1 and VM2. The specific changes are as follows:

[0150] The resources of VM1 after the change include: CPU core 1, RAM (200MB), GPIO0, UART0, UART1, GMAC0, virtual interrupts 1, 2, 3, 4;

[0151] The resources of VM2 after the change include: CPU core 2, RAM (200MB), GPIO1, SPI0, SPI1, I2C0, USB0, virtual interrupts 5, 6, 7, 8, 9.

[0152] 3. The management partition receives the resource change request of VM1 submitted by the user (the request includes: occupying CPU core 1, occupying peripherals GPIO0, UART0, UART1, GMAC0, occupying 200MB of RAM, occupying virtual interrupts 1, 2, 3, 4) and the resource change request of VM2 (the request includes: occupying CPU core 2, occupying peripherals GPIO1, SPI0, SPI1, I2C0, USB0, occupying 200MB of RAM, occupying virtual interrupts 5, 6, 7, 8, 9), and compares the resource change request of VM1 and the resource change request of VM2 with the resource configuration summary table in the shared memory to obtain the expected change information of VM1 and VM2, as shown below:

[0153] Expected changes of VM1: RAM (100MB) is changed to RAM (200MB), peripherals SPI0 and USB0 are deleted, peripheral UART1 is added, and the corresponding virtual interrupts are reallocated to 1, 2, 3, and 4;

[0154] Expected changes to VM2: delete peripheral UART1, add peripherals SPI0 and USB0, and reallocate the corresponding virtual interrupts to 5, 6, 7, 8, and 9.

[0155] 4. The management partition determines whether the resource change requests of VM1 and VM2 are reasonable based on the resource change requests of VM1 and VM2 and the expected change information of VM1 and VM2. The specific judgment steps are as follows:

[0156] 41. Determine whether there is a CPU core in the resource change request of VM1 and VM2 and whether the CPU core exists in the system. If there is a CPU core, it means that it has not been deleted. If the CPU core exists in the system, it means that the change is reasonable and there is no change;

[0157] 42. Determine whether the RAM of VM1 and VM2 has changed. If the RAM of VM1 is found to be enlarged, determine whether the size of the RAM of VM1 is reasonable. The sum of the size of the RAM of VM1, the size of the RAM of VM2, and the size of the RAM of VM3 is 500M, which is less than the total system size of 1G, indicating that the size change of the RAM of VM1 is reasonable. At the same time, determine whether the starting address of the RAM of VM1 is reasonable. If it is reasonable, the RAM change of VM1 is allowed and the mark is allowed to change.

[0158] 43. Make sure that the peripherals SPI0 and USB0 deleted by VM1 are reasonable, and the peripheral UART1 deleted by VM2 is reasonable, and mark them as allowed to be deleted.

[0159] 44. Determine whether the newly added peripherals UART1 of VM1 and the newly added peripherals SPI0 and USB0 of VM2 are reasonable. The newly added peripherals UART1, SPI0 and USB0 exist in the system, and the peripherals SPI0, USB0 and UART1 are not allocated after being deleted, and can be allocated to any VM. After VM1 adds the peripheral UART1, it does not conflict with the IO multiplexing of its own GPIO0, UART0 and GMAC0. After VM2 adds the peripherals SPI0 and USB0, it does not conflict with the IO multiplexing of its own GPIO1, SPI1 and I2C0. Therefore, the newly added peripherals are all reasonable and are marked as allowed to be added.

[0160] 45. Determine whether the virtual interrupt numbers of VM1 and VM2 are reasonable. There are 4 virtual interrupt numbers corresponding to 4 peripherals in VM1, and 5 virtual interrupt numbers corresponding to 5 peripherals in VM2. The 4 virtual interrupt numbers in VM1 are different from the 5 virtual interrupt numbers in VM2 and the 3 virtual interrupt numbers in VM3. Therefore, there is no conflict in the virtual interrupt numbers and they are marked as allowed to be changed.

[0161] At this point, the changes of VM1 and VM2 have been judged to be all reasonable, and the new resource configurations in the resource change requests of VM1 and VM2 are written into the shared memory to replace the original resource configurations of VM1 and VM2 in the shared memory.

[0162] 5. Manage the partition and implement the change. Send the change notification to VM1 and VM2 through shared memory to make the change. The specific change steps are as follows:

[0163] 51. Delete the peripherals SPI0 and USB0 of VM1, stop the related threads of peripherals SPI0 and USB0, uninstall the drivers of peripherals SPI0 and USB0, remove the virtual interrupts corresponding to peripherals SPI0 and USB0, delete the peripheral UART1 of VM2, stop the related threads of peripheral UART1, uninstall the driver of peripheral UART1, and remove the virtual interrupts corresponding to peripheral UART1;

[0164] 52. Suspend VM1 and VM2. VM1 and VM2 copy the current running context data to the shared memory and stop running VM1 and VM2.

[0165] 53. Restart VM1 and VM2. VM1 and VM2 read the new resource configuration from the shared memory for initialization. VM1 includes initializing the changed RAM, loading the driver and initialization of the newly added peripheral UART1, and initializing the virtual interrupt. VM2 includes loading the driver and initialization of the newly added peripherals SPI0 and USB0, and initializing the virtual interrupt. After the initialization is completed, VM1 and VM2 are suspended, and then the corresponding running context data is read from the shared memory to resume running, and the resource change is completed.

[0166] [Embodiment of the device for dynamically allocating resources during operation of the real-time system of the present application]

[0167] like Figure 6 As shown, the embodiment of the present application provides a device for dynamically allocating resources during operation of a real-time system, and the device for dynamically allocating resources during operation of a real-time system can be used to implement the method for dynamically allocating resources during operation of a real-time system in the above embodiment, such as Figure 6 As shown, the device for dynamically allocating resources during operation of the real-time system comprises a resource change request acquisition module 610 , a current resource configuration reading module 620 , a change rationality judgment module 630 , and a change module 640 .

[0168] A resource change request acquisition module, used to acquire a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed;

[0169] A current resource configuration reading module, used for reading the current resource configuration of each second partition stored in the shared memory;

[0170] A change rationality judgment module, used to judge whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition;

[0171] The change module is used to update the current resource configuration of the at least one second partition corresponding to the shared memory according to the resource configuration to be changed when the resource change is reasonable, and enable the at least one second partition to execute the resource configuration change according to the updated current resource configuration.

[0172] For details, please refer to the detailed description in the method embodiment, which will not be repeated here.

[0173] [Embodiment of the computing device of the present application]

[0174] Figure 7900 is a schematic structural diagram of a computing device 900 provided in an embodiment of the present application. The computing device can be used as a dynamic resource allocation device in real-time system operation, and executes each optional embodiment of the method for dynamic resource allocation in real-time system operation. The computing device can be a terminal, or a chip or chip system inside the terminal. Figure 7 As shown, the computing device 900 includes: a processor 910 , a memory 920 , and a communication interface 930 .

[0175] It should be understood that Figure 7 The communication interface 930 in the computing device 900 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.

[0176] The processor 910 may be connected to a memory 920. The memory 920 may be used to store the program code and data. Therefore, the memory 920 may be a storage unit inside the processor 910, or an external storage unit independent of the processor 910, or a component including a storage unit inside the processor 910 and an external storage unit independent of the processor 910.

[0177] Optionally, the computing device 900 may further include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.

[0178] It should be understood that in the embodiment of the present application, the processor 910 may adopt a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Alternatively, the processor 910 may adopt one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.

[0179] The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include a nonvolatile random access memory. For example, the processor 910 may also store information on the device type.

[0180] When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any operation step of the above method and any optional embodiment thereof.

[0181] It should be understood that the computing device 900 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.

[0182] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0184] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0187] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0188] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the above method, which includes at least one of the solutions described in the above embodiments.

[0189] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.

[0190] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0191] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0192] Computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0193] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0194] In the above description, the numbers representing the steps, such as S6, S120, etc., do not necessarily mean that the steps will be executed accordingly. If permitted, the order of the previous and next steps can be interchanged, or they can be executed simultaneously.

[0195] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.

[0196] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.

[0197] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.

Claims

1. A method for dynamically allocating resources during real-time system operation, characterized in that: include: Obtaining a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed; Reading the stored current resource configuration of each second partition from the shared memory; Judging whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition; When the resource change is reasonable, the current resource configuration of the at least one second partition corresponding to the shared memory is updated according to the resource configuration to be changed, and the at least one second partition executes the resource configuration change according to the updated current resource configuration.

2. The method according to claim 1, characterized in that Also includes: When resource changes are unreasonable, reject the changes.

3. The method according to claim 1, characterized in that The determining whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition includes: Determine the deletion of resources and / or the addition of resources in the resource change according to the resource configuration to be changed and the current resource configuration of each second partition; When it is determined that only resource deletion is included, whether the resource deletion is reasonable or not is determined, and if not, the change is rejected; if reasonable, the change is allowed; When it is determined that only the added resources are included, whether the added resources are reasonable or not is determined, if not, the change is rejected; if reasonable, the change is allowed; When determining whether the resource deletion includes resource deletion and resource addition, determine whether the resource deletion is reasonable. If the resource deletion is unreasonable, reject the change. If the resource deletion is reasonable, determine whether the resource addition is reasonable. If the resource addition is unreasonable, reject the change. If the resource addition is reasonable, allow the change.

4. The method according to any one of claims 1 to 3, characterized in that: The resource configuration to be changed includes one or more of the following resources: CPU cores occupied by the partition, memory occupied by the partition, peripherals occupied by the partition, and interrupt numbers occupied by the partition; The determining whether the resource change is reasonable includes at least one of the following: Determine whether the CPU cores occupied by the partition are deleted. If the CPU cores occupied by the partition are deleted, it is unreasonable. If the CPU cores occupied by the partition are not deleted, it is reasonable. Determine whether the memory occupied by the partition is deleted. If the memory occupied by the partition is deleted, it is unreasonable. If the memory occupied by the partition is not deleted, it is reasonable. Determine whether the memory occupied by the added partition conflicts. If the address of the memory occupied by the added partition does not overlap with the address of the memory occupied by other second partitions, and the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is smaller than the memory size of the real-time system, then there is no conflict. If the address of the memory occupied by the added partition overlaps with the address of the memory occupied by other second partitions, and / or the sum of the sizes of the memory occupied by the added partition and the memory occupied by other second partitions is larger than the memory size of the real-time system, then there is a conflict. Determine whether the peripherals occupied by the added partition are reasonable. If the peripherals occupied by the added partition exist in the real-time system, it is reasonable. If the peripherals occupied by the added partition do not exist in the real-time system, it is unreasonable. Determine whether the IO multiplexing of the peripherals occupied by the added partition conflicts. If the peripherals occupied by the added partition are peripherals occupied by other second partitions, then there is a conflict. If the peripherals occupied by the added partition are not peripherals occupied by other second partitions, then there is no conflict. Determine whether the base address of the peripheral occupied by the added partition is within the available address range of the real-time system, if yes, it is reasonable, if not, it is unreasonable; Determine whether the interrupt number occupied by the added partition conflicts. If the interrupt number occupied by the added partition is repeated with the interrupt number in other second partitions, then there is a conflict. If the interrupt number occupied by the added partition is not repeated with the interrupt number in other second partitions, then there is no conflict.

5. The method according to claim 3, characterized in that: The causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes: When including deleting resources, causing the at least one second partition to delete resources according to the deleting resources; Write the current running context data to the shared memory and stop running; Read the updated current resource configuration from the shared memory for initialization; After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

6. The method according to claim 3, characterized in that: The causing the at least one second partition to perform a resource configuration change according to the updated current resource configuration includes: When it includes adding resources, causing the at least one second partition to write the current running context data into the shared memory and stop running; Read the updated current resource configuration from the shared memory for initialization; After reading the current execution context data from the shared memory, the execution is resumed to complete the change of resource configuration.

7. The method according to claim 1, characterized in that The current resource configuration of each second partition stored in the shared memory is written by each second partition.

8. The method according to claim 1, characterized in that The method for dynamically allocating resources during operation of a real-time system is run on a first partition, and the first partition is used to manage the shared memory and the second partitions.

9. A device for dynamically allocating resources during real-time system operation, characterized in that: include: A resource change request acquisition module, used to acquire a resource change request for at least one of the second partitions, wherein the resource change request includes a resource configuration to be changed; A current resource configuration reading module, used for reading the current resource configuration of each second partition stored in the shared memory; A change rationality judgment module, used to judge whether the resource change is reasonable according to the resource configuration to be changed and the current resource configuration of each second partition; The change module is used to update the current resource configuration of the at least one second partition corresponding to the shared memory according to the resource configuration to be changed when the resource change is reasonable, and enable the at least one second partition to execute the resource configuration change according to the updated current resource configuration.

10. A real-time system, characterized in that include: A first partition, at least one second partition, and a shared memory; Each of the second partitions is configured with resources used by it, and the corresponding resource configuration is written into the share for storage; The method according to any one of claims 1 to 8 is executed on the first partition.

11. A computing device, characterized in that: include: processor, and A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Storage management calculator, and storage management method

    CN104919429A

  • Virtual resource allocation method and system, server, electronic equipment and storage medium

    CN111711648A

  • Intersystem resource occupation method and device, storage medium and electronic device

    CN116257364A

  • Resource management method, computing device and computer readable storage medium

    CN116974690A

  • Resource allocation method, device and equipment, computer storage medium and vehicle

    CN118051319A

Cited By

  • Resource management method and device, storage medium and program product

    CN120085939A