A multi-core operating system based on hardware cloning technology and a control method thereof

By using hardware cloning technology to abstract and map resource regions in multi-core chips, the problem of wasted Flash resources in multi-core chips is solved, and the real-time performance and resource utilization efficiency of the operating system are improved.

CN115794680BActive Publication Date: 2026-03-27ISOFT INFRASTRUCTURE SOFTWARE
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional single-core chips cannot meet the needs of complex domain controllers in the automotive electronics field, leading to increased costs, and multi-core chips also suffer from the problem of wasted Flash resources.

Method used

Hardware cloning technology is used to abstract the physical layer resource area of ​​a multi-core chip into a cloned resource area. By mapping the identification information of the processor core to the physical resource address, dynamic allocation and sharing of resources can be achieved, reducing the number of copies of the operating system code to be stored.

Benefits of technology

It saves Flash storage space and improves the real-time performance and resource utilization efficiency of the operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115794680B_ABST
    Figure CN115794680B_ABST
Patent Text Reader

Abstract

The application provides a multi-core operating system based on a hardware cloning technology and a control method thereof, comprising: a multi-core chip comprising a plurality of processor cores, each processor core accessing a predetermined logical address when accessing a resource and sending a resource access request containing self-identification information; a cloned resource region, which is preset with a mapping relationship between the identification information and a physical resource address, is used for mapping to a corresponding physical resource address according to the resource access request and accessing a physical layer resource region corresponding to the physical resource address to obtain corresponding resource data and send the resource data to the processor core. Advantageous effects: the application abstracts a plurality of physical layer resource regions corresponding to the multi-core chip into a cloned resource region based on the cloning technology, and the corresponding physical layer resource region is accessed through the mapping relationship between the identification information of each processor core and the physical resource address, thereby greatly saving the storage space of the Flash and avoiding resource waste.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of operating system technology, and in particular to a multi-core operating system based on hardware cloning technology and its control method. Background Technology

[0002] With the rapid development of the automotive electronics field, traditional single-core chips can no longer meet the technical requirements of the automotive electronics field. In particular, as various manufacturers are launching domain controller solutions, the limitations of single-core chips are becoming increasingly apparent. If a more complex domain controller is to be built directly on a traditional single-core chip, a processor with a higher clock frequency is required, which will increase the cost of the corresponding controller.

[0003] Currently, leveraging the advantages of multi-core processors allows tasks in a domain controller to be distributed across different cores, fully utilizing the efficient parallel processing capabilities of multi-core processors to meet the real-time requirements of the domain controller. For example... Figure 1 The diagram shows a classic multi-core chip model in the automotive electronics field, which includes multiple central processing units (CPU0, CPU1...CPUn) responsible for reading instructions, decoding instructions, and executing instructions. Each processor core corresponds to a random access memory (RAM1, RAM1...RAMn). The flash memory is shared by multiple processor cores. The peripheral area is the chip's peripheral area. A multi-core real-time operating system is used to manage the multi-core chip. Tasks on the multi-cores are defined as statically deployed, preventing dynamic inter-core migration, while allowing inter-core interaction between multiple cores.

[0004] Since each processor core needs to compile and run an independent copy of the operating system code, the Flash memory in a multi-core chip will inevitably need to store several duplicate copies of the operating system code, resulting in a waste of Flash resources on the multi-core chip. Summary of the Invention

[0005] To address the above technical problems, this invention provides a multi-core operating system based on hardware cloning technology and its control method.

[0006] The technical problem solved by this invention can be achieved by the following technical solutions:

[0007] A multi-core operating system based on hardware cloning technology, comprising:

[0008] A multi-core chip includes multiple processor cores, each of which accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself.

[0009] The cloned resource regions are connected to the multiple processor cores respectively. The cloned resource regions have a pre-set mapping relationship between the identification information and the physical resource address. They are used to map the resource access request to the corresponding physical resource address and access the physical layer resource region corresponding to the physical resource address to obtain the corresponding resource data and send it to the processor core.

[0010] Preferably, the physical layer resource regions correspond one-to-one with the processor cores.

[0011] Preferably, it further includes:

[0012] A storage unit is provided for storing a running script that can be shared by the multiple processor cores. The running script performs corresponding logical control of the processor cores based on the identification information.

[0013] Preferably, each of the processor cores comprises:

[0014] The storage module is used to access the predetermined logical address to store the configuration information of each processor core into the corresponding physical layer resource area.

