WO2023116832A1 - Construction method and apparatus for heterogeneous system - Google Patents

Construction method and apparatus for heterogeneous system Download PDF

Info

Publication number
WO2023116832A1
WO2023116832A1 PCT/CN2022/141080 CN2022141080W WO2023116832A1 WO 2023116832 A1 WO2023116832 A1 WO 2023116832A1 CN 2022141080 W CN2022141080 W CN 2022141080W WO 2023116832 A1 WO2023116832 A1 WO 2023116832A1
Authority
WO
WIPO (PCT)
Prior art keywords
real
time operating
time
operating system
hardware platform
Prior art date
Application number
PCT/CN2022/141080
Other languages
French (fr)
Chinese (zh)
Inventor
唐兴培
徐春强
Original Assignee
科东(广州)软件科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 科东(广州)软件科技有限公司 filed Critical 科东(广州)软件科技有限公司
Publication of WO2023116832A1 publication Critical patent/WO2023116832A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7839Architectures of general purpose stored program computers comprising a single central processing unit with memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Definitions

  • the present application relates to the technical field of operating systems, and in particular to a construction method and device for a heterogeneous system.
  • the existing methods for enhancing the real-time performance of non-real-time operating systems are mainly divided into three categories.
  • the first category is based on the linux system to inject real-time patches to enhance the real-time performance of the linux system;
  • the second category is similar to the xenomai system.
  • the real-time kernel handles interrupts and scheduling first, thereby improving the real-time performance of the system;
  • the third category a hypersivor architecture similar to acrn and xen, a virtualization method to enhance linux System real-time performance.
  • the first and second categories require custom modifications to non-real-time operating systems such as linux systems, which are difficult to adapt.
  • the third category requires the use of hypervisor technology, which will cause a certain loss in system performance, that is, the total computing performance of all virtual machines is less than The computing performance of a system installed on bare metal.
  • the embodiment of the present application provides a heterogeneous system construction method and device, the construction method includes: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform; through the real-time The operating environment system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform from the non-real-time operating system, and builds a virtual real-time hardware platform based on the hardware resources; The real-time operating system is installed and started on the hardware platform, and the device tree of the real-time operating system includes the virtual real-time hardware platform.
  • the technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
  • the embodiment of the present application provides a method for constructing a heterogeneous system, including: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform;
  • the non-real-time operating system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform, and builds a virtual real-time hardware platform based on the hardware resources;
  • the real-time operating environment system is installed and started on the virtual real-time hardware platform
  • the real-time operating system includes the virtual real-time hardware platform in the device tree of the real-time operating system.
  • constructing a heterogeneous system through the real-time operating environment system installed on the non-real-time operating system does not require customization and modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive hardware resources and strong real-time performance , running a real-time operating system on it, which improves the real-time and security of the whole system.
  • the hardware resources dedicated to the real-time operating system include at least the following resources: cpu core, memory, and peripherals.
  • the hardware resources dedicated to the real-time operating system cpu core, memory and peripherals are not used by the non-real-time operating system, but are exclusively used by the real-time operating system to improve the real-time performance of the system.
  • the real-time operating environment system starting a real-time operating system on the virtual real-time hardware platform includes: starting the real-time operating system on the CPU core, and starting the Each device in the device tree.
  • the real-time operating system can monopolize the resources of the virtual real-time hardware platform.
  • the interrupt of the peripheral device is directly delivered to the CPU core to be processed by the real-time operating system; the real-time operating system directly accesses the memory through the CPU core and the peripherals.
  • a command set is configured in the real-time operating environment system, and the command set includes: a resource release command, a resource allocation command, a system load command, a system start command, and a system stop command;
  • the real-time operating environment system releases the dedicated hardware resources from the non-real-time operating system through a resource release command;
  • the real-time operating environment system provides the real-time The operating environment system allocates exclusive hardware resources;
  • the real-time operating environment system loads the image file of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command to realize the installation of the real-time operating system;
  • the real-time operating environment system starts the image file installed in the memory of the virtual real-time hardware platform on the virtual real-time hardware platform through the system start command;
  • the real-time operating environment system uses the system stop command Stop the running real-time operating system.
  • the real-time operating environment system releases the dedicated hardware resource from the real-time operating system through a resource release command.
  • the dedicated hardware resources of the real-time operating system are built through the command set of the real-time operating environment system, the software of the real-time operating system is mirrored and the real-time operating system is started, and there is no need to customize the non-real-time operating system.
  • the driver program of the peripheral resource is deleted;
  • the allocation command allocates a peripheral resource to an operating system and installs the driver of the peripheral resource in the operating system when releasing the peripheral resource.
  • the real-time operating environment system releases/allocates the peripherals by deleting/installing the drivers, so that the interrupt processing and access processing in the new drivers of the peripherals dedicated to the real-time operating system are specially called by the real-time operating system.
  • the non-real-time operating system includes a Linux or Windows system.
  • the construction method of the present application is suitable for constructing heterogeneous systems with real-time operating systems on various non-real-time operating systems.
  • the embodiment of the present application provides a device for constructing a heterogeneous system, which is characterized in that it includes: a first installation module for installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform ;
  • the first building module is used to release and allocate hardware resources dedicated to the real-time operating system in the hardware platform from the non-real-time operating system through the real-time operating environment system, and build a virtual real-time hardware platform based on the hardware resources;
  • the first starting module is configured to install and start the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system, and the device tree of the real-time operating system includes the virtual real-time hardware platform.
  • constructing a heterogeneous system through the real-time operating environment system installed on the non-real-time operating system does not require customization and modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive hardware resources and strong real-time performance , running a real-time operating system on it, which improves the real-time and security of the whole system.
  • the hardware resources dedicated to the real-time operating system include at least the following resources: cpu core, memory, and peripherals.
  • the hardware resources dedicated to the real-time operating system cpu core, memory and peripherals are not used by the non-real-time operating system, but are exclusively used by the real-time operating system to improve the real-time performance of the system.
  • starting the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system includes: starting the real-time operating system on the CPU core, and starting the Each device in the device tree.
  • the real-time operating system can monopolize the resources of the virtual real-time hardware platform.
  • the interrupt of the peripheral device is directly delivered to the CPU core to be processed by the real-time operating system; the real-time operating system directly accesses the memory through the CPU core and the peripherals.
  • a command set is configured in the real-time operating environment system, and the command set includes: a resource release command, a resource allocation command, a system loading command, a system start command, and a system stop command;
  • the real-time operating environment system releases the dedicated hardware resources from the non-real-time operating system through a resource release command;
  • the real-time operating environment system provides the real-time The operating environment system allocates exclusive hardware resources;
  • the real-time operating environment system loads the image file of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command to realize the installation of the real-time operating system;
  • the real-time operating environment system starts the image file installed in the memory of the virtual real-time hardware platform on the virtual real-time hardware platform through the system start command;
  • the real-time operating environment system uses the system stop command Stop the running real-time operating system.
  • the real-time operating environment system releases the dedicated hardware resource from the real-time operating system through a resource release command.
  • the dedicated hardware resources of the real-time operating system are built through the command set of the real-time operating environment system, the software of the real-time operating system is mirrored and the real-time operating system is started, and there is no need to customize the non-real-time operating system.
  • the driver program of the peripheral resource is deleted;
  • the allocation command allocates a peripheral resource to an operating system and installs the driver of the peripheral resource in the operating system when releasing the peripheral resource.
  • the real-time operating environment system releases/allocates the peripherals by deleting/installing the drivers, so that the interrupt processing and access processing in the new drivers of the peripherals dedicated to the real-time operating system are specially called by the real-time operating system.
  • the non-real-time operating system includes a Linux or Windows system.
  • the construction device of the present application is suitable for constructing heterogeneous systems with real-time operating systems on various non-real-time operating systems.
  • an embodiment of the present application provides an operating system, including: a heterogeneous system constructed using any one of the implementation manners described in the first aspect of the present application.
  • an embodiment of the present application provides a computer, including: a heterogeneous system constructed using any one of the implementation manners described in the first aspect of the present application.
  • the embodiment of the present application provides a computing device, including:
  • At least one memory is connected to the bus and stores program instructions, and the program instructions, when executed by the at least one processor, cause the at least one processor to execute any one of the implementation manners of the first aspect of the present application.
  • the embodiments of the present application provide a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a computer, the computer executes any one of the implementation manners of the first aspect of the application.
  • FIG. 1 is a schematic flowchart of Embodiment 1 of a method for constructing a heterogeneous system of the present application
  • FIG. 2A is a schematic diagram of the architecture of the non-real-time operating system of the present application.
  • FIG. 2B is a schematic diagram of the architecture of the heterogeneous system constructed in Embodiment 1 of a method for constructing a heterogeneous system of the present application;
  • FIG. 3 is a schematic flowchart of Embodiment 2 of a method for constructing a heterogeneous system of the present application
  • FIG. 4 is a schematic diagram of the architecture of the heterogeneous system constructed in Embodiment 2 of a method for constructing a heterogeneous system of the present application;
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of a device for constructing a heterogeneous system of the present application
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of a device for constructing a heterogeneous system of the present application
  • FIG. 7 is a schematic structural diagram of a computing device according to various embodiments of the present application.
  • the embodiment of the present application provides a method and device for constructing a heterogeneous system.
  • the construction method includes: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform;
  • the non-real-time operating system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform, and builds a virtual real-time hardware platform based on the hardware resources;
  • the real-time operating environment system is installed on the virtual real-time hardware platform
  • start the real-time operating system the device tree of the real-time operating system includes the virtual real-time hardware platform.
  • the technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
  • Embodiment 1 of a construction method of a heterogeneous system by releasing and allocating hardware resources dedicated to a real-time operating system in a computing hardware platform from a non-real-time operating system, and constructing a virtual real-time hardware platform based on the hardware resources; on the virtual real-time hardware platform
  • the real-time operating system is installed and started, and the device tree of the real-time operating system includes a virtual real-time hardware platform.
  • the technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
  • FIG. 1 shows the flow of Embodiment 1 of a construction method of a heterogeneous system, which includes steps S110 to S140.
  • S110 Install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform.
  • the Real Time Running Environment system (Real Time Running Environment, RTRE) is the system developed by this application, which is a software package on a non-real-time operating system, which can be installed and uninstalled, and is used to divide the resources of the computer hardware platform.
  • RTRE Real Time Running Environment
  • the non-real-time operating system runs on the hardware platform of the computer.
  • the non-real-time operating system is a Linux system, and in other embodiments, the non-real-time operating system is a Windows system. Neither Linux nor Windows systems have real-time performance.
  • the non-real-time operating system has a macrokernel, and in other embodiments, the non-real-time operating system has a microkernel.
  • the non-real-time operating system when it is Linux, it may be any linux distribution system, for example, such as the ubuntu system or the debian system.
  • the real-time operating environment system releases and allocates hardware resources dedicated to the real-time operating system from the non-real-time operating system, and builds a virtual real-time hardware platform based on the hardware resources.
  • the virtual real-time hardware platform provides dedicated hardware resources for the real-time operating system system.
  • it includes a CPU core, memory and peripherals dedicated to the real-time operating system system.
  • the CPU cores are several CPUs on the same processor.
  • the core can also be a CPU core on other processors.
  • the peripherals dedicated to the real-time operating system include hard disks, PCI devices, serial ports, and network ports dedicated to the real-time operating system.
  • the virtual real-time hardware platform also provides a first virtual peripheral for the real-time operating system
  • the first virtual peripheral is a virtual device corresponding to a peripheral shared by the real-time operating system and the non-real-time operating system, such as a shared keyboard.
  • the real-time operating environment system is provided with a command set, the command set includes a resource release command, a resource allocation command, and a virtual peripheral creation command, and the real-time operating environment system uses the resource release command, the resource allocation command, and the virtual peripheral Set the creation command to build a virtual real-time hardware platform.
  • the driver of the peripheral resource when the real-time operating environment system releases a peripheral resource from an operating system through a resource release command, the driver of the peripheral resource is deleted; the real-time operating environment system allocates a peripheral resource to a resource through a resource allocation command. When the operating system releases the peripheral resource, the driver of the peripheral resource in the operating system is installed.
  • the real-time operating environment system allocates dedicated hardware resources for the real-time operating system from reserved hardware resources through a resource allocation command. The real-time operating environment system creates the first virtual peripheral through a virtual peripheral creation command.
  • the real-time operating environment system strips the dedicated hardware resource of the real-time operating system from the non-real-time operating system through the resource release command, so that the non-real-time operating system no longer uses the hardware resource, and uses the resource allocation command to release the hardware resource
  • the hardware resources are allocated to the real-time operating system and used exclusively by the real-time operating system.
  • each real-time operating system when constructing multiple real-time operating systems, has its own dedicated hardware resources and first virtual peripherals, forming a virtual real-time hardware platform for each real-time operating system.
  • S130 Install and start the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system.
  • the device tree of the real-time operating system system includes a virtual real-time hardware platform.
  • the real-time operating environment system starts the real-time operating system on the virtual real-time hardware platform, it starts real-time operation on the dedicated CPU core of the real-time operating system system. system, and start each device in the device tree.
  • the real-time operating system is built on the virtual real-time hardware platform.
  • the virtual real-time hardware platform is directly composed of the CPU core, memory and peripherals dedicated to the real-time operating system system. It can be considered that the real-time operating system is built on bare-metal hardware.
  • the interrupt of the peripheral device dedicated to the real-time operating system is directly delivered to the CPU core dedicated to the real-time operating system system to be processed by the real-time operating system, and the interrupt response path is the same as that of the bare metal
  • the real-time operating system and the above applications directly access the dedicated memory and peripherals of the real-time operating system system through the dedicated CPU core of the real-time operating system system. Therefore, the real-time operating system has high real-time performance.
  • the command set of the real-time operating environment system also includes a system loading command and a system startup command
  • the real-time operating environment system loads the software package image of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command , start the real-time operating system through the system startup command, so as to build a heterogeneous system including non-real-time operating system and real-time operating system on a computer hardware platform.
  • the real-time operating system includes an embedded operating system, for example, such as the Intelwell RT system.
  • the corresponding real-time operating systems are started on the respective virtual real-time hardware platforms of each real-time operating system.
  • FIG. 2A shows the architecture of a non-real-time operating system, and the non-real-time operating system runs directly on the hardware platform of the computer.
  • the non-real-time operating system in FIG. 2A includes Linux and Windows systems.
  • Figure 2B shows the architecture of the heterogeneous system constructed by the present application, the real-time operating environment system runs in the non-real-time operating system, and the real-time operating system runs on the real-time operating environment system, for example, the real-time operating system in Figure 2B includes Intewell RT system.
  • the real-time operating system in Figure 2B runs on the real-time operating environment system, its essence is to run directly on the virtual real-time hardware platform composed of the dedicated CPU core, memory and peripherals of the real-time operating system system, which is equivalent to running directly on the bare hardware. on board.
  • a problem occurs in the non-real-time operating system, it does not affect the operation of the real-time operating system, which improves the security of the real-time operating system.
  • the real-time operating system of the present application is built on the virtual real-time hardware platform, and the virtual real-time hardware platform has hardware resources dedicated to the real-time operating system. Therefore, the real-time operating system of the present application has a strong real-time operating system performance, and Improved security for real-time operating systems.
  • the command set of the real-time operating environment system also includes a system stop command and a resource release command. Dedicated hardware resources are released to non-real-time operating systems.
  • Embodiment 1 of a method for constructing a heterogeneous system installs a real-time operating environment system on a non-real-time operating system, and the real-time operating environment system provides a virtual real-time hardware platform, and the virtual real-time hardware platform includes a real-time operating system to provide dedicated hardware. resources, and install and run a real-time operating system on a virtual real-time hardware platform to build a heterogeneous system.
  • a method for building a heterogeneous system Embodiment 1
  • the constructed heterogeneous system is realized by the real-time operating environment system on the non-real-time operating system, without customizing and modifying the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive
  • the hardware resource has strong real-time performance, and the real-time operating system runs on it, which improves the real-time performance and security of the whole system.
  • Embodiment 2 of a method for constructing a heterogeneous system is an implementation of Embodiment 1 of a method for constructing a heterogeneous system on the ubuntu operating system.
  • FIG. 3 shows the detailed flow of the second method embodiment, which includes steps S310 to S360.
  • the ubuntu operating system is a Linux distribution system.
  • the RTRE is provided with a command set for managing the real-time operating system.
  • the command set includes:
  • Resource allocation commands such as cpu alloc, mem alloc and deviceName alloc, where deviceName is the name of the defined peripheral;
  • Resource release commands such as cpu free, mem free and deviceName free;
  • Virtual peripheral creation command such as rt vdeviceName create, where vdeviceName is the name of the defined virtual peripheral.
  • the RTRE strips out the dedicated hardware resources of the real-time operating system from the ubuntu system through a resource allocation command, and allocates them to the real-time operating system, and creates a first virtual peripheral through a virtual peripheral creation command.
  • the dedicated hardware resources include CPU cores, memory and peripherals dedicated to the real-time operating system.
  • RTRE strips the dedicated CPU core of the real-time operating system from the ubuntu system by executing the cpu free command according to the configuration data, and allocates the dedicated CPU core to the real-time operating system through the cpu alloc command.
  • This process can be regarded as a non-real-time The reverse process of the CPU core allocation of the operating system.
  • RTRE strips the dedicated memory of the real-time operating system from the ubuntu system by executing the mem free command according to the configuration data, and allocates the dedicated memory to the real-time operating system through the mem alloc command.
  • This process can be regarded as a non-real-time operating system
  • the inverse process of memory allocation is regarded as a non-real-time operating system
  • RTRE strips the peripherals exclusive to the real-time operating system from the ubuntu system by executing the deviceName free command according to the configuration data, and assigns the exclusive peripherals to the real-time operating system through the deviceName alloc command.
  • This process can be regarded as non-real-time The reverse process of the peripheral allocation of the operating system.
  • the dedicated peripherals include hard disks, PCI devices, and network ports dedicated to the real-time operating system.
  • the RTRE executes rt vdeviceName create according to the configuration data to create the first virtual peripheral
  • the first virtual peripheral is a virtual device corresponding to a peripheral shared by the real-time operating system and the non-real-time operating system.
  • the shared peripheral includes a shared serial port, a shared network port, and the like.
  • the above-mentioned configuration data is configured by a non-real-time operating system. In other implementations, the above configuration data is configured through the IDE of the entire heterogeneous system.
  • S340 RTRE constructs a virtual real-time hardware platform vm1 by using the hardware resources stripped from the ubuntu system and the created first virtual peripheral.
  • the virtual real-time hardware platform vm1 provides a hardware platform for the real-time operating system.
  • the linux system and the intewell RT system run simultaneously on a hardware platform, and the system has strong real-time performance.
  • Fig. 4 shows the architecture diagram of the heterogeneous system constructed in the second method embodiment, the non-real-time operating system is the ubuntu system, and the real-time operating system is the intewell RT system.
  • the second embodiment of a heterogeneous system construction method installs the real-time operating environment system RTRE on the ubuntu system, and RTRE provides a virtual real-time hardware platform vml, and vml includes a real-time operating system to provide dedicated hardware resources, and on vml Install and run the real-time operating system Intewell RT to build heterogeneous systems.
  • the real-time operating system has dedicated hardware resources and has strong real-time performance.
  • Build an RTRE on the ubuntu system run the real-time operating system Intewell RT on it to improve the real-time performance of the system, without customizing the ubuntu system, and improve the real-time and security of the entire system.
  • Embodiment 1 of an apparatus for constructing a heterogeneous system runs the method of Embodiment 1 of a method for constructing a heterogeneous system.
  • FIG. 5 shows the structure of Embodiment 1 of a construction device for a heterogeneous system, which includes: a first installation module 510 , a first construction module 520 , a first startup module 530 , and a first release module 540 .
  • the first installation module 510 is used to install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform.
  • a real-time operating environment system on a non-real-time operating system running on a computer hardware platform.
  • step S110 in Embodiment 1 of a method for constructing a heterogeneous system More details.
  • the first building block 520 is used to release and allocate hardware resources dedicated to the real-time operating system from the non-real-time operating system by the real-time operating environment system, and build a virtual real-time hardware platform based on the hardware resources.
  • the step S120 of the first embodiment of the heterogeneous system construction method will not be described in detail here.
  • the first start-up module 530 is used to install and start each real-time operating system on the virtual real-time hardware platform by the real-time operating environment system.
  • step S120 in Embodiment 1 of a method for constructing a heterogeneous system please refer to step S120 in Embodiment 1 of a method for constructing a heterogeneous system. More details.
  • the first release module 540 is used to release the dedicated hardware resources of the real-time operating system to the non-real-time operating system by the real-time operating environment system when the real-time operating system is stopped.
  • the first release module 540 is used to release the dedicated hardware resources of the real-time operating system to the non-real-time operating system by the real-time operating environment system when the real-time operating system is stopped.
  • Step S140 of Example 1 will not be described in detail here.
  • Embodiment 2 of an apparatus for constructing a heterogeneous system runs the method of Embodiment 2 of a method for constructing a heterogeneous system.
  • FIG. 6 shows the structure of the first embodiment of the device, which includes: a second installation module 610 , a first installation module 620 , a first construction module 630 , a first activation module 650 , and a first release module 660 .
  • the second installation module 610 installs the ubuntu operating system on the computer hardware platform.
  • step S310 in the second embodiment of a method for constructing a heterogeneous system, which will not be described in detail here.
  • the first installation module 620 is used to install the software of the real-time operating environment system RTRE on the ubuntu operating system.
  • RTRE real-time operating environment system
  • the first building block 630 is used for RTRE to strip the dedicated hardware resource of the real-time operating system from the ubuntu system through the resource allocation command, and allocate it to the real-time operating system, and also create the first virtual peripheral through the virtual peripheral creation command, and its work
  • RTRE Relative Transcription
  • step S330 in Embodiment 2 of a method for constructing a heterogeneous system which will not be described in detail here.
  • the first building module 630 is also used for RTRE to build a virtual real-time hardware platform vm1 using the hardware resources stripped from the ubuntu system and the created first virtual peripheral.
  • RTRE Real-time hardware platform
  • the first start-up module 650 is used to mirror load Intewell RT into the memory of vml through the loading and start-up commands of RTRE, and start Intewell RT.
  • the first release module 660 is used to use RTRE to release the dedicated hardware resources of the real-time operating system to the ubuntu system when the Intewell RT system does not need to be run.
  • RTRE Relative Transcription
  • the first release module 660 is used to use RTRE to release the dedicated hardware resources of the real-time operating system to the ubuntu system when the Intewell RT system does not need to be run.
  • the embodiment of the present application also provides an operating system, which includes a heterogeneous system constructed by Embodiment 1 of a method for constructing a heterogeneous system or Embodiment 2 of a method for constructing a heterogeneous system.
  • the embodiment of the present application also provides a computer embodiment, which includes a heterogeneous system constructed by Embodiment 1 of a method for constructing a heterogeneous system or Embodiment 2 of a method for constructing a heterogeneous system.
  • the embodiment of the present application also provides a computing device, which will be described in detail below with reference to FIG. 7 .
  • the computing device 700 includes a processor 710 , a memory 720 , a communication interface 730 , and a bus 740 .
  • the communication interface 730 in the computing device 700 shown in this figure can be used to communicate with other devices.
  • the processor 710 may be connected to the memory 720 .
  • the memory 720 can be used to store the program codes and data. Therefore, the memory 720 may be a storage unit inside the processor 710, or an external storage unit independent of the processor 710, or may include a storage unit inside the processor 710 and an external storage unit independent of the processor 710. part.
  • computing device 700 may further include a bus 740 .
  • the memory 720 and the communication interface 730 may be connected to the processor 710 through the bus 740 .
  • the bus 740 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EFStended Industry Standard Architecture, EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus 740 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one line is used in this figure, but it does not mean that there is only one bus or one type of bus.
  • the processor 710 may be a central processing unit (central processing unit, CPU).
  • the processor can also be other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), off-the-shelf programmable gate arrays (field programmable gate arrays, FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the processor 710 adopts one or more integrated circuits for executing related programs, so as to realize the technical solutions provided by the embodiments of the present application.
  • the memory 720 may include read-only memory and random-access memory, and provides instructions and data to the processor 710 .
  • a portion of processor 710 may also include non-volatile random access memory.
  • processor 710 may also store device type information.
  • the processor 710 executes the computer-implemented instructions in the memory 720 to perform the operation steps of the various method embodiments.
  • the computing device 700 may correspond to a corresponding body executing the methods according to the various embodiments of the present application, and the above-mentioned and other operations and/or functions of the modules in the computing device 700 are for realizing the present invention For the sake of brevity, the corresponding processes of the methods in the embodiments are not repeated here.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • 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 may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc. .
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and the program is used to execute the operation steps of each method embodiment when executed by a processor.
  • the computer storage medium in the embodiments of the present application may use any combination of one or more computer-readable media.
  • the computer readable medium may be a computer readable signal medium or a computer readable storage medium.
  • a computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include, electrical connections with one or more leads, portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .
  • Program code embodied on a 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.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider). connect).
  • LAN local area network
  • WAN wide area network
  • connect such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

