Multi-operating system management device and method based on multi-operating system mixed deployment
By designing a multi-operating system management device, the system complexity and real-time requirements in the hybrid deployment of multiple operating systems are solved, data interaction and resource sharing between operating systems are realized, and the real-time and robustness of the system are improved.
Patent Information
- Application Number
- CN202411691672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
Hybrid deployment of multiple operating systems increases system complexity and improves maintenance and management difficulty. Different application scenarios have different real-time requirements, resulting in higher requirements for operating systems scheduling hybrid deployments.
A multi-operating system management device is designed to realize data interaction and resource sharing between the master and slave operating systems by allocating device resources on the hardware platform and creating virtual devices and operating systems. The device monitors the operating system's operating status and triggers a restart in an abnormal situation.
It realizes communication and resource sharing between multiple operating systems, improves the real-time and performance of the system, reduces operation and maintenance costs, and improves the robustness of the system.
Smart Images

Figure CN119621425A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a multi-operating system management device and method based on mixed deployment of multiple operating systems. Background Art
[0002] It is increasingly common to deploy multiple operating systems on computers or portable devices. The mixed deployment of multiple operating systems increases the complexity of the system, thereby increasing the difficulty of maintenance and management, which may lead to higher operation and maintenance costs and a greater technical support burden. In addition, multiple operating systems also face different application scenarios, such as complex artificial intelligence computing or rich computing scenarios with low real-time requirements for interface display, scenarios that pursue hard real-time (such as industrial control systems such as satellite control execution, machine tool cutting, and emergency braking control systems for high-speed railways / autonomous driving), and scenarios that pursue soft real-time (such as the flow conveyor control system in the workshop). These scenarios with different real-time requirements have put forward higher requirements for the scheduling of mixed deployment of operating systems. Summary of the invention
[0003] The present invention proposes a multi-operating system management device and method based on mixed deployment of multiple operating systems, so as to solve the problem of management and scheduling of multiple operating systems deployed on the same hardware system.
[0004] The technical solution of the present invention is a multi-operating system management device based on mixed deployment of multiple operating systems, which includes:
[0005] The multi-operating system management device allocates the equipment resources of the hardware platform to the master operating system and the slave operating system; wherein the slave operating system includes multiple task operating systems with real-time performance ranging from strong to weak; data is exchanged between the master operating system and the slave operating system;
[0006] The multi-operating system management device monitors the operating status of the master operating system and the slave operating system; if the operating status is abnormal, the master operating system or the slave operating system with the abnormal operating status is triggered to restart.
[0007] Furthermore, the multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system in the following manner:
[0008] The multi-operating system management device creates corresponding virtual devices and operating system running areas in multiple memory areas respectively, and runs the driver of the virtual device in the memory areas corresponding to the master operating system and the slave operating system respectively;
[0009] The master operating system and the slave operating system can exchange data.
[0010] Furthermore, the multi-operating system management apparatus allocates the device resources of the hardware platform to the master operating system and the slave operating system in a manner further including:
[0011] The driver of the virtual device uses interrupt processing with the master operating system and the slave operating system to implement message notification between the master operating system and the slave operating system, wherein the message includes information that is ready or needs further processing.
[0012] Furthermore, the multi-operating system management apparatus allocates the device resources of the hardware platform to the master operating system and the slave operating system in a manner further including:
[0013] The driver of the virtual device uses DMA mode to directly read and write the memory.
[0014] Further, the multi-operating system management device runs in the Linux operating system;
[0015] The main control operating system is a Linux operating system;
[0016] The slave control operating system includes a Linux operating system and an RTOS, and the real-time performance of the Linux operating system is higher than that of the RTOS.
[0017] Furthermore, the multi-operating system management device monitors the operating status of the master operating system and the slave operating system in the following specific manners:
[0018] The multi-operating system management device queries the update status of the flag bits respectively occupied by the master operating system and the slave operating system in the memory at the specified time interval.
[0019] Further, if the running state is abnormal, the master control operating system or the slave control operating system whose running state is abnormal is triggered to restart, and the specific method is:
[0020] If the flags occupied by the master operating system and the slave operating system in the memory are not updated, the multi-operating system management device determines that an abnormality occurs in the operating state of the operating system corresponding to the flag, and triggers the restart of the abnormal operating system as needed.
[0021] Furthermore, the data interaction between the master control operating system and the slave control operating system is specifically as follows:
[0022] The master control operating system sends a message to its cache, and the master control cache sends the message to the memory area corresponding to the master control operating system. When no interruption occurs, the slave control operating system reads the message from the memory area; when an interruption occurs, the slave control interrupt controller reads the message from the memory area and then forwards the message to the slave control operating system;
[0023] The slave operating system sends a message to its cache, and the slave cache sends the message to the memory area corresponding to the slave operating system. When no interruption occurs, the master operating system reads the message from the memory area; when an interruption occurs, the master interrupt controller reads the message from the memory area and then forwards the message to the master operating system.
[0024] The present invention also proposes a multi-operating system management method based on hybrid deployment of multiple operating systems, which includes:
[0025] Allocate device resources of the hardware platform to the master control operating system and the slave control operating system; wherein the slave control operating system includes multiple task operating systems with varying degrees of real-time performance; and perform data exchange between the master control operating system and the slave control operating system;
[0026] Monitor the running status of the master control operating system and the slave control operating system; if the running status is abnormal, trigger the master control operating system or the slave control operating system with the abnormal running status to restart.
[0027] Furthermore, the method of allocating the device resources of the hardware platform to the master control operating system and the slave control operating system includes:
[0028] Creating corresponding virtual devices and operating system running areas in multiple memory areas respectively, and running the driver of the virtual device in the master control operating system and the slave control operating system in their respective corresponding memory areas;
[0029] The master control operating system and the slave control operating system can exchange data in the following ways:
[0030] The master control operating system sends a message to its cache, and the master control cache sends the message to the memory area corresponding to the master control operating system. When no interruption occurs, the slave control operating system reads the message from the memory area; when an interruption occurs, the slave control interrupt controller reads the message from the memory area and then forwards the message to the slave control operating system;
[0031] The slave operating system sends a message to its cache, and the slave cache sends the message to the memory area corresponding to the slave operating system. When no interruption occurs, the master operating system reads the message from the memory area; when an interruption occurs, the master interrupt controller reads the message from the memory area and then forwards the message to the master operating system.
[0032] The advantages of the present invention over the prior art are: the present invention provides a real-time artificial intelligence and industrial control solution based on a mixed deployment of multiple operating systems, which is a flexible and scalable real-time operating system solution that can meet application scenarios with different real-time requirements, realize communication and resource sharing between multiple operating systems, and improve the real-time performance and performance of the system. More importantly, the present invention can promptly detect faults in parallel-running operating systems and restart and recover them, greatly improving the overall robustness of the system. At the same time, the present invention also realizes the integrated design of software and hardware, reducing the development and maintenance costs of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a block diagram of a multi-operating system management device of the present invention;
[0034] Figure 2 It is a memory I / O flow diagram of the multi-operating system management method of the present invention;
[0035] Figure 3 The present invention is a block diagram of a multi-operating system shared memory of a multi-operating system management device. DETAILED DESCRIPTION
[0036] The present invention proposes a multi-operating system management device and method based on mixed deployment of multiple operating systems. The management device comprises:
[0037] The multi-operating system management device allocates the equipment resources of the hardware platform to the master operating system and the slave operating system; wherein the slave operating system includes a plurality of task operating systems with real-time performance ranging from strong to weak; and data is exchanged between the master operating system and the slave operating system.
[0038] The multi-operating system management device monitors the operating status of the master operating system and the slave operating system; if the operating status is abnormal, the master operating system or the slave operating system with the abnormal operating status is triggered to restart.
[0039] The multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system in the following ways:
[0040] The multi-operating system management device creates corresponding virtual devices and operating system running areas in multiple memory areas respectively, and the master operating system and the slave operating system run the driver of the virtual device in their respective corresponding memory areas.
[0041] Data can be exchanged between the master operating system and the slave operating system.
[0042] The manner in which the multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system further includes:
[0043] The driver of the virtual device uses interrupt processing with the master operating system and the slave operating system to implement message notification between the master operating system and the slave operating system, wherein the message includes information that is ready or needs further processing.
[0044] The manner in which the multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system further includes: the driver of the virtual device uses the DMA mode to directly read and write the memory.
[0045] The multi-operating system management device runs in the Linux operating system; the master operating system is the Linux operating system; the slave operating system includes the Linux operating system and RTOS, and the real-time performance of the Linux operating system is higher than that of the RTOS.
[0046] The multi-operating system management device monitors the operating status of the master operating system and the slave operating system in the following ways:
[0047] The multi-operating system management device queries the update status of the flag bits respectively occupied by the master operating system and the slave operating system in the memory at the specified time interval.
[0048] If the running state is abnormal, the master control operating system or the slave control operating system whose running state is abnormal is triggered to restart, and the specific method is:
[0049] If the flags occupied by the master operating system and the slave operating system in the memory are not updated, the multi-operating system management device determines that an abnormality occurs in the operating state of the operating system corresponding to the flag, and triggers the restart of the abnormal operating system as needed.
[0050] The specific way of data interaction between the master control operating system and the slave control operating system is:
[0051] The master operating system sends a message to its cache, and the master cache sends the message to the memory area corresponding to the master operating system. When no interruption occurs, the slave operating system reads the message from the memory area; when an interruption occurs, the slave interrupt controller reads the message from the memory area and then forwards the message to the slave operating system.
[0052] The slave operating system sends a message to its cache, and the slave cache sends the message to the memory area corresponding to the slave operating system. When no interruption occurs, the master operating system reads the message from the memory area; when an interruption occurs, the master interrupt controller reads the message from the memory area and then forwards the message to the master operating system.
[0053] A multi-operating system management method based on multi-operating system hybrid deployment, comprising:
[0054] The device resources of the hardware platform are allocated to the master control operating system and the slave control operating system; wherein the slave control operating system includes a plurality of task operating systems with real-time characteristics from strong to weak; and data is exchanged between the master control operating system and the slave control operating system.
[0055] Monitor the running status of the master control operating system and the slave control operating system; if the running status is abnormal, trigger the master control operating system or the slave control operating system with the abnormal running status to restart.
[0056] Methods for allocating device resources of the hardware platform to the master operating system and the slave operating system include:
[0057] Corresponding virtual devices and operating system running areas are respectively created in multiple areas of memory, and the master control operating system and the slave control operating system run the driver of the virtual device in their respective corresponding memory areas.
[0058] The data between the control operating system and the slave control operating system can be exchanged in the following ways:
[0059] The master operating system sends a message to its cache, and the master cache sends the message to the memory area corresponding to the master operating system. When no interruption occurs, the slave operating system reads the message from the memory area; when an interruption occurs, the slave interrupt controller reads the message from the memory area and then forwards the message to the slave operating system.
[0060] The slave operating system sends a message to its cache, and the slave cache sends the message to the memory area corresponding to the slave operating system. When no interruption occurs, the master operating system reads the message from the memory area; when an interruption occurs, the master interrupt controller reads the message from the memory area and then forwards the message to the master operating system.
[0061] Example
[0062] An embodiment of the present invention provides an application example in which multiple operating systems such as Linux and RTOS coexist and are mixed and deployed on the same hardware system.
[0063] Select and modify the operating system: For operating systems suitable for AI computing or rich computing scenarios with low real-time requirements, you can choose a Linux distribution. For hard real-time scenarios, such as satellite control systems, industrial control systems such as machine tool cutting, and emergency brake control systems for high-speed railways / autonomous driving vehicles, on the one hand, you need to modify the selected Linux distribution to meet the hard real-time requirements, and on the other hand, you can choose an RTOS that meets the real-time requirements.
[0064] Coexistence of multiple operating systems: In the same hardware system, the real-time priority of the hard real-time operating system is higher than that of the soft real-time operating system, so that multiple operating systems such as hard real-time Linux, soft real-time Linux and hard real-time RTOS can coexist. In order to achieve this goal, the operating system needs to be customized, optimized and unified to meet the real-time requirements of different application scenarios. Figure 1 , divide the memory into functional areas.
[0065] The transformation process mainly includes:
[0066] 1. Steps from system startup to Linux kernel loading, where the Linux kernel serves as a server OS.
[0067] 2. After the Linux kernel is loaded, the steps to load the multi-OS management device.
[0068] 3. The core processing within the multi-OS management device mainly includes the allocation of resources such as CPU, memory, I / O devices, etc. to a specific hardware platform.
[0069] 4. Hardware resources are allocated to conventional Linux, strong real-time RTOS, and real-time Linux. At this time, different OSes are managed uniformly as partitions by a multi-OS management device.
[0070] 5. The multi-OS management device is responsible for starting the process of computing operating systems such as conventional Linux partitions and strong real-time RTOS.
[0071] The multi-OS management device determines the startup sequence and master-slave control functions of each partition operating system: conventional Linux that undertakes computing tasks is selected as the master operating system, while RTOS that undertakes strong real-time tasks and real-time version Linux that undertakes soft real-time tasks are selected as slave operating systems. Figure 2 , data communication and data sharing are achieved between the master and slave operating systems through shared memory, virtual devices and drivers.
[0072] Fault recovery: When conventional Linux, real-time Linux, or strong real-time RTOS crashes under the coexistence of multiple OS, the crashed operating system can be restarted and recovered through the multi-OS management device. The multi-OS management device can monitor the running status of the subsystem, discover faults, and trigger a restart of the faulty operating system to ensure that the faulty system is restored and runs normally. The present invention designs the existence of servo Linux, because it does not process any tasks and will not crash abnormally, thereby ensuring that the multi-OS management device is always alive, thereby ensuring that other OS can be triggered to restart by the multi-OS management device even if they crash, thereby greatly improving the stability and reliability of multiple coexisting operating systems and providing the overall abnormal self-recovery capability of the multi-OS system.
[0073] Figure 3 In the process, conventional Linux, real-time Linux, and strong real-time RTOS write corresponding flags to the shared memory at their respective time intervals. The multi-OS management device maintains a data flag polling thread that polls the three OSes at time intervals. When it is found that a data bit is not updated, it is determined that the corresponding OS has crashed. At this time, the multi-OS management device can immediately trigger the restart operation of the OS as needed to ensure the robustness of the execution of critical tasks.
[0074] Unified management of multiple OS resources: Implement unified scheduling system, memory, file and device management for different operating systems. This can reduce system complexity and improve system real-time performance and performance.
[0075] 1. Create virtual PCI devices by multi-OS management device to simulate real PCI devices.
[0076] 2. Implement the corresponding drivers in the regular Linux kernel and RTOS to communicate with the virtual PCI device.
[0077] 3. The multi-OS management device provides an interface for accessing and managing virtual PCI devices.
[0078] 4. The multi-OS management device communicates with the multi-OS through a memory-mapped I / O mechanism, allowing the device driver to directly access the device's memory space to read and write data.
[0079] 5. Interrupt processing: Devices use interrupts to notify the operating system that data is ready or needs to be processed.
[0080] 6. DMA (Direct Memory Access): In some cases, virtual PCI devices can use DMA to directly read and write memory to reduce the CPU load.
[0081] The present invention deploys multiple operating systems in the same hardware system to achieve a software and hardware integrated solution; according to the real-time requirements of different scenarios, the operating system is optimized and debugged as a whole to ensure that the system can meet the real-time requirements in different scenarios.
[0082] The features of the present invention include:
[0083] 1. Real-time technology: Ensure that solutions such as artificial intelligence and industrial control can achieve real-time response and efficient execution in an environment where multiple operating systems are deployed in a mixed manner. This includes real-time transformation of the operating system and selection of the operating system based on the real-time requirements of the response scenario.
[0084] 2. Compatibility and integration of multiple operating systems: Solve compatibility issues between different operating systems and achieve seamless integration of multiple operating systems to ensure that the entire system can work normally under different operating systems. This includes customizing, optimizing and unifying the operating system to meet the requirements of different real-time response levels.
[0085] 3. Operating system startup and master-slave control function: select the master and slave operating systems, start them separately and realize real-time communication and data sharing between them, so as to switch the control tasks when necessary.
[0086] 4. Fault recovery between operating systems: When a subsystem encounters a fault, the operating system can be automatically recovered. By monitoring the operating status of the subsystem, the restart of the subsystem can be triggered immediately after the fault is found to ensure the normal operation of the system.
[0087] 5. Unified scheduling system, memory, file and device management between different operating systems: Implement unified scheduling system, memory, file and device management technology for different operating systems.
Claims
1. A multi-operating system management device based on mixed deployment of multiple operating systems, characterized in that: It includes: The multi-operating system management device allocates the equipment resources of the hardware platform to the master operating system and the slave operating system; wherein the slave operating system includes multiple task operating systems with real-time performance ranging from strong to weak; data is exchanged between the master operating system and the slave operating system; The multi-operating system management device monitors the operating status of the master operating system and the slave operating system; if the operating status is abnormal, the master operating system or the slave operating system with the abnormal operating status is triggered to restart.
2. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 1, characterized in that: The multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system in the following ways: The multi-operating system management device creates corresponding virtual devices and operating system running areas in multiple memory areas respectively, and runs the driver of the virtual device in the memory areas corresponding to the master operating system and the slave operating system respectively; The master operating system and the slave operating system can exchange data.
3. The multi-operating system management device based on multi-operating system hybrid deployment according to claim 2, characterized in that: The manner in which the multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system further includes: The driver of the virtual device uses interrupt processing with the master operating system and the slave operating system to implement message notification between the master operating system and the slave operating system, wherein the message includes information that is ready or needs further processing.
4. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 2, characterized in that: The manner in which the multi-operating system management device allocates the device resources of the hardware platform to the master operating system and the slave operating system further includes: The driver of the virtual device uses DMA mode to directly read and write the memory.
5. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 3, characterized in that: The multi-operating system management device runs in the Linux operating system; The main control operating system is a Linux operating system; The slave control operating system includes a Linux operating system and an RTOS, and the real-time performance of the Linux operating system is higher than that of the RTOS.
6. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 3, characterized in that: The multi-operating system management device monitors the operating status of the master operating system and the slave operating system in the following ways: The multi-operating system management device queries the update status of the flag bits respectively occupied by the master operating system and the slave operating system in the memory at the specified time interval.
7. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 6, characterized in that: If the running state is abnormal, the master control operating system or the slave control operating system whose running state is abnormal is triggered to restart, and the specific method is: If the flags occupied by the master operating system and the slave operating system in the memory are not updated, the multi-operating system management device determines that an abnormality occurs in the operating state of the operating system corresponding to the flag, and triggers the restart of the abnormal operating system as needed.
8. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 2, characterized in that: The specific way of data interaction between the master control operating system and the slave control operating system is as follows: The master control operating system sends a message to its cache, and the master control cache sends the message to the memory area corresponding to the master control operating system. When no interruption occurs, the slave control operating system reads the message from the memory area; When an interrupt occurs, the slave interrupt controller reads the message from the memory area and forwards the message to the slave operating system; The slave control operating system sends a message to its cache, and the slave control cache sends the message to the memory area corresponding to the slave control operating system. When no interruption occurs, the master control operating system reads the message from the memory area; When an interrupt occurs, the master interrupt controller reads the message from the memory area and forwards the message to the master operating system.
9. A multi-operating system management method based on mixed deployment of multiple operating systems, characterized in that: It includes: Allocate device resources of the hardware platform to the master control operating system and the slave control operating system; wherein the slave control operating system includes multiple task operating systems with varying degrees of real-time performance; and perform data exchange between the master control operating system and the slave control operating system; Monitor the operating status of the master control operating system and the slave control operating system; If the running state is abnormal, the master control operating system or the slave control operating system whose running state is abnormal is triggered to restart.
10. The multi-operating system management device based on mixed deployment of multiple operating systems according to claim 9, characterized in that: Methods for allocating device resources of the hardware platform to the master operating system and the slave operating system include: Creating corresponding virtual devices and operating system running areas in multiple memory areas respectively, and running the driver of the virtual device in the master control operating system and the slave control operating system in their respective corresponding memory areas; The master control operating system and the slave control operating system can exchange data in the following ways: The master control operating system sends a message to its cache, and the master control cache sends the message to the memory area corresponding to the master control operating system. When no interruption occurs, the slave control operating system reads the message from the memory area; when an interruption occurs, the slave control interrupt controller reads the message from the memory area and then forwards the message to the slave control operating system; The slave operating system sends a message to its cache, and the slave cache sends the message to the memory area corresponding to the slave operating system. When no interruption occurs, the master operating system reads the message from the memory area; when an interruption occurs, the master interrupt controller reads the message from the memory area and then forwards the message to the master operating system.