[0015] Preferably, each of the processor cores further includes:

[0016] The query module is used to access the predetermined logical address and query the configuration information in the corresponding physical layer resource area.

[0017] This invention also provides a control method for a multi-core operating system based on hardware cloning technology, applied to the aforementioned multi-core operating system based on hardware cloning technology, the method comprising:

[0018] Each processor core of a multi-core chip accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself.

[0019] The cloned resource region receives resource access requests and maps them to the corresponding physical resource address according to the preset mapping relationship between the identifier information and the physical resource address. It then accesses the physical layer resource region corresponding to the physical resource address to obtain the corresponding resource data and sends it to the processor core.

[0020] Preferably, the physical layer resource regions correspond one-to-one with the processor cores.

[0021] Preferably, each of the processor cores further provides a storage unit for storing a control script that can be shared by the multiple processor cores. The control script performs corresponding logical control of the processor core according to the identification information.

[0022] Preferably, each processor core further provides a storage module for accessing the predetermined logical address to store the configuration information of each processor core into the physical layer resource area corresponding to each processor core.

[0023] Preferably, each processor core also provides a query module for accessing the predetermined logical address to query the configuration information from the physical layer resource area corresponding to each processor core.

[0024] The advantages or beneficial effects of the technical solution of this invention are as follows:

[0025] This invention uses cloning technology to abstract multiple physical layer resource regions corresponding to a multi-core chip into a cloned resource region. By mapping the identification information of each processor core to the physical resource address, the corresponding physical layer resource region can be accessed, which greatly saves Flash storage space and solves the problem of Flash resource waste. Attached Figure Description

[0026] Figure 1 This is a classic multi-core chip model diagram in the field of automotive electronics in the existing technology;

[0027] Figure 2 This is a schematic diagram of the structure of the cloning layer and physical layer in a multi-core operating system based on hardware cloning technology, as shown in a preferred embodiment of the present invention.

[0028] Figure 3 This is a flowchart illustrating a control method for a multi-core operating system based on hardware cloning technology, as described in a preferred embodiment of the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0031] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.

[0032] The cloning technology used in this invention is a hardware technology provided by the chip, similar to the Memory Management Unit (MMU) technology. Chips supporting cloning technology plan cloning resource regions for resource data. The addresses in these cloning resource regions form a one-to-one mapping relationship with the private RAM address regions of each processor core. When a variable is defined in a cloning resource region, and a processor core operates on that cloned variable, the cloning technology will operate within the space of its actual corresponding private RAM address.

[0033] Example 1

[0034] See Figure 2 In a preferred embodiment of the present invention, based on the above-mentioned problems existing in the prior art, a multi-core operating system based on hardware cloning technology is provided, comprising:

[0035] A multi-core chip (not shown in the figure) includes multiple processor cores (or kernels). Each processor core accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself.

[0036] The aforementioned processor cores are connected via a parallel bus, and each processor core corresponds to a unique identifier.

[0037] The cloned resource region 1 is connected to multiple processor cores. The cloned resource region 1 has a pre-set mapping relationship between identification information and physical resource addresses. It is used to map to the corresponding physical resource address according to the resource access request, and access the physical layer resource region (21, 22...2n) corresponding to the physical resource address to obtain the corresponding resource data and send it to the processor core.

[0038] Specifically, this invention implements a multi-core operating system based on cloning technology. Technically, it is divided into a cloning layer and a physical layer. In the cloning layer, the physical layer resource regions (21, 22…2n) of multiple processor cores can be abstracted into a single clone resource region 1. Within clone resource region 1, a one-to-one mapping relationship is formed between the processor core's identification information and the physical layer resource regions (21, 22…2n) of each processor core's private physical resource addresses. When a processor core's resource access request arrives at clone resource region 1, it is automatically mapped to the corresponding actual physical layer resource region (21, 22…2n), thus forming core-specific control of the multi-core real-time operating system. Simultaneously, in a multi-core operating system implemented based on cloning technology, only one copy of the multi-core operating system code is needed to manage the multi-core chip, reducing the number of copies of the operating system code stored in the Flash memory of existing multi-core operating systems. This significantly saves Flash storage space, solves the problem of Flash resource waste, and improves the real-time performance of the operating system.

[0039] In a preferred embodiment, the physical layer resource regions (21, 22...2n) correspond one-to-one with the processor cores.