Provided in the embodiments of the present application are a construction method and apparatus for a heterogeneous system. The construction method comprises: installing a real-time running environment system on a non-real-time operating system, which runs on a computer hardware platform; by means of the real-time running environment system, releasing from the non-real-time operating system and allocating a hardware resource, which exclusively belongs to a real-time operating system, in the hardware platform, and constructing a virtual real-time hardware platform on the basis of the hardware resource; and installing and starting, by means of the real-time running environment system, the real-time operating system on the virtual real-time hardware platform, wherein the virtual real-time hardware platform is comprised in a device tree of the real-time operating system. The technical solution of the present application does not require custom modification of a non-real-time operating system, and a constructed virtual real-time hardware platform has exclusive hardware resources thereon and has a relatively strong real-time performance. By running a real-time operating system on the constructed virtual real-time hardware platform, the real-time performance and security of the whole system are improved.

Description

一种异构系统的构建方法及装置Method and device for constructing a heterogeneous system 技术领域technical field
本申请涉及操作系统技术领域,尤其涉及一种异构系统的构建方法及装置。The present application relates to the technical field of operating systems, and in particular to a construction method and device for a heterogeneous system.
背景技术Background technique
以linux系统为例,现有针对非实时操作系统实时性能增强的方法主要分为三类,第一类是基于linux系统打入实时补丁以增强linux系统的实时性能;第二类是类似xenomai系统,通过改造linux系统添加一个实时调度的内核形成双内核系统,实时内核优先处理中断和调度,以此提高系统实时性能;第三类,类似acrn、xen的hypersivor架构,一虚拟化的方式增强linux系统实时性能。Taking the linux system as an example, the existing methods for enhancing the real-time performance of non-real-time operating systems are mainly divided into three categories. The first category is based on the linux system to inject real-time patches to enhance the real-time performance of the linux system; the second category is similar to the xenomai system. , by transforming the linux system and adding a real-time scheduling kernel to form a dual-core system, the real-time kernel handles interrupts and scheduling first, thereby improving the real-time performance of the system; the third category, a hypersivor architecture similar to acrn and xen, a virtualization method to enhance linux System real-time performance.
第一类和第二类,需对非实时操作系统如linux系统做定制修改,适配难度大,第三类需要使用hypervisor技术会导致系统的性能有一定损耗,即所有虚拟机计算性能总和小于裸机上安装一个系统的计算性能。The first and second categories require custom modifications to non-real-time operating systems such as linux systems, which are difficult to adapt. The third category requires the use of hypervisor technology, which will cause a certain loss in system performance, that is, the total computing performance of all virtual machines is less than The computing performance of a system installed on bare metal.
因此,需要一种异构系统的构建方法,在实现实时操作系统的功能时,解决第一二类方案需要定制化修改非实时操作系统的弊端,同时解决第三类方案带来的系统性能损耗。Therefore, a construction method for heterogeneous systems is needed. When implementing the functions of the real-time operating system, it solves the disadvantages of the first and second types of solutions that need to customize and modify the non-real-time operating system, and at the same time solves the system performance loss caused by the third type of solution. .
发明内容Contents of the invention
有鉴于此,本申请实施例提供了一种异构系统的构建方法及装置,所述构建方法包括:在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。本申请的技术方案不需要定制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。In view of this, the embodiment of the present application provides a heterogeneous system construction method and device, the construction method includes: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform; through the real-time The operating environment system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform from the non-real-time operating system, and builds a virtual real-time hardware platform based on the hardware resources; The real-time operating system is installed and started on the hardware platform, and the device tree of the real-time operating system includes the virtual real-time hardware platform. The technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
第一方面,本申请实施例提供了一种异构系统的构建方法,包括:在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。In the first aspect, the embodiment of the present application provides a method for constructing a heterogeneous system, including: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform; The non-real-time operating system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform, and builds a virtual real-time hardware platform based on the hardware resources; the real-time operating environment system is installed and started on the virtual real-time hardware platform The real-time operating system includes the virtual real-time hardware platform in the device tree of the real-time operating system.
由上,通过非实时操作系统上安装的实时运行环境系统构建异构系统,不需要定 制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。From the above, constructing a heterogeneous system through the real-time operating environment system installed on the non-real-time operating system does not require customization and modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive hardware resources and strong real-time performance , running a real-time operating system on it, which improves the real-time and security of the whole system.
在第一方面的一种可能实施方式中,所述专属于所述实时操作系统的硬件资源至少包括以下资源中:cpu核、内存、外设。In a possible implementation manner of the first aspect, the hardware resources dedicated to the real-time operating system include at least the following resources: cpu core, memory, and peripherals.
由上,专属实时操作系统的硬件资源:cpu核、内存和外设,不被非实时操作系统使用,为实时操作系统专门使用,提高系统的实时性能。From the above, the hardware resources dedicated to the real-time operating system: cpu core, memory and peripherals are not used by the non-real-time operating system, but are exclusively used by the real-time operating system to improve the real-time performance of the system.
在第一方面的一种可能实施方式中,所述实时运行环境系统在所述虚拟实时硬件平台上启动实时操作系统,包括:在所述CPU核上启动所述实时操作系统,并启动所述设备树中各设备。In a possible implementation manner of the first aspect, the real-time operating environment system starting a real-time operating system on the virtual real-time hardware platform includes: starting the real-time operating system on the CPU core, and starting the Each device in the device tree.
由上,通过在专属实时操作系统的cpu核启动实时操作系统且根据设备树启动虚拟实时硬件平台中其他设备,实现实时操作系统独占虚拟实时硬件平台的资源。From the above, by starting the real-time operating system on the CPU core of the dedicated real-time operating system and starting other devices in the virtual real-time hardware platform according to the device tree, the real-time operating system can monopolize the resources of the virtual real-time hardware platform.
在第一方面的一种可能实施方式中,所述外设的中断直接投递到所述CPU核,以被所述实时操作系统处理;所述实时操作系统通过所述CPU核直接访问所述内存和所述外设。In a possible implementation manner of the first aspect, the interrupt of the peripheral device is directly delivered to the CPU core to be processed by the real-time operating system; the real-time operating system directly accesses the memory through the CPU core and the peripherals.
由上,通过把专属实时操作系统的外设中断直接投递到专属实时操作系统的CPU核,且通过该CPU核直接访问专属实时操作系统的内存和外设,提高了实时操作系统的实时性。From the above, by directly delivering the peripheral interrupt of the dedicated real-time operating system to the CPU core of the dedicated real-time operating system, and directly accessing the memory and peripherals of the dedicated real-time operating system through the CPU core, the real-time performance of the real-time operating system is improved.
在第一方面的一种可能实施方式中,所述实时运行环境系统中配置有命令集,所述命令集包括:资源释放命令、资源分配命令、系统加载命令、系统启动命令和系统停止命令;所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述非实时操作系统中释放;所述实时运行环境系统通过所述资源分配命令在所述计算机硬件平台上为所述实时运行环境系统分配专属的硬件资源;所述实时运行环境系统通过所述系统加载命令加载所述实时操作系统的镜像文件到所述虚拟实时硬件平台的内存中,实现所述实时操作系统的安装;所述实时运行环境系统通过所述系统启动命令将安装于所述虚拟实时硬件平台的内存中的镜像文件在所述虚拟实时硬件平台上运行启动;所述实时运行环境系统通过所述系统停止命令将运行中的实时操作系统停止运行。所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述实时操作系统中释放。In a possible implementation manner of the first aspect, a command set is configured in the real-time operating environment system, and the command set includes: a resource release command, a resource allocation command, a system load command, a system start command, and a system stop command; The real-time operating environment system releases the dedicated hardware resources from the non-real-time operating system through a resource release command; the real-time operating environment system provides the real-time The operating environment system allocates exclusive hardware resources; the real-time operating environment system loads the image file of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command to realize the installation of the real-time operating system; The real-time operating environment system starts the image file installed in the memory of the virtual real-time hardware platform on the virtual real-time hardware platform through the system start command; the real-time operating environment system uses the system stop command Stop the running real-time operating system. The real-time operating environment system releases the dedicated hardware resource from the real-time operating system through a resource release command.
由上,通过实时运行环境系统的命令集构建实时操作系统的专属硬件资源,镜像加载实时操作系统的软件和启动实时操作系统,不需要对非实时操作系统进行定制化改造。From the above, the dedicated hardware resources of the real-time operating system are built through the command set of the real-time operating environment system, the software of the real-time operating system is mirrored and the real-time operating system is started, and there is no need to customize the non-real-time operating system.
在第一方面的一种可能实施方式中,所述实时运行环境系统通过资源释放命令从一个操作系统释放一个外设资源时,删除该外设资源的驱动程序;所述实时运行环境系统通过资源分配命令把一个外设资源分配给一个操作系统释放外设资源时,安装该外设资源在该操作系统中的驱动程序。In a possible implementation manner of the first aspect, when the real-time operating environment system releases a peripheral resource from an operating system through a resource release command, the driver program of the peripheral resource is deleted; The allocation command allocates a peripheral resource to an operating system and installs the driver of the peripheral resource in the operating system when releasing the peripheral resource.
由上,实时运行环境系统通过删除驱动/安装驱动来释放/分配外设,从而使专属实时操作系统的外设的新驱动中的中断处理及访问处理被实时操作系统专门调用。From the above, the real-time operating environment system releases/allocates the peripherals by deleting/installing the drivers, so that the interrupt processing and access processing in the new drivers of the peripherals dedicated to the real-time operating system are specially called by the real-time operating system.
在第一方面的一种可能实施方式中,所述非实时操作系统包括Linux或Windows系统。In a possible implementation manner of the first aspect, the non-real-time operating system includes a Linux or Windows system.
由上,本申请的构建方法适合在多种非实时操作系统上构建具有实时操作系统的异构系统。From the above, the construction method of the present application is suitable for constructing heterogeneous systems with real-time operating systems on various non-real-time operating systems.
第二方面,本申请实施例提供了一种异构系统的构建装置,其特征在于,包括:第一安装模块,用于在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;第一构建模块,用于通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;第一启动模块,用于由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。In a second aspect, the embodiment of the present application provides a device for constructing a heterogeneous system, which is characterized in that it includes: a first installation module for installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform ; The first building module is used to release and allocate hardware resources dedicated to the real-time operating system in the hardware platform from the non-real-time operating system through the real-time operating environment system, and build a virtual real-time hardware platform based on the hardware resources; The first starting module is configured to install and start the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system, and the device tree of the real-time operating system includes the virtual real-time hardware platform.
由上,通过非实时操作系统上安装的实时运行环境系统构建异构系统,不需要定制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。From the above, constructing a heterogeneous system through the real-time operating environment system installed on the non-real-time operating system does not require customization and modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive hardware resources and strong real-time performance , running a real-time operating system on it, which improves the real-time and security of the whole system.
在第二方面的一种可能实施方式中,所述专属于所述实时操作系统的硬件资源至少包括以下资源中:cpu核、内存、外设。In a possible implementation manner of the second aspect, the hardware resources dedicated to the real-time operating system include at least the following resources: cpu core, memory, and peripherals.
由上,专属实时操作系统的硬件资源:cpu核、内存和外设,不被非实时操作系统使用,为实时操作系统专门使用,提高系统的实时性能。From the above, the hardware resources dedicated to the real-time operating system: cpu core, memory and peripherals are not used by the non-real-time operating system, but are exclusively used by the real-time operating system to improve the real-time performance of the system.
在第二方面的一种可能实施方式中,所述实时运行环境系统在所述虚拟实时硬件平台上启动实时操作系统,包括:在所述CPU核上启动所述实时操作系统,并启动所述设备树中各设备。In a possible implementation manner of the second aspect, starting the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system includes: starting the real-time operating system on the CPU core, and starting the Each device in the device tree.
由上,通过在专属实时操作系统的cpu核启动实时操作系统且根据设备树启动虚拟实时硬件平台中其他设备,实现实时操作系统独占虚拟实时硬件平台的资源。From the above, by starting the real-time operating system on the CPU core of the dedicated real-time operating system and starting other devices in the virtual real-time hardware platform according to the device tree, the real-time operating system can monopolize the resources of the virtual real-time hardware platform.
在第二方面的一种可能实施方式中,所述外设的中断直接投递到所述CPU核,以被所述实时操作系统处理;所述实时操作系统通过所述CPU核直接访问所述内存和所述外设。In a possible implementation manner of the second aspect, the interrupt of the peripheral device is directly delivered to the CPU core to be processed by the real-time operating system; the real-time operating system directly accesses the memory through the CPU core and the peripherals.
由上,通过把专属实时操作系统的外设中断直接投递到专属实时操作系统的CPU核,且通过该CPU核直接访问专属实时操作系统的内存和外设,提高了实时操作系统的实时性。From the above, by directly delivering the peripheral interrupt of the dedicated real-time operating system to the CPU core of the dedicated real-time operating system, and directly accessing the memory and peripherals of the dedicated real-time operating system through the CPU core, the real-time performance of the real-time operating system is improved.
在第二方面的一种可能实施方式中,所述实时运行环境系统中配置有命令集,所述命令集包括:资源释放命令、资源分配命令、系统加载命令、系统启动命令和系统停止命令;所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述非实时操作系统中释放;所述实时运行环境系统通过所述资源分配命令在所述计算机硬件平台上为所述实时运行环境系统分配专属的硬件资源;所述实时运行环境系统通过所述系统加载命令加载所述实时操作系统的镜像文件到所述虚拟实时硬件平台的内存中,实现所述实时操作系统的安装;所述实时运行环境系统通过所述系统启动命令将安装于所述虚拟实时硬件平台的内存中的镜像文件在所述虚拟实时硬件平台上运行启动;所述实时运行环境系统通过所述系统停止命令将运行中的实时操作系统停止运行。所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述实时操作系统中释放。In a possible implementation manner of the second aspect, a command set is configured in the real-time operating environment system, and the command set includes: a resource release command, a resource allocation command, a system loading command, a system start command, and a system stop command; The real-time operating environment system releases the dedicated hardware resources from the non-real-time operating system through a resource release command; the real-time operating environment system provides the real-time The operating environment system allocates exclusive hardware resources; the real-time operating environment system loads the image file of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command to realize the installation of the real-time operating system; The real-time operating environment system starts the image file installed in the memory of the virtual real-time hardware platform on the virtual real-time hardware platform through the system start command; the real-time operating environment system uses the system stop command Stop the running real-time operating system. The real-time operating environment system releases the dedicated hardware resource from the real-time operating system through a resource release command.
由上,通过实时运行环境系统的命令集构建实时操作系统的专属硬件资源,镜像加载实时操作系统的软件和启动实时操作系统,不需要对非实时操作系统进行定制化改造。From the above, the dedicated hardware resources of the real-time operating system are built through the command set of the real-time operating environment system, the software of the real-time operating system is mirrored and the real-time operating system is started, and there is no need to customize the non-real-time operating system.
在第二方面的一种可能实施方式中,所述实时运行环境系统通过资源释放命令从一个操作系统释放一个外设资源时,删除该外设资源的驱动程序;所述实时运行环境系统通过资源分配命令把一个外设资源分配给一个操作系统释放外设资源时,安装该外设资源在该操作系统中的驱动程序。In a possible implementation manner of the second aspect, when the real-time operating environment system releases a peripheral resource from an operating system through a resource release command, the driver program of the peripheral resource is deleted; The allocation command allocates a peripheral resource to an operating system and installs the driver of the peripheral resource in the operating system when releasing the peripheral resource.
由上,实时运行环境系统通过删除驱动/安装驱动来释放/分配外设,从而使专属实时操作系统的外设的新驱动中的中断处理及访问处理被实时操作系统专门调用。From the above, the real-time operating environment system releases/allocates the peripherals by deleting/installing the drivers, so that the interrupt processing and access processing in the new drivers of the peripherals dedicated to the real-time operating system are specially called by the real-time operating system.
在第二方面的一种可能实施方式中,所述非实时操作系统包括Linux或Windows系统。In a possible implementation manner of the second aspect, the non-real-time operating system includes a Linux or Windows system.
由上,本申请的构建装置适合在多种非实时操作系统上构建具有实时操作系统的异构系统。From the above, the construction device of the present application is suitable for constructing heterogeneous systems with real-time operating systems on various non-real-time operating systems.
第三方面,本申请实施例提供了一种操作系统,包括:使用本申请第一方面任一所述实施方式构建的异构系统。In a third aspect, an embodiment of the present application provides an operating system, including: a heterogeneous system constructed using any one of the implementation manners described in the first aspect of the present application.
第四方面,本申请实施例提供了一种计算机,包括:使用本申请第一方面任一所述实施方式构建的异构系统。In a fourth aspect, an embodiment of the present application provides a computer, including: a heterogeneous system constructed using any one of the implementation manners described in the first aspect of the present application.
第五方面,本申请实施例提供了一种计算设备,包括,In a fifth aspect, the embodiment of the present application provides a computing device, including:
总线;bus;
通信接口,其与所述总线连接;a communication interface connected to the bus;
至少一个处理器,其与所述总线连接;以及at least one processor connected to the bus; and
至少一个存储器,其与所述总线连接并存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述至少一个处理器执行本申请第一方面任一所述实施方式。At least one memory is connected to the bus and stores program instructions, and the program instructions, when executed by the at least one processor, cause the at least one processor to execute any one of the implementation manners of the first aspect of the present application.
第六方面,本申请实施例提供了一种计算机可读存储介质,其上存储有程序指令,所述程序指令当被计算机执行时使得所述计算机执行申请第一方面任一所述实施方式。In a sixth aspect, the embodiments of the present application provide a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a computer, the computer executes any one of the implementation manners of the first aspect of the application.
附图说明Description of drawings
图1为本申请的一种异构系统的构建方法实施例一的流程示意图;FIG. 1 is a schematic flowchart of Embodiment 1 of a method for constructing a heterogeneous system of the present application;
图2A为本申请的非实时操作系统的架构示意图;FIG. 2A is a schematic diagram of the architecture of the non-real-time operating system of the present application;
图2B为本申请的一种异构系统的构建方法实施例一构建的异构系统的架构示意图;FIG. 2B is a schematic diagram of the architecture of the heterogeneous system constructed in Embodiment 1 of a method for constructing a heterogeneous system of the present application;
图3为本申请的一种异构系统的构建方法实施例二的流程示意图;FIG. 3 is a schematic flowchart of Embodiment 2 of a method for constructing a heterogeneous system of the present application;
图4为本申请的一种异构系统的构建方法实施例二构建的异构系统的架构示意图;FIG. 4 is a schematic diagram of the architecture of the heterogeneous system constructed in Embodiment 2 of a method for constructing a heterogeneous system of the present application;
图5为本申请的一种异构系统的构建装置实施例一的结构示意图;FIG. 5 is a schematic structural diagram of Embodiment 1 of a device for constructing a heterogeneous system of the present application;
图6为本申请的一种异构系统的构建装置实施例二的结构示意图;FIG. 6 is a schematic structural diagram of Embodiment 2 of a device for constructing a heterogeneous system of the present application;
图7为本申请各实施例的一种计算设备的结构示意图。FIG. 7 is a schematic structural diagram of a computing device according to various embodiments of the present application.
具体实施方式Detailed ways
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
在以下的描述中,所涉及的术语“第一\第二\第三等”或模块A、模块B、模块C等,仅用于区别类似的对象,或用于区别不同的实施例,不代表针对对象的特定排序,可以理解地,在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the terms "first\second\third, etc." or module A, module B, module C, etc. are only used to distinguish similar objects, or to distinguish different embodiments, not Representing a specific ordering for objects, it is understood that the specific order or sequence can be interchanged where permitted, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
在以下的描述中,所涉及的表示步骤的标号,如S110、S120……等,并不表示一定会按此步骤执行,在允许的情况下可以互换前后步骤的顺序,或同时执行。In the following description, the involved reference numerals representing steps, such as S110, S120, etc., do not mean that this step must be executed, and the order of the previous and subsequent steps can be interchanged or executed simultaneously if allowed.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. 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.
本申请实施例提供了一种异构系统的构建方法及装置,所述构建方法包括:在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。本申请的技术方案不需要定制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。The embodiment of the present application provides a method and device for constructing a heterogeneous system. The construction method includes: installing a real-time operating environment system on a non-real-time operating system running on a computer hardware platform; The non-real-time operating system releases and allocates hardware resources dedicated to the real-time operating system in the hardware platform, and builds a virtual real-time hardware platform based on the hardware resources; the real-time operating environment system is installed on the virtual real-time hardware platform And start the real-time operating system, the device tree of the real-time operating system includes the virtual real-time hardware platform. The technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
下面结合附图介绍本申请的各实施例。Various embodiments of the present application are described below with reference to the accompanying drawings.
首选结合图1至图4介绍本申请的各方法实施例。Firstly, various method embodiments of the present application are introduced with reference to FIG. 1 to FIG. 4 .
一种异构系统的构建方法实施例一通过从非实时操作系统释放并分配计算硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;在虚拟实时硬件平台上安装并启动实时操作系统,实时操作系统的设备树中包括虚拟实时硬件平台。本申请的技术方案不需要定制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。Embodiment 1 of a construction method of a heterogeneous system by releasing and allocating hardware resources dedicated to a real-time operating system in a computing hardware platform from a non-real-time operating system, and constructing a virtual real-time hardware platform based on the hardware resources; on the virtual real-time hardware platform The real-time operating system is installed and started, and the device tree of the real-time operating system includes a virtual real-time hardware platform. The technical solution of this application does not require customized modification of the non-real-time operating system, and the constructed virtual real-time hardware platform has dedicated hardware resources and strong real-time performance. Running a real-time operating system on it improves the real-time performance of the entire system and security.
图1示出了一种异构系统的构建方法实施例一的流程,其包括步骤S110至S140。FIG. 1 shows the flow of Embodiment 1 of a construction method of a heterogeneous system, which includes steps S110 to S140.
S110:在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统。S110: Install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform.
其中,实时运行环境系统(Real Time Running Environment,RTRE)为本申请所开发的系统,为非实时操作系统上的软件包,可以安装和卸载,用于对计算机硬件平台的资源划分。Among them, the Real Time Running Environment system (Real Time Running Environment, RTRE) is the system developed by this application, which is a software package on a non-real-time operating system, which can be installed and uninstalled, and is used to divide the resources of the computer hardware platform.
其中,非实时操作系统运行在计算机的硬件平台。在一些实施例中,非实时操作系统为Linux系统,在另一些实施例中,非实时操作系统为Windows系统。无论是 Linux或Windows系统都不具有实时性能。又在一些实施例中,非实时操作系统具有宏内核,在另一些实施例中,非实时操作系统具有微内核。Among them, the non-real-time operating system runs on the hardware platform of the computer. In some embodiments, the non-real-time operating system is a Linux system, and in other embodiments, the non-real-time operating system is a Windows system. Neither Linux nor Windows systems have real-time performance. Still in some embodiments, the non-real-time operating system has a macrokernel, and in other embodiments, the non-real-time operating system has a microkernel.
其中,非实时操作系统为Linux时,其可以为任一个linux发行版本系统,示例地,如ubuntu系统或debian系统。Wherein, when the non-real-time operating system is Linux, it may be any linux distribution system, for example, such as the ubuntu system or the debian system.
S120:由实时运行环境系统从非实时操作系统中释放并分配专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台。S120: The real-time operating environment system releases and allocates hardware resources dedicated to the real-time operating system from the non-real-time operating system, and builds a virtual real-time hardware platform based on the hardware resources.
其中,虚拟实时硬件平台为实时操作系统系统提供专属的硬件资源,在一些实施例中,其包括实时操作系统系统专属的CPU核、内存和外设,该CPU核为同一个处理器上若干CPU核,也可以为其他处理器上CPU核。实时操作系统系统专属的外设包括实时操作系统专用的硬盘、PCI设备、串口和网口等。Wherein, the virtual real-time hardware platform provides dedicated hardware resources for the real-time operating system system. In some embodiments, it includes a CPU core, memory and peripherals dedicated to the real-time operating system system. The CPU cores are several CPUs on the same processor. The core can also be a CPU core on other processors. The peripherals dedicated to the real-time operating system include hard disks, PCI devices, serial ports, and network ports dedicated to the real-time operating system.
其中,虚拟实时硬件平台还为实时操作系统提供第一虚拟外设,第一虚拟外设为实时操作系统系统与非实时操作系统共享的外设对应的虚拟设备,如共享的键盘等。Wherein, the virtual real-time hardware platform also provides a first virtual peripheral for the real-time operating system, and the first virtual peripheral is a virtual device corresponding to a peripheral shared by the real-time operating system and the non-real-time operating system, such as a shared keyboard.
其中,在一些实施例中,实时运行环境系统设置有命令集,该命令集包括资源释放命令、资源分配命令和虚拟外设创建命令,实时运行环境系统通过资源释放命令、资源分配命令和虚拟外设创建命令构建虚拟实时硬件平台。Wherein, in some embodiments, the real-time operating environment system is provided with a command set, the command set includes a resource release command, a resource allocation command, and a virtual peripheral creation command, and the real-time operating environment system uses the resource release command, the resource allocation command, and the virtual peripheral Set the creation command to build a virtual real-time hardware platform.
在一些实施例中,实时运行环境系统通过资源释放命令从一个操作系统释放一个外设资源时,删除该外设资源的驱动程序;实时运行环境系统通过资源分配命令把一个外设资源分配给一个操作系统释放外设资源时,安装该外设资源在该操作系统中的驱动程序。在一些实施例中,实时运行环境系统通过资源分配命令从保留的硬件资源中为实时操作系统分配专属的硬件资源。实时运行环境系统通过虚拟外设创建命令创建第一虚拟外设。In some embodiments, when the real-time operating environment system releases a peripheral resource from an operating system through a resource release command, the driver of the peripheral resource is deleted; the real-time operating environment system allocates a peripheral resource to a resource through a resource allocation command. When the operating system releases the peripheral resource, the driver of the peripheral resource in the operating system is installed. In some embodiments, the real-time operating environment system allocates dedicated hardware resources for the real-time operating system from reserved hardware resources through a resource allocation command. The real-time operating environment system creates the first virtual peripheral through a virtual peripheral creation command.
在另一些实施例中,实时运行环境系统通过资源释放命令从非实时操作系统中剥离出实时操作系统专属的硬件资源,让非实时操作系统不再使用该硬件资源,并通过资源分配命令把该硬件资源分配给实时操作系统,为实时操作系统专属使用。In some other embodiments, the real-time operating environment system strips the dedicated hardware resource of the real-time operating system from the non-real-time operating system through the resource release command, so that the non-real-time operating system no longer uses the hardware resource, and uses the resource allocation command to release the hardware resource The hardware resources are allocated to the real-time operating system and used exclusively by the real-time operating system.
在一些实施例中,当构建多个实时操作系统时,每个实时操作系统各自有专属的硬件资源以及第一虚拟外设,构成每个实时操作系统各自的虚拟实时硬件平台。In some embodiments, when constructing multiple real-time operating systems, each real-time operating system has its own dedicated hardware resources and first virtual peripherals, forming a virtual real-time hardware platform for each real-time operating system.
S130:由实时运行环境系统在虚拟实时硬件平台上安装和启动实时操作系统。S130: Install and start the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system.
其中,实时操作系统系统的设备树包括虚拟实时硬件平台,在一些实施例中,实时运行环境系统在虚拟实时硬件平台上启动实时操作系统时,在实时操作系统系统专属的CPU核上启动实时操作系统,并启动所述设备树中各设备。Wherein, the device tree of the real-time operating system system includes a virtual real-time hardware platform. In some embodiments, when the real-time operating environment system starts the real-time operating system on the virtual real-time hardware platform, it starts real-time operation on the dedicated CPU core of the real-time operating system system. system, and start each device in the device tree.
其中,实时操作系统建立在虚拟实时硬件平台上,虚拟实时硬件平台直接由实时操作系统系统专属的CPU核、内存和外设构成,可以认为实时操作系统建立在裸机的硬件上。Among them, the real-time operating system is built on the virtual real-time hardware platform. The virtual real-time hardware platform is directly composed of the CPU core, memory and peripherals dedicated to the real-time operating system system. It can be considered that the real-time operating system is built on bare-metal hardware.
在一些实施例中,在实时操作系统及上面应用程序运行时,实时操作系统专属的外设的中断直接投递到实时操作系统系统专属的CPU核,以被实时操作系统处理,中断响应路径与裸机相同,且实时操作系统及上面应用程序通过实时操作系统系统专属的CPU核直接访问实时操作系统系统专属的内存和外设,因此,该实时操作系统具有较高的实时性高。In some embodiments, when the real-time operating system and the above application program are running, the interrupt of the peripheral device dedicated to the real-time operating system is directly delivered to the CPU core dedicated to the real-time operating system system to be processed by the real-time operating system, and the interrupt response path is the same as that of the bare metal The same, and the real-time operating system and the above applications directly access the dedicated memory and peripherals of the real-time operating system system through the dedicated CPU core of the real-time operating system system. Therefore, the real-time operating system has high real-time performance.
其中,在一些实施例中,实时运行环境系统的命令集还包括系统加载命令、系统 启动命令,实时运行环境系统通过系统加载命令把实时操作系统的软件包镜像加载到虚拟实时硬件平台的内存中,通过系统启动命令启动实时操作系统,从而在一个计算机硬件平台上构建包括非实时操作系统和实时操作系统的异构系统。Wherein, in some embodiments, the command set of the real-time operating environment system also includes a system loading command and a system startup command, and the real-time operating environment system loads the software package image of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command , start the real-time operating system through the system startup command, so as to build a heterogeneous system including non-real-time operating system and real-time operating system on a computer hardware platform.
其中,实时操作系统包括嵌入式在内的实施操作系统,示例地,如Intelwell RT系统。Wherein, the real-time operating system includes an embedded operating system, for example, such as the Intelwell RT system.
在一些实施例中,当构建多个实时操作系统时,分别在每个实时操作系统各自的虚拟实时硬件平台上,启动对应的实时操作系统。In some embodiments, when multiple real-time operating systems are constructed, the corresponding real-time operating systems are started on the respective virtual real-time hardware platforms of each real-time operating system.
图2A示出了非实时操作系统的架构,非实时操作系统直接运行在计算机的硬件平台上。示例地,图2A中非实时操作系统包括Linux和Windows系统。FIG. 2A shows the architecture of a non-real-time operating system, and the non-real-time operating system runs directly on the hardware platform of the computer. Exemplarily, the non-real-time operating system in FIG. 2A includes Linux and Windows systems.
图2B示出了本申请构建的异构系统的架构,实时运行环境系统运行在非实时操作系统中,在实时运行环境系统上运行实时操作系统,示例地,图2B中实时操作系统包括Intewell RT系统。虽然图2B中实时操作系统运行在实时运行环境系统上,但其本质是直接运行在由实时操作系统系统专属的CPU核、内存和外设构成的虚拟实时硬件平台,相当于直接运行在裸硬件机上。当非实时操作系统出现问题时,不影响实时操作系统系统的运行,提高了实时操作系统的安全性。Figure 2B shows the architecture of the heterogeneous system constructed by the present application, the real-time operating environment system runs in the non-real-time operating system, and the real-time operating system runs on the real-time operating environment system, for example, the real-time operating system in Figure 2B includes Intewell RT system. Although the real-time operating system in Figure 2B runs on the real-time operating environment system, its essence is to run directly on the virtual real-time hardware platform composed of the dedicated CPU core, memory and peripherals of the real-time operating system system, which is equivalent to running directly on the bare hardware. on board. When a problem occurs in the non-real-time operating system, it does not affect the operation of the real-time operating system, which improves the security of the real-time operating system.
由上,本申请的实时操作系统建立在虚拟实时硬件平台上,虚拟实时硬件平台具有实时操作系统专属的硬件资源,因此,本申请的实时操作系统具有较强的有实时操作系统的性能,且提高了实时操作系统的安全性。From the above, the real-time operating system of the present application is built on the virtual real-time hardware platform, and the virtual real-time hardware platform has hardware resources dedicated to the real-time operating system. Therefore, the real-time operating system of the present application has a strong real-time operating system performance, and Improved security for real-time operating systems.
S140:当停止实时操作系统时,由实时运行环境系统把实时操作系统专属的硬件资源释放给非实时操作系统。S140: When the real-time operating system is stopped, the real-time operating environment system releases hardware resources dedicated to the real-time operating system to the non-real-time operating system.
其中,在一些实施例中,实时运行环境系统的命令集还包括系统停止命令、资源释放命令,实时运行环境系统通过系统停止命令停止实时操作系统,实时运行环境系统通过资源释放命令把实时操作系统专属的硬件资源释放给非实时操作系统。Wherein, in some embodiments, the command set of the real-time operating environment system also includes a system stop command and a resource release command. Dedicated hardware resources are released to non-real-time operating systems.
综上,一种异构系统的构建方法实施例一通过在非实时操作系统上安装实时运行环境系统,由实时运行环境系统提供虚拟实时硬件平台,虚拟实时硬件平台包括实时操作系统提供专属的硬件资源,并在虚拟实时硬件平台上安装和运行实时操作系统,以构建异构系统。一种异构系统的构建方法实施例一构建的异构系统通过在非实时操作系统上的实时运行环境系统实现,不需要定制化修改非实时操作系统,且构建的虚拟实时硬件平台上具有专属的硬件资源,具有较强的实时性能,在其上运行实时操作系统,提高了整个系统实时性和安全性。To sum up, Embodiment 1 of a method for constructing a heterogeneous system installs a real-time operating environment system on a non-real-time operating system, and the real-time operating environment system provides a virtual real-time hardware platform, and the virtual real-time hardware platform includes a real-time operating system to provide dedicated hardware. resources, and install and run a real-time operating system on a virtual real-time hardware platform to build a heterogeneous system. A method for building a heterogeneous system Embodiment 1 The constructed heterogeneous system is realized by the real-time operating environment system on the non-real-time operating system, without customizing and modifying the non-real-time operating system, and the constructed virtual real-time hardware platform has exclusive The hardware resource has strong real-time performance, and the real-time operating system runs on it, which improves the real-time performance and security of the whole system.
一种异构系统的构建方法实施例二为一种异构系统的构建方法实施例一在ubuntu操作系统上的实施方式。图3示出了方法实施例二的详细流程,其包括步骤S310至S360。Embodiment 2 of a method for constructing a heterogeneous system is an implementation of Embodiment 1 of a method for constructing a heterogeneous system on the ubuntu operating system. FIG. 3 shows the detailed flow of the second method embodiment, which includes steps S310 to S360.
S310:在计算机硬件平台上安装ubuntu操作系统。S310: installing the ubuntu operating system on the computer hardware platform.
其中,ubuntu操作系统为一个Linux的发行系统。Wherein, the ubuntu operating system is a Linux distribution system.
S320:在ubuntu操作系统上安装实时运行环境系统RTRE的软件。S320: installing the software of the real-time operating environment system RTRE on the ubuntu operating system.
其中,RTRE设置有命令集用于管理实时操作系统。该命令集包括:Among them, the RTRE is provided with a command set for managing the real-time operating system. The command set includes:
资源分配命令,如cpu alloc、mem alloc和deviceName alloc,其中,deviceName 是定义的外设的名称;Resource allocation commands, such as cpu alloc, mem alloc and deviceName alloc, where deviceName is the name of the defined peripheral;
资源释放命令,如cpu free、mem free和deviceName free;Resource release commands, such as cpu free, mem free and deviceName free;
实时操作系统管理的系统安装/启动/停止命令,如loadRT/StartRT/StopRT。System installation/start/stop commands for RTOS management, such as loadRT/StartRT/StopRT.
虚拟外设创建命令,如rt vdeviceName create,其中,vdeviceName是定义的虚拟外设的名称。Virtual peripheral creation command, such as rt vdeviceName create, where vdeviceName is the name of the defined virtual peripheral.
S330:RTRE通过资源分配命令从ubuntu系统中剥离出来实时操作系统专属的硬件资源,并分配给实时操作系统,还通过虚拟外设创建命令创建第一虚拟外设。S330: The RTRE strips out the dedicated hardware resources of the real-time operating system from the ubuntu system through a resource allocation command, and allocates them to the real-time operating system, and creates a first virtual peripheral through a virtual peripheral creation command.
其中,该专属的硬件资源包括实时操作系统专属的CPU核、内存和外设。Wherein, the dedicated hardware resources include CPU cores, memory and peripherals dedicated to the real-time operating system.
其中,RTRE根据配置数据通过执行cpu free命令将实时操作系统专属的CPU核从ubuntu系统中剥离出来,并通过cpu alloc命令把该专属的CPU核分配给实时操作系统,本过程可以看成是非实时操作系统的CPU核分配的逆过程。Among them, RTRE strips the dedicated CPU core of the real-time operating system from the ubuntu system by executing the cpu free command according to the configuration data, and allocates the dedicated CPU core to the real-time operating system through the cpu alloc command. This process can be regarded as a non-real-time The reverse process of the CPU core allocation of the operating system.
其中,RTRE根据配置数据通过执行mem free命令将实时操作系统专属的内存从ubuntu系统中剥离出来,并通过mem alloc命令把该专属的内存分配给实时操作系统,本过程可以看成是非实时操作系统的内存分配的逆过程。Among them, RTRE strips the dedicated memory of the real-time operating system from the ubuntu system by executing the mem free command according to the configuration data, and allocates the dedicated memory to the real-time operating system through the mem alloc command. This process can be regarded as a non-real-time operating system The inverse process of memory allocation.
其中,RTRE根据配置数据通过执行deviceName free命令将实时操作系统专属的外设从ubuntu系统中剥离出来,并通过deviceName alloc命令把该专属的外设分配给实时操作系统,本过程可以看成是非实时操作系统的外设分配的逆过程。该专属的外设包括实时操作系统专用的硬盘、PCI设备和网口等Among them, RTRE strips the peripherals exclusive to the real-time operating system from the ubuntu system by executing the deviceName free command according to the configuration data, and assigns the exclusive peripherals to the real-time operating system through the deviceName alloc command. This process can be regarded as non-real-time The reverse process of the peripheral allocation of the operating system. The dedicated peripherals include hard disks, PCI devices, and network ports dedicated to the real-time operating system.
其中,RTRE根据配置数据执行rt vdeviceName create创建第一虚拟外设,第一虚拟外设为实时操作系统系统与非实时操作系统共享的外设对应的虚拟设备。示例地,该共享的外设包括共享的串口和共享的网口等。Wherein, the RTRE executes rt vdeviceName create according to the configuration data to create the first virtual peripheral, and the first virtual peripheral is a virtual device corresponding to a peripheral shared by the real-time operating system and the non-real-time operating system. Exemplarily, the shared peripheral includes a shared serial port, a shared network port, and the like.
在一些实施例中,上述的配置数据通过非实时操作系统的配置。在另一些实施中,上述的配置数据通过整个异构系统的IDE配置。In some embodiments, the above-mentioned configuration data is configured by a non-real-time operating system. In other implementations, the above configuration data is configured through the IDE of the entire heterogeneous system.
S340:RTRE使用从ubuntu系统剥离的硬件资源和创建的第一虚拟外设构建一个虚拟实时硬件平台vm1。S340: RTRE constructs a virtual real-time hardware platform vm1 by using the hardware resources stripped from the ubuntu system and the created first virtual peripheral.
其中,虚拟实时硬件平台vm1为实时操作系统提供硬件平台。Among them, the virtual real-time hardware platform vm1 provides a hardware platform for the real-time operating system.
S350:通过RTRE的加载和启动功能,镜像加载Intewell RT到实时操作系统专属的内存中,并启动Intewell RT。S350: Through the loading and starting function of RTRE, the image loads Intewell RT into the memory dedicated to the real-time operating system, and starts Intewell RT.
其中,通过RTRE的loadRT命令,加载Intewell RT镜像到vm1的内存中,并通过RTRE的startRT命令,启动已经加载到vm1的Intewell RT系统。Among them, load the Intewell RT image into the memory of vm1 through the loadRT command of RTRE, and start the Intewell RT system that has been loaded into vm1 through the startRT command of RTRE.
其中,此时linux系统和intewell RT系统在一个硬件平台上同时运行,该系统具备强实时性能。Among them, at this time, the linux system and the intewell RT system run simultaneously on a hardware platform, and the system has strong real-time performance.
图4示出了方法实施例二构建的异构系统的架构图,其非实时操作系统为ubuntu系统,实时操作系统为intewell RT系统。Fig. 4 shows the architecture diagram of the heterogeneous system constructed in the second method embodiment, the non-real-time operating system is the ubuntu system, and the real-time operating system is the intewell RT system.
S360:当停止运行Intewell RT系统时,通过RTRE释放实时操作系统专属的硬件资源至ubuntu系统。S360: When the Intewell RT system stops running, release the hardware resources dedicated to the real-time operating system to the ubuntu system through RTRE.
其中,通过RTRE提供的stopRT命令停止intewell RT系统,然后执行RTRE提供的cpu free、mem free、deviceName free命令将vm1中的CPU核、内存和外设释放给ubuntu系统使用。Among them, stop the intewell RT system through the stopRT command provided by RTRE, and then execute the cpu free, mem free, and deviceName free commands provided by RTRE to release the CPU core, memory and peripherals in vm1 to the ubuntu system for use.
综上,一种异构系统的构建方法实施例二通过在ubuntu系统上安装实时运行环境系统RTRE,由RTRE提供虚拟实时硬件平台vml,vml包括实时操作系统提供专属的硬件资源,并在vml上安装和运行实时操作系统Intewell RT,以构建异构系统。本实施例构建的异构系统,其实时操作系统具有专属的硬件资源,具有较强的实时性能。在ubuntu系统上构建一个RTRE,在其上运行实时操作系统Intewell RT从而提升系统的实时性能,不需要定制化修改ubuntu系统,同时提高了整个系统的实时性和安全性。To sum up, the second embodiment of a heterogeneous system construction method installs the real-time operating environment system RTRE on the ubuntu system, and RTRE provides a virtual real-time hardware platform vml, and vml includes a real-time operating system to provide dedicated hardware resources, and on vml Install and run the real-time operating system Intewell RT to build heterogeneous systems. In the heterogeneous system constructed in this embodiment, the real-time operating system has dedicated hardware resources and has strong real-time performance. Build an RTRE on the ubuntu system, run the real-time operating system Intewell RT on it to improve the real-time performance of the system, without customizing the ubuntu system, and improve the real-time and security of the entire system.
下面结合图5至图6介绍本申请的各装置实施例。Various device embodiments of the present application are introduced below with reference to FIG. 5 to FIG. 6 .
一种异构系统的构建装置实施例一运行一种异构系统的构建方法实施例一的方法。Embodiment 1 of an apparatus for constructing a heterogeneous system runs the method of Embodiment 1 of a method for constructing a heterogeneous system.
图5示出了一种异构系统的构建装置实施例一的结构,其包括:第一安装模块510,第一构建模块520,第一启动模块530,第一释放模块540。FIG. 5 shows the structure of Embodiment 1 of a construction device for a heterogeneous system, which includes: a first installation module 510 , a first construction module 520 , a first startup module 530 , and a first release module 540 .
第一安装模块510用于在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统,其工作原理和优点请参照一种异构系统的构建方法实施例一的步骤S110,这里不再详述。The first installation module 510 is used to install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform. For its working principle and advantages, please refer to step S110 in Embodiment 1 of a method for constructing a heterogeneous system. More details.
第一构建模块520用于由实时运行环境系统从非实时操作系统中释放并分配专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台,其工作原理和优点请参照一种异构系统的构建方法实施例一的步骤S120,这里不再详述。The first building block 520 is used to release and allocate hardware resources dedicated to the real-time operating system from the non-real-time operating system by the real-time operating environment system, and build a virtual real-time hardware platform based on the hardware resources. For its working principle and advantages, please refer to a The step S120 of the first embodiment of the heterogeneous system construction method will not be described in detail here.
第一启动模块530用于由实时运行环境系统在虚拟实时硬件平台上安装和启动各实时操作系统,其工作原理和优点请参照一种异构系统的构建方法实施例一的步骤S120,这里不再详述。The first start-up module 530 is used to install and start each real-time operating system on the virtual real-time hardware platform by the real-time operating environment system. For its working principle and advantages, please refer to step S120 in Embodiment 1 of a method for constructing a heterogeneous system. More details.
第一释放模块540用于当停止实时操作系统时,由实时运行环境系统把实时操作系统专属的硬件资源释放给非实时操作系统,其工作原理和优点请参照一种异构系统的构建方法实施例一的步骤S140,这里不再详述。The first release module 540 is used to release the dedicated hardware resources of the real-time operating system to the non-real-time operating system by the real-time operating environment system when the real-time operating system is stopped. For its working principle and advantages, please refer to a construction method of a heterogeneous system for implementation. Step S140 of Example 1 will not be described in detail here.
一种异构系统的构建装置实施例二运行一种异构系统的构建方法实施例二的方法。Embodiment 2 of an apparatus for constructing a heterogeneous system runs the method of Embodiment 2 of a method for constructing a heterogeneous system.
图6示出了装置实施例一的结构,其包括:第二安装模块610,第一安装模块620,第一构建模块630,第一启动模块650,第一释放模块660。FIG. 6 shows the structure of the first embodiment of the device, which includes: a second installation module 610 , a first installation module 620 , a first construction module 630 , a first activation module 650 , and a first release module 660 .
第二安装模块610在计算机硬件平台上安装ubuntu操作系统,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S310,这里不再详述。The second installation module 610 installs the ubuntu operating system on the computer hardware platform. For its working principle and advantages, please refer to step S310 in the second embodiment of a method for constructing a heterogeneous system, which will not be described in detail here.
第一安装模块620用于在ubuntu操作系统上安装实时运行环境系统RTRE的软件,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S320,这里不再详述。The first installation module 620 is used to install the software of the real-time operating environment system RTRE on the ubuntu operating system. For its working principle and advantages, please refer to step S320 in the second embodiment of a method for constructing a heterogeneous system, which will not be described in detail here.
第一构建模块630用于由RTRE通过资源分配命令从ubuntu系统中剥离出来实时操作系统专属的硬件资源,并分配给实时操作系统,还通过虚拟外设创建命令创建第一虚拟外设,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S330,这里不再详述。The first building block 630 is used for RTRE to strip the dedicated hardware resource of the real-time operating system from the ubuntu system through the resource allocation command, and allocate it to the real-time operating system, and also create the first virtual peripheral through the virtual peripheral creation command, and its work For the principles and advantages, please refer to step S330 in Embodiment 2 of a method for constructing a heterogeneous system, which will not be described in detail here.
第一构建模块630还用于RTRE使用从ubuntu系统剥离的硬件资源和创建的第一虚拟外设构建一个虚拟实时硬件平台vm1,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S340,这里不再详述。The first building module 630 is also used for RTRE to build a virtual real-time hardware platform vm1 using the hardware resources stripped from the ubuntu system and the created first virtual peripheral. For its working principle and advantages, please refer to a construction method embodiment of a heterogeneous system The second step S340 will not be described in detail here.
第一启动模块650用于通过RTRE的加载和启动命令,镜像加载Intewell RT到vml的内存中,并启动Intewell RT,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S350,这里不再详述。The first start-up module 650 is used to mirror load Intewell RT into the memory of vml through the loading and start-up commands of RTRE, and start Intewell RT. For its working principle and advantages, please refer to the steps in the second embodiment of a construction method of a heterogeneous system S350, no more details here.
第一释放模块660用于当不需要运行Intewell RT系统时,使用RTRE释放实时操作系统专属的硬件资源至ubuntu系统,其工作原理和优点请参照一种异构系统的构建方法实施例二的步骤S360,这里不再详述。The first release module 660 is used to use RTRE to release the dedicated hardware resources of the real-time operating system to the ubuntu system when the Intewell RT system does not need to be run. For its working principle and advantages, please refer to the steps in the second embodiment of a construction method of a heterogeneous system S360, no more details here.
本申请实施例还提供的一种操作系统,其包括通过一种异构系统的构建方法实施例一或一种异构系统的构建方法实施例二构建的异构系统。The embodiment of the present application also provides an operating system, which includes a heterogeneous system constructed by Embodiment 1 of a method for constructing a heterogeneous system or Embodiment 2 of a method for constructing a heterogeneous system.
本申请实施例还提供的一种计算机实施例,其包括通过一种异构系统的构建方法实施例一或一种异构系统的构建方法实施例二构建的异构系统。The embodiment of the present application also provides a computer embodiment, which includes a heterogeneous system constructed by Embodiment 1 of a method for constructing a heterogeneous system or Embodiment 2 of a method for constructing a heterogeneous system.
本申请实施例还提供了一种计算设备,下面结合图7详细介绍。The embodiment of the present application also provides a computing device, which will be described in detail below with reference to FIG. 7 .
该计算设备700包括,处理器710、存储器720、通信接口730、总线740。The computing device 700 includes a processor 710 , a memory 720 , a communication interface 730 , and a bus 740 .
应理解,该图所示的计算设备700中的通信接口730可以用于与其他设备之间进行通信。It should be understood that the communication interface 730 in the computing device 700 shown in this figure can be used to communicate with other devices.
其中,该处理器710可以与存储器720连接。该存储器720可以用于存储该程序代码和数据。因此,该存储器720可以是处理器710内部的存储单元,也可以是与处理器710独立的外部存储单元,还可以是包括处理器710内部的存储单元和与处理器710独立的外部存储单元的部件。Wherein, the processor 710 may be connected to the memory 720 . The memory 720 can be used to store the program codes and data. Therefore, the memory 720 may be a storage unit inside the processor 710, or an external storage unit independent of the processor 710, or may include a storage unit inside the processor 710 and an external storage unit independent of the processor 710. part.
可选的,计算设备700还可以包括总线740。其中,存储器720、通信接口730可以通过总线740与处理器710连接。总线740可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(EFStended Industry Standard Architecture,EISA)总线等。所述总线740可以分为地址总线、数据总线、控制总线等。为便于表示,该图中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。Optionally, computing device 700 may further include a bus 740 . Wherein, the memory 720 and the communication interface 730 may be connected to the processor 710 through the bus 740 . The bus 740 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EFStended Industry Standard Architecture, EISA) bus or the like. The bus 740 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one line is used in this figure, but it does not mean that there is only one bus or one type of bus.
应理解,在本申请实施例中,该处理器710可以采用中央处理单元(central processing unit,CPU)。该处理器还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。或者该处理器710采用一个或多个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。It should be understood that, in this embodiment of the present application, the processor 710 may be a central processing unit (central processing unit, CPU). The processor can also be other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), off-the-shelf programmable gate arrays (field programmable gate arrays, FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. Alternatively, the processor 710 adopts one or more integrated circuits for executing related programs, so as to realize the technical solutions provided by the embodiments of the present application.
该存储器720可以包括只读存储器和随机存取存储器,并向处理器710提供指令和数据。处理器710的一部分还可以包括非易失性随机存取存储器。例如,处理器710还可以存储设备类型的信息。The memory 720 may include read-only memory and random-access memory, and provides instructions and data to the processor 710 . A portion of processor 710 may also include non-volatile random access memory. For example, processor 710 may also store device type information.
在计算设备700运行时,所述处理器710执行所述存储器720中的计算机执行指令执行各方法实施例的操作步骤。When the computing device 700 is running, the processor 710 executes the computer-implemented instructions in the memory 720 to perform the operation steps of the various method embodiments.
应理解,根据本申请实施例的计算设备700可以对应于执行根据本申请各实施例的方法中的相应主体,并且计算设备700中的各个模块的上述和其它操作和/或功能分别为了实现本实施例各方法的相应流程,为了简洁,在此不再赘述。It should be understood that the computing device 700 according to the embodiment of the present application may correspond to a corresponding body executing the methods according to the various embodiments of the present application, and the above-mentioned and other operations and/or functions of the modules in the computing device 700 are for realizing the present invention For the sake of brevity, the corresponding processes of the methods in the embodiments are not repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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 may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括,U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function 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 is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc. .
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时用于执行各方法实施例的操作步骤。The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and the program is used to execute the operation steps of each method embodiment when executed by a processor.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是,但不限于,电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列 表)包括,具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present application may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include, electrical connections with one or more leads, portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括、但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a 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.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider). connect).
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,均属于本申请保护范畴。Note that the above are only preferred embodiments and technical principles used in this application. Those skilled in the art will understand that the present application is not limited to the specific embodiments described here, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the present application. Apply for a category of protection.

Claims (12)

  1. 一种异构系统的构建方法,其特征在于,包括:A construction method of a heterogeneous system, characterized in that, comprising:
    在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;Install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform;
    通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;releasing and allocating hardware resources specific to the real-time operating system in the hardware platform from the non-real-time operating system through the real-time operating environment system, and constructing a virtual real-time hardware platform based on the hardware resources;
    由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。The real-time operating system is installed and started on the virtual real-time hardware platform by the real-time operating environment system, and the device tree of the real-time operating system includes the virtual real-time hardware platform.
  2. 根据权利要求1所述构建方法,其特征在于,所述专属于所述实时操作系统的硬件资源至少包括以下资源中:cpu核、内存、外设。The construction method according to claim 1, wherein the hardware resources dedicated to the real-time operating system at least include the following resources: CPU core, memory, and peripherals.
  3. 根据权利要求2所述构建方法,其特征在于,所述实时运行环境系统在所述虚拟实时硬件平台上启动实时操作系统,包括:The construction method according to claim 2, wherein the real-time operating environment system starts a real-time operating system on the virtual real-time hardware platform, including:
    在所述CPU核上启动所述实时操作系统,并启动所述设备树中各设备。Start the real-time operating system on the CPU core, and start each device in the device tree.
  4. 根据权利要求2所述构建方法,其特征在于,还包括:所述外设的中断直接投递到所述CPU核,以被所述实时操作系统处理;The construction method according to claim 2, further comprising: directly delivering the interrupt of the peripheral device to the CPU core to be processed by the real-time operating system;
    所述实时操作系统通过所述CPU核直接访问所述内存和所述外设。The real-time operating system directly accesses the memory and the peripherals through the CPU core.
  5. 根据权利要求1所述构建方法,其特征在于,所述实时运行环境系统中配置有命令集,所述命令集包括:资源释放命令、资源分配命令、系统加载命令、系统启动命令和系统停止命令;The construction method according to claim 1, wherein a command set is configured in the real-time operating environment system, and the command set includes: a resource release command, a resource allocation command, a system load command, a system start command, and a system stop command ;
    所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述非实时操作系统中释放;The real-time operating environment system releases the dedicated hardware resources from the non-real-time operating system through a resource release command;
    所述实时运行环境系统通过所述资源分配命令在所述计算机硬件平台上为所述实时运行环境系统分配专属的硬件资源;The real-time operating environment system allocates dedicated hardware resources for the real-time operating environment system on the computer hardware platform through the resource allocation command;
    所述实时运行环境系统通过所述系统加载命令加载所述实时操作系统的镜像文件到所述虚拟实时硬件平台的内存中,实现所述实时操作系统的安装;The real-time operating environment system loads the image file of the real-time operating system into the memory of the virtual real-time hardware platform through the system loading command, so as to realize the installation of the real-time operating system;
    所述实时运行环境系统通过所述系统启动命令将安装于所述虚拟实时硬件平台的内存中的镜像文件在所述虚拟实时硬件平台上运行启动;The real-time operating environment system runs and starts the image file installed in the memory of the virtual real-time hardware platform on the virtual real-time hardware platform through the system startup command;
    所述实时运行环境系统通过所述系统停止命令将运行中的实时操作系统停止运行。The real-time operating environment system stops the running real-time operating system through the system stop command.
  6. 根据权利要求4所述构建方法,其特征在于,所述实时运行环境系统通过资源释放命令将所述专属的硬件资源从所述实时操作系统中释放。The construction method according to claim 4, wherein the real-time operating environment system releases the dedicated hardware resource from the real-time operating system through a resource release command.
  7. 根据权利要求6所述构建方法,其特征在于,所述实时运行环境系统通过资源释放命令从一个操作系统释放一个外设资源时,删除该外设资源的驱动程序;The construction method according to claim 6, wherein when the real-time operating environment system releases a peripheral resource from an operating system through a resource release command, the driver of the peripheral resource is deleted;
    所述实时运行环境系统通过资源分配命令把一个外设资源分配给一个操作系统释放外设资源时,安装该外设资源在该操作系统中的驱动程序。When the real-time operating environment system allocates a peripheral resource to an operating system to release the peripheral resource through a resource allocation command, it installs the driver of the peripheral resource in the operating system.
  8. 根据权利要求1至7任一所述构建方法,其特征在于,所述非实时操作系统包括Linux或Windows系统。The construction method according to any one of claims 1 to 7, wherein the non-real-time operating system includes a Linux or Windows system.
  9. 一种异构系统的构建装置,其特征在于,包括:A construction device for a heterogeneous system, characterized in that, comprising:
    第一安装模块,用于在运行于计算机硬件平台上的非实时操作系统上安装实时运行环境系统;The first installation module is used to install a real-time operating environment system on a non-real-time operating system running on a computer hardware platform;
    第一构建模块,用于通过所述实时运行环境系统从所述非实时操作系统释放并分配所述硬件平台中专属于实时操作系统的硬件资源,并基于该硬件资源构建虚拟实时硬件平台;The first building module is used to release and allocate hardware resources dedicated to the real-time operating system in the hardware platform from the non-real-time operating system through the real-time operating environment system, and build a virtual real-time hardware platform based on the hardware resources;
    第一启动模块,用于由所述实时运行环境系统在所述虚拟实时硬件平台上安装并启动所述实时操作系统,所述实时操作系统的设备树中包括所述虚拟实时硬件平台。The first starting module is configured to install and start the real-time operating system on the virtual real-time hardware platform by the real-time operating environment system, and the device tree of the real-time operating system includes the virtual real-time hardware platform.
  10. 一种操作系统,其特征在于,包括:An operating system, characterized in that it comprises:
    使用权利要求1至8任一所述构建方法构建的异构系统。A heterogeneous system constructed using the construction method described in any one of claims 1 to 8.
  11. 一种计算设备,其特征在于,包括:A computing device, comprising:
    总线;bus;
    通信接口,其与所述总线连接;a communication interface connected to the bus;
    至少一个处理器,其与所述总线连接;以及at least one processor connected to the bus; and
    至少一个存储器,其与所述总线连接并存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述至少一个处理器执行权利要求1至8任一所述构建方法。At least one memory, which is connected to the bus and stores program instructions, which when executed by the at least one processor causes the at least one processor to execute the construction method described in any one of claims 1 to 8.
  12. 一种计算机可读存储介质,其上存储有程序指令,其特征在于,所述程序指令当被计算机执行时使得所述计算机执行权利要求1至8任一所述构建方法。A computer-readable storage medium, on which program instructions are stored, wherein, when the program instructions are executed by a computer, the computer executes the construction method described in any one of claims 1 to 8.