[0040] Specifically, in this embodiment, the physical resource region is the actual RAM region of each processor core, specifically including, for example: Figure 1 The random access memory (RAM1, RAM1...RAMn) shown is one-to-one with the processor core, so that each processor core can read and write at any time, and the data retrieval or storage speed is very fast.

[0041] In a preferred embodiment, it further includes:

[0042] A storage unit is used to store running scripts that can be shared by multiple processor cores. The running scripts perform logical control of the corresponding processor cores based on the identification information.

[0043] Specifically, this storage unit can be implemented using FLASH memory, serving as a shared storage space for multiple processor cores.

[0044] This invention addresses the problem of wasted FLASH resources caused by storing multiple copies of operating system code in FLASH memory for use by various processor cores. In this embodiment, because the multi-core operating system is implemented using cloning technology, a single running script can be used to manage the multi-core chip, saving FLASH storage space and improving the real-time performance of the operating system.

[0045] In a preferred embodiment, each processor core includes:

[0046] The storage module is used to access predetermined logical addresses to store the configuration information of each processor core into the corresponding physical layer resource areas (21, 22...2n).

[0047] Specifically, in this embodiment, the configuration information of the private operating system (OS) for each processor core is stored by cloning variables to perform core-specific storage.

[0048] The pseudocode is as follows:

[0049] CASE 0 core: TaskCfg=TaskCfg_Core0

[0050] CASE 1 core: TaskCfg=TaskCfg_Core1

[0051] CASE 2 core: TaskCfg=TaskCfg_Core2 ...

[0053] CASE n core:TaskCfg=TaskCfg_Coren.

[0054] In a preferred embodiment, each processor core further includes:

[0055] The query module is used to access a predetermined logical address and retrieve configuration information from the corresponding physical layer resource area (21, 22...2n).

[0056] Specifically, in this embodiment, when the operating system queries the configuration information of each processor core, it needs to use cloned variables to query the data.

[0057] Specifically, the management behavior of multi-core chips includes at least storage and querying. The aforementioned storage and querying variables must first access the cloned resource area and be implemented through cloned variables. In fact, the operation is carried out in the physical layer resource area corresponding to the processor core.

[0058] Example 2

[0059] See Figure 3 The present invention also provides a control method for a multi-core operating system based on hardware cloning technology, applied to the multi-core operating system based on hardware cloning technology as described above, the method comprising:

[0060] A1, each processor core of a multi-core chip accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself.

[0061] A2, clone resource region 1 receives resource access requests, maps them to the corresponding physical resource addresses according to the preset mapping relationship between identification information and physical resource addresses, and accesses the physical layer resource regions (21, 22...2n) corresponding to the physical resource addresses to obtain the corresponding resource data and send it to the processor core.

[0062] Specifically, this invention implements a multi-core operating system based on cloning technology. Technically, it is divided into a cloning layer and a physical layer. In the cloning layer, the physical layer resource regions (21, 22…2n) of multiple processor cores can be abstracted into a single clone resource region 1. Within clone resource region 1, a one-to-one mapping relationship is formed between the processor core's identification information and the physical layer resource regions (21, 22…2n) of each processor core's private physical resource addresses. When a processor core's resource access request arrives at clone resource region 1, it is automatically mapped to the corresponding actual physical layer resource region (21, 22…2n), thus forming core-specific control of the multi-core real-time operating system. Simultaneously, in a multi-core operating system implemented based on cloning technology, only one copy of the multi-core operating system code is needed to manage the multi-core chip, reducing the number of copies of the operating system code stored in the Flash memory of existing multi-core operating systems. This significantly saves Flash storage space, solves the problem of Flash resource waste, and improves the real-time performance of the operating system.

[0063] In a preferred embodiment, the physical layer resource regions (21, 22...2n) correspond one-to-one with the processor cores.

[0064] Specifically, in this embodiment, the physical resource region is the actual RAM region of each processor core, specifically including, for example: Figure 1 The random access memory (RAM1, RAM1...RAMn) shown is one-to-one with the processor core, so that each processor core can read and write at any time, and the data retrieval or storage speed is very fast.

[0065] In a preferred embodiment, each processor core also provides a storage unit for storing a control script that can be shared by multiple processor cores. The control script performs logical control of the corresponding processor core based on the identification information.

[0066] Specifically, this storage unit can be implemented using FLASH memory, serving as a shared storage space for multiple processor cores.