PCT/CN2022/141080 2021-12-24 2022-12-22 Construction method and apparatus for heterogeneous system WO2023116832A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111597189.3A CN114253904A (en) 2021-12-24 2021-12-24 Construction method and device of heterogeneous system
CN202111597189.3 2021-12-24

Publications (1)

Publication Number Publication Date
WO2023116832A1 true WO2023116832A1 (en) 2023-06-29

Family

ID=80794924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141080 WO2023116832A1 (en) 2021-12-24 2022-12-22 Construction method and apparatus for heterogeneous system

Country Status (2)

Country Link
CN (1) CN114253904A (en)
WO (1) WO2023116832A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389691A (en) * 2023-12-11 2024-01-12 利尔达科技集团股份有限公司 Virtual machine based on embedded operating system

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253904A (en) * 2021-12-24 2022-03-29 科东(广州)软件科技有限公司 Construction method and device of heterogeneous system
CN116302303B (en) * 2022-09-09 2024-02-13 科东(广州)软件科技有限公司 Real-time enhancement method and device based on type1 virtualization system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064364A1 (en) * 2008-09-11 2010-03-11 International Business Machines Corporation Method for Creating Multiple Virtualized Operating System Environments
US9069591B1 (en) * 2009-09-10 2015-06-30 Parallels IP Holding GmbH Patching host OS structures for hardware isolation of virtual machines
CN107436810A (en) * 2017-07-03 2017-12-05 北京东土科技股份有限公司 A kind of resource for computer system dispatching method and device
CN112559190A (en) * 2020-12-23 2021-03-26 科东(广州)软件科技有限公司 Resource allocation method, system, device, equipment and medium among heterogeneous systems
CN112732183A (en) * 2020-12-30 2021-04-30 科东(广州)软件科技有限公司 Access method, device and equipment of heterogeneous system storage equipment and storage medium
CN114253904A (en) * 2021-12-24 2022-03-29 科东(广州)软件科技有限公司 Construction method and device of heterogeneous system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493781B (en) * 2008-01-24 2012-02-15 中国长城计算机深圳股份有限公司 Virtual machine system and start-up method thereof
CN113360422B (en) * 2021-07-13 2022-02-18 科东(广州)软件科技有限公司 Method and device for transmitting and receiving data by real-time operating system equipment in heterogeneous system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064364A1 (en) * 2008-09-11 2010-03-11 International Business Machines Corporation Method for Creating Multiple Virtualized Operating System Environments
US9069591B1 (en) * 2009-09-10 2015-06-30 Parallels IP Holding GmbH Patching host OS structures for hardware isolation of virtual machines
CN107436810A (en) * 2017-07-03 2017-12-05 北京东土科技股份有限公司 A kind of resource for computer system dispatching method and device
CN112559190A (en) * 2020-12-23 2021-03-26 科东(广州)软件科技有限公司 Resource allocation method, system, device, equipment and medium among heterogeneous systems
CN112732183A (en) * 2020-12-30 2021-04-30 科东(广州)软件科技有限公司 Access method, device and equipment of heterogeneous system storage equipment and storage medium
CN114253904A (en) * 2021-12-24 2022-03-29 科东(广州)软件科技有限公司 Construction method and device of heterogeneous system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389691A (en) * 2023-12-11 2024-01-12 利尔达科技集团股份有限公司 Virtual machine based on embedded operating system
CN117389691B (en) * 2023-12-11 2024-03-22 利尔达科技集团股份有限公司 Virtual machine based on embedded operating system

Also Published As

Publication number Publication date
CN114253904A (en) 2022-03-29

Similar Documents

Publication Publication Date Title
WO2023116832A1 (en) Construction method and apparatus for heterogeneous system
JP5323897B2 (en) Method, apparatus and system for bi-directional communication between a virtual machine monitor and an ACPI compliant guest operating system
RU2639693C1 (en) Method for resource processing, operating system and device
US20050216920A1 (en) Use of a virtual machine to emulate a hardware device
US20160364243A1 (en) Out-of-band (oob) real-time inventory and configuration of original equipment manufacturer (oem) devices using advanced configuration and power interface (acpi) and unified extensible firmware interface (uefi) services
US20090265708A1 (en) Information Processing Apparatus and Method of Controlling Information Processing Apparatus
EP2843552B1 (en) Method and system for executing callback functions delivered via a communication between a user-space application and the operating system kernel
US20140351637A1 (en) Executing a kernel device driver as a user space process
JP6458959B2 (en) Co-designed dynamic language accelerator for processors
CN107430570B (en) Additional secure execution environment with SR-IOV and xHCI-IOV
US8468334B1 (en) Efficient initial RAM disk creation
JP2015534184A (en) Flexible acceleration of code execution
US9448807B2 (en) Automatic creation, deployment, and upgrade of disk images
US10394571B2 (en) Passing data from a host-based utility to a service processor
US10303487B2 (en) System and method for booting an information handling system
WO2021018267A1 (en) Live migration method for virtual machine and communication device
CN113778612A (en) Embedded virtualization system implementation method based on microkernel mechanism
US9672047B1 (en) Systems and methods for accessing a bootable partition on a serial peripheral interface device
JP2022522643A (en) Launching a secure guest using the initial program loading mechanism
CN112352221A (en) Shared memory mechanism to support fast transfer of SQ/CQ pair communications between SSD device drivers and physical SSDs in virtualized environments
CN114691300A (en) Hot migration method of virtual machine instance
EP3633507B1 (en) Technologies for secure and efficient native code invocation for firmware services
US8499142B1 (en) UEFI boot loader for loading non-UEFI compliant operating systems
Kanda et al. SIGMA system: A multi-OS environment for embedded systems
CN113253978A (en) Embedded software development method, model, electronic device, and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22910143

Country of ref document: EP

Kind code of ref document: A1