[0067] This invention addresses the problem of wasted FLASH resources caused by storing multiple copies of operating system code in FLASH memory for use by various processor cores. In this embodiment, because the multi-core operating system is implemented using cloning technology, a single running script can be used to manage the multi-core chip, saving FLASH storage space and improving the real-time performance of the operating system.

[0068] In a preferred embodiment, each processor core also provides a storage module for accessing a predetermined logical address to store the configuration information of each processor core into the physical layer resource area (21, 22...2n) corresponding to each processor core.

[0069] In a preferred embodiment, each processor core also provides a query module for accessing a predetermined logical address to query configuration information from the physical layer resource regions (21, 22...2n) corresponding to each processor core.

[0070] Specifically, the management behavior of multi-core chips includes at least storage and querying. The aforementioned storage and querying variables must first access the cloned resource area and be implemented through cloned variables. In fact, the operation is carried out in the physical layer resource area corresponding to the processor core.

[0071] The advantages or beneficial effects of adopting the above technical solution are as follows: Based on cloning technology, the present invention abstracts multiple physical layer resource regions corresponding to a multi-core chip into a cloned resource region. By mapping the identification information of each processor core to the physical resource address, the corresponding physical layer resource region can be accessed, which greatly saves Flash storage space and solves the problem of Flash resource waste.

[0072] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.

Claims

1. A multi-core operating system based on hardware cloning technology, characterized in that, include: A multi-core chip includes multiple processor cores, each of which accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself. The chip is a chip that supports cloning technology; The cloned resource regions are connected to the multiple processor cores respectively. The cloned resource regions are pre-set with the mapping relationship between the identification information and the physical resource address. They are used to map the resource access request to the corresponding physical resource address and access the physical layer resource region corresponding to the physical resource address to obtain the corresponding resource data and send it to the processor core. In the cloning layer of a multi-core operating system, the physical layer resource regions of the multiple processor cores are abstracted into the cloned resource regions; The processor core performs core-specific storage by cloning variables: CASE n core: TaskCfg = TaskCfg_Coren.

2. The multi-core operating system based on hardware cloning technology according to claim 1, characterized in that, The physical layer resource regions correspond one-to-one with the processor cores.

3. The multi-core operating system based on hardware cloning technology according to claim 1, characterized in that, Also includes: A storage unit is provided for storing a running script that can be shared by the multiple processor cores. The running script performs corresponding logical control of the processor cores based on the identification information.

4. The multi-core operating system based on hardware cloning technology according to claim 1, characterized in that, Each of the processor cores includes: The storage module is used to access the predetermined logical address to store the configuration information of each processor core into the corresponding physical layer resource area.

5. The multi-core operating system based on hardware cloning technology according to claim 4, characterized in that, Each of the processor cores also includes: The query module is used to access the predetermined logical address and query the configuration information in the corresponding physical layer resource area.

6. A control method for a multi-core operating system based on hardware cloning technology, characterized in that, Applied to a multi-core operating system based on hardware cloning technology as described in any one of claims 1-5, the method includes: Each processor core of a multi-core chip accesses a predetermined logical address when accessing resources and sends a resource access request containing information identifying itself. The cloned resource region receives resource access requests and maps them to the corresponding physical resource address according to the preset mapping relationship between the identifier information and the physical resource address. It then accesses the physical layer resource region corresponding to the physical resource address to obtain the corresponding resource data and sends it to the processor core.

7. The control method for a multi-core operating system based on hardware cloning technology according to claim 6, characterized in that, The physical layer resource regions correspond one-to-one with the processor cores.

8. The control method for a multi-core operating system based on hardware cloning technology according to claim 6, characterized in that, Each of the processor cores also provides a storage unit for storing a control script that can be shared by the multiple processor cores. The control script performs logical control of the corresponding processor core according to the identification information.

9. The control method for a multi-core operating system based on hardware cloning technology according to claim 6, characterized in that, Each of the processor cores also provides a storage module for accessing the predetermined logical address to store the configuration information of each processor core into the physical layer resource area corresponding to each processor core.

10. The control method for a multi-core operating system based on hardware cloning technology according to claim 9, characterized in that, Each processor core also provides a query module for accessing the predetermined logical address to query the configuration information from the physical layer resource area corresponding to each processor core.

Citation Information

Patent Citations

  • Method and system for realizing memory hard partition capability bound with CPU core

    CN113835845A