Fault detection method and device for multiple operating systems, equipment and medium

By introducing preset debugging serial ports and debugging commands in the shared memory of multiple operating systems, the problem of being unable to quickly determine the cause of operating system freeze failures in the existing technology is solved, and efficient operation and maintenance is achieved.

CN120803786APending Publication Date: 2025-10-17SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510932844.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing technologies are unable to quickly determine the cause of a failure when an operating system freezes in multiple operating systems, resulting in low operation and maintenance efficiency and difficulty in meeting efficient operation and maintenance requirements.

Method used

By introducing a preset debugging serial port in the shared memory of multiple operating systems, registering debugging commands, and using the surviving operating system to obtain system information of the stuck operating system, including thread information, memory information, and interrupt information, etc., the debugging commands are executed through the debugging serial port to determine the cause of the fault.

Benefits of technology

It can quickly identify the cause of stuck states in multiple operating systems, improve operation and maintenance efficiency, and meet the efficient operation and maintenance needs of multiple operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803786A_ABST
    Figure CN120803786A_ABST
Patent Text Reader

Abstract

The invention provides a fault detection method and device for multiple operating systems, equipment and a medium, and relates to the field of fault detection.The fault detection method comprises the steps that any operating system except the operating system in a stuck state in the multiple operating systems, namely, a target operating system obtains a target debugging command through a preset debugging serial port; the preset debugging serial port is a serial port registered in a specified code segment of the target operating system in advance; executing the target debugging command to obtain system information of the operating system in the stuck state from a shared memory of the multiple operating systems; and detecting a failure cause of the operating system in the stuck state based on the system information of the operating system in the stuck state. According to the method and the device, when a certain operating system in the multiple operating systems is stuck, the system information of the operating system in the stuck state is obtained through another survival operating system, so that the fault reason when the operating system is stuck is quickly determined, and the efficient operation and maintenance requirements of the multiple operating systems are met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of fault detection, in particular to a multi-operating system fault detection method, device, equipment and medium. BACKGROUND

[0002] With the rapid development of artificial intelligence, big data analysis and cloud computing technologies, multi-core SoC (System on Chip) supporting multiple operating systems has been widely used in many industries such as smart phones, smart homes, industrial automation, medical devices, aerospace, etc. The popularity of embedded multi-core multi-operating systems not only significantly improves computing power and expands application scenarios, but also introduces new challenges for system operation and maintenance, for example, how to detect faults in multi-core multi-operating systems to determine the cause of the operating system crash.

[0003] Embedded operating systems generally monitor system status through watchdog mechanisms, specifically: if the watchdog does not receive a feeding signal sent by the operating system within a specified time, the watchdog will forcibly execute a reset operation of the operating system, but the watchdog has certain limitations, that is, the watchdog cannot provide deeper system status information, so it cannot analyze the cause of the operating system crash. Therefore, the watchdog needs to additionally use a trace debugging (TRACE) tool or a hardware debugging interface (such as JTAG (Joint Test Action Group), SWD (Serial Wire Debug), etc.) to obtain system status information, but both the trace debugging tool and the hardware debugging interface need to be configured or connected in advance before the operating system crashes. In actual operation and maintenance, the operating system may not be able to deploy a trace debugging tool or a hardware debugging interface in advance due to condition restrictions, and ultimately can only reproduce the problem through stress testing after the fact to determine the cause of the operating system crash, which is inefficient and difficult to meet the efficient operation and maintenance needs of multi-operating systems.

[0004] Therefore, how to quickly determine the cause of the operating system crash in multi-operating systems to meet the efficient operation and maintenance needs of multi-operating systems is a problem that needs to be solved by those skilled in the art. SUMMARY

[0005] The purpose of the embodiments of the present application is to provide a multi-operating system fault detection method, device, equipment and medium, which can obtain system information of an operating system in a stuck state through another surviving operating system when a certain operating system in the multi-operating system is stuck, thereby quickly determining the cause of the operating system crash to meet the efficient operation and maintenance needs of multi-operating systems. The specific scheme is as follows:

[0006] In a first aspect, the present invention provides a multi-operating system fault detection method, which is applied to a target operating system, where the target operating system is any operating system among the multiple operating systems except the operating system in the stuck state. The method provided by the present invention includes:

[0007] Obtain target debugging commands through a preset debugging serial port; the preset debugging serial port is a serial port pre-registered in a specified code segment of the target operating system;

[0008] Execute target debugging commands to obtain system information of the operating system in a stuck state from the shared memory of multiple operating systems;

[0009] Detect a fault cause of the operating system in the stuck state based on system information of the operating system in the stuck state.

[0010] Optionally, obtain target debugging commands through the preset debugging serial port, including:

[0011] Acquire a first target debugging command input by a target user through a preset debugging serial port;

[0012] Alternatively, a second target debugging command sent by the watchdog is obtained through a preset debugging serial port.

[0013] Optionally, the second target debugging command is a command generated by the watchdog before executing a reset operation on the operating system in a stuck state.

[0014] Optionally, when the specified code segment is a code segment for executing a Shell command, the target debugging command is a Shell command.

[0015] Optionally, execute target debugging commands to obtain system information of the operating system in the stuck state from the shared memory of multiple operating systems, including:

[0016] Determining a target command type of a target debugging command and determining a target command format corresponding to the target command type; wherein different command types correspond to different command formats;

[0017] Utilize the target command format to parse the target debugging command to obtain the corresponding command parsing result;

[0018] Querying a preset command registry based on the command parsing result to determine whether a command function corresponding to the command parsing result is found;

[0019] If a command function corresponding to the command parsing result is found in the preset command registry, the command function is executed to obtain system information of the operating system in the stuck state from the shared memory of the multiple operating systems;

[0020] The preset command registry is located in the data segment of the target operating system.

[0021] Optionally, after executing the target debugging command, further comprising:

[0022] obtaining system information of other operating systems from the shared memory of the multiple operating systems; the other operating systems being operating systems other than the operating system in the dead state among the multiple operating systems;

[0023] determining the system state of the other operating systems based on the system information of the other operating systems.

[0024] Optionally, when the at least one kernel is allocated for the target operating system, the target debugging command is executed, comprising:

[0025] determining a target kernel running the debugging command execution thread from the at least one kernel;

[0026] executing the target debugging command by the target kernel using the debugging command execution thread running on the target kernel.

[0027] In a second aspect, the present application provides a fault detection device of a multiple operating system, applied to a target operating system, the target operating system being any one of the operating systems other than the operating system in the dead state among the multiple operating systems, the device provided by the present application comprising:

[0028] a command acquisition module, configured to acquire a target debugging command through a preset debugging serial port; the preset debugging serial port being a serial port registered in advance in a specified code segment of the target operating system;

[0029] a system information acquisition module, configured to execute the target debugging command to obtain system information of the operating system in the dead state from a shared memory of the multiple operating systems;

[0030] a fault cause detection module, configured to detect a fault cause of the operating system in the dead state based on the system information of the operating system in the dead state.

[0031] In a third aspect, the present application provides an electronic device, comprising:

[0032] a memory, configured to store a computer program;

[0033] a processor, configured to execute the computer program to realize the steps of the aforementioned fault detection method of the multiple operating system.

[0034] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to realize the steps of the aforementioned fault detection method of the multiple operating system.

[0035] The multi-operating system fault detection method provided by the application is applied to a target operating system, and the target operating system is any one operating system except the operating system in a stuck state in the multi-operating system, and the method provided by the application specifically comprises the following steps: obtaining a target debugging command through a preset debugging serial port; the preset debugging serial port is a serial port registered in advance in a specified code segment of the target operating system; executing the target debugging command to obtain system information of the operating system in the stuck state from shared memory of the multi-operating system; and detecting a fault cause of the operating system in the stuck state based on the system information of the operating system in the stuck state.

[0036] Beneficial effects: the shared memory is introduced to store system information of each operating system in the multi-operating system, so that any operating system in the multi-operating system can obtain system information of other operating systems, and information sharing between the multi-operating systems is realized; further, the debugging serial port is registered in the specified code segment of the operating system, so that the operating system can obtain the debugging command through the debugging serial port. Based on this, when an operating system in the multi-operating system is stuck, another surviving operating system obtains the debugging command based on the debugging serial port of the operating system, and executes the debugging command to obtain the system information of the operating system in the stuck state from the shared memory of the multi-operating system, so that the fault cause of the operating system in the stuck state is quickly determined, and the efficient operation and maintenance requirement of the multi-operating system is met. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0038] Figure 1 A flow chart of a multi-operating system fault detection method disclosed by the embodiments of the present application;

[0039] Figure 2 A debugging command execution flow chart disclosed by the embodiments of the present application;

[0040] Figure 3 A multi-core multi-operating system schematic diagram disclosed by the embodiments of the present application;

[0041] Figure 4 A whole structure diagram of a multi-operating system disclosed by the embodiments of the present application;

[0042] Figure 5 A memory partitioning schematic diagram of a multi-operating system disclosed by the embodiments of the present application;

[0043] Figure 6A specific multi-operating system fault detection flowchart disclosed in the embodiment of the present application is disclosed;

[0044] Figure 7 Another specific multi-operating system fault detection flowchart disclosed in the embodiment of the present application is disclosed;

[0045] Figure 8 A system state detection flowchart disclosed in the embodiment of the present application is disclosed;

[0046] Figure 9 A multi-operating system fault detection device structure schematic diagram disclosed in the embodiment of the present application is disclosed;

[0047] Figure 10 An electronic device structure diagram disclosed in the embodiment of the present application is disclosed. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.

[0049] The terms "include" and "have" in the specification of the present application and the above drawings, and any variants of "include" and "have", are intended to cover the non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can include steps or units not listed.

[0050] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0051] The embedded operating system generally monitors the system state through the watchdog mechanism, but the watchdog cannot provide deeper system state information, so as to analyze the fault reason when the operating system is deadlocked. Therefore, the watchdog needs to additionally assist the tracking debugging tool or the hardware debugging interface to obtain the system state information, but whether the tracking debugging tool or the hardware debugging interface needs to be configured or connected in advance before the operating system is deadlocked, and in actual operation and maintenance, the operating system may not be able to deploy the tracking debugging tool or the hardware debugging interface in advance due to condition restrictions, and finally can only reproduce the problem through stress testing after the fact to determine the fault reason when the operating system is deadlocked, which is low in efficiency and difficult to meet the efficient operation and maintenance demand of the multi-operating system.

[0052] To this end, the application provides a multi-operating system fault detection method, which can acquire system information of an operating system in a stuck state through another surviving operating system when a certain operating system in the multi-operating system is stuck, thereby quickly determining the fault cause of the stuck operating system, so as to meet the efficient operation and maintenance requirement of the multi-operating system.

[0053] Referring to Figure 1 As shown in the figure, the application embodiment provides a multi-operating system fault detection method, which is applied to a target operating system, the target operating system being any one operating system except the operating system in a stuck state in the multi-operating system, and the method provided by the application embodiment specifically comprises:

[0054] In step S11, a target debugging command is acquired through a preset debugging serial port; the preset debugging serial port being a serial port registered in advance in a specified code segment of the target operating system.

[0055] When a certain operating system in the multi-operating system is stuck, any one operating system except the operating system in a stuck state in the multi-operating system is determined as the target operating system, so as to execute the multi-operating system fault detection method provided by the application embodiment through the target operating system, thereby determining the fault cause of the operating system in a stuck state.

[0056] Specifically, when a certain operating system in the multi-operating system is stuck, the target operating system in the multi-operating system acquires a target debugging command through its own preset debugging serial port. In one specific embodiment, the target operating system acquires a first target debugging command input by a user through its own preset debugging serial port; in another specific embodiment, the target operating system acquires a second target debugging command sent by a watchdog through its own preset debugging serial port.

[0057] It should be noted that the second target debugging command is a command generated by the watchdog before performing a reset operation on the operating system in a stuck state. Specifically, since the operating system in a stuck state will not send a dog feeding signal to the watchdog any more, the watchdog will not receive the dog feeding signal from the operating system in a stuck state within a specified time, at which time the watchdog will trigger the reset operation on the operating system in a stuck state, and before performing the reset operation on the operating system in a stuck state, the watchdog needs to first generate the second target debugging command and send it to the preset debugging serial port of the target operating system, so that the target operating system acquires the second target debugging command sent by the watchdog through its own preset debugging serial port, thereby determining the fault cause of the operating system in a stuck state based on the second target debugging command, and then performing the reset operation on the operating system in a stuck state.

[0058] It should be noted that the preset debugging serial port in the target operating system is a serial port registered in advance in a specified code segment of the target operating system. According to one specific embodiment, when the specified code segment of the target operating system is a code segment for executing a Shell command (for example, a.shell_cmd code segment), the target debugging command is a Shell command.

[0059] In step S12, the target debugging command is executed to obtain the system information of the operating system in the stuck state from the shared memory of the multi-operating system.

[0060] In the embodiment of the present application, after the target operating system obtains the target debugging command through the preset debugging serial port of the target operating system, the target debugging command is executed to obtain the system information of the operating system in the stuck state from the shared memory of the multi-operating system.

[0061] It should be noted that after the target operating system obtains the target debugging command through the preset debugging serial port of the target operating system, the target debugging command is executed to obtain the system information of the operating system in the stuck state from the shared memory of the multi-operating system.

[0062] Further, for the execution process of the target debugging command, as shown in Figure 2 It should be noted that after the target operating system obtains the target debugging command through the preset debugging serial port of the target operating system, the target debugging command is executed to obtain the system information of the operating system in the stuck state from the shared memory of the multi-operating system.

[0063] For example, if the target debugging command is a shell command, the target command type of the target debugging command is a shell command type, and at this time the target command format corresponding to the target command type is a shell command format. Correspondingly, the target debugging command is parsed using the shell command format to obtain the corresponding command parsing result.

[0064] For the construction process of the preset command registry, specifically, a plurality of command functions for processing the debugging commands can be defined in a code segment of the target operating system in advance, so as to complete the registration of the debugging commands, that is, different command functions correspond to different debugging commands. Then, a preset command registry is created in a data segment of the target operating system, so as to store the registered debugging commands and the command functions corresponding to the debugging commands.

[0065] Further, if the target operating system fails to query the command function corresponding to the command resolution result from the preset command registry, there are two processing modes: the first processing mode is to directly return an error prompt information that "the corresponding command function is not found"; the second processing mode is to add the command function corresponding to the target debugging command in the code segment of the target operating system, update the preset command registry, and then execute the command function corresponding to the target debugging command to obtain the system information of the operating system in the stuck state from the shared memory of the plurality of operating systems. In this way, the success probability of the execution of the debugging command can be improved through the second processing mode.

[0066] Specifically, for the second processing mode, the legality and the standardization of the target debugging command are first checked, if the target debugging command passes the legality and the standardization check, a script generation model such as deepseek is used to generate the command function corresponding to the target debugging command based on the defined command functions in the code segment of the target operating system, then the command function corresponding to the target debugging command is added in the code segment of the target operating system, and the executable verification is performed on the command function corresponding to the target debugging command, after passing the executable verification, the preset command registry is updated based on the command function corresponding to the target debugging command, and then the command function corresponding to the target debugging command is executed to obtain the system information of the operating system in the stuck state from the shared memory of the plurality of operating systems.

[0067] In addition, according to the actual application scene, the embodiment of the present application can also flexibly allocate a kernel for each operating system in the plurality of operating systems, that is, one kernel can be allocated for the operating system, or a plurality of kernels can be allocated for the operating system.

[0068] It should be noted that when the embodiment of the present application allocates at least one kernel for the target operating system, if the target operating system obtains the target debugging command through the preset debugging serial port, a target kernel running the debugging command execution thread is determined from the at least one kernel, and then the target kernel executes the target debugging command by using the debugging command execution thread running in the target kernel.

[0069] As Figure 3As shown, taking a multi-operating system including a first operating system and a second operating system as an example, based on actual application scenarios, six cores are allocated to the first operating system, and two cores are allocated to the second operating system. Both the first and second operating systems have registered debug serial ports. The debug command execution thread of the first operating system runs on core 0, while the debug command execution thread of the second operating system runs on core 6. If the target operating system is the first operating system, after receiving the target debug command through its own debug serial port, the first operating system determines the target core running the debug command execution thread from among the six cores, in this case core 0. It then executes the target debug command using its own debug command execution thread through core 0. If the target operating system is the second operating system, after receiving the target debug command through its own debug serial port, the second operating system determines the target core running the debug command execution thread from among the two cores, in this case core 6. It then executes the target debug command using its own debug command execution thread through core 6.

[0070] Step S13: Detect the cause of the failure of the operating system in the stuck state based on the system information of the operating system in the stuck state.

[0071] In an embodiment of the present invention, after obtaining system information of the frozen operating system from the shared memory of multiple operating systems, the target operating system analyzes the system information of the frozen operating system to determine the cause of the frozen operating system failure. The system information includes, but is not limited to, thread information, memory information, and interrupt information.

[0072] Taking the example of a code segment that registers a debug serial port with the target operating system for executing shell commands, the target operating system obtains the top command through its own debug serial port. The top command is used to view thread information for each operating system in multiple operating systems. The target operating system then parses the top command using the shell command format to obtain a corresponding command parsing result. Based on the command parsing result, the target operating system queries a preset command registry to determine whether a top command function corresponding to the command parsing result has been found. If a top command function corresponding to the command parsing result has been found in the preset command registry, the top command function is executed to obtain thread information for each operating system from the shared memory of the multiple operating systems and print the thread information for each operating system to the debug serial port. This printed thread information allows operation and maintenance personnel to understand the thread status of each operating system, including thread name, thread priority, stack size, running core, and thread execution status. Furthermore, the target operating system can also detect the cause of a stuck operating system based on the thread information of the stuck operating system.

[0073] Beneficial effects: the present application introduces shared memory for storing system information of each operating system in the multi-operating system, so that any operating system in the multi-operating system can obtain the system information of other operating systems, and information sharing between the multi-operating systems is realized; further, the present application registers a debugging serial port in a designated code segment of the operating system, so that the operating system can obtain a debugging command through the debugging serial port. Based on this, when a certain operating system in the multi-operating system is deadlocked, the surviving operating system based on its own debugging serial port obtains a debugging command, and executes the debugging command to obtain the system information of the deadlocked operating system from the shared memory of the multi-operating system, so as to quickly determine the fault reason when the operating system is deadlocked, so as to meet the efficient operation and maintenance requirement of the multi-operating system.

[0074] Taking the multi-operating system including the first operating system and the second operating system as an example, the multi-operating system fault detection method provided by the embodiment of the present application is described in detail.

[0075] Referring to Figure 4 As shown in the overall structure diagram of the multi-operating system, the multi-operating system stores the system information of each operating system through shared memory to realize information sharing between the multi-operating systems. And from the perspective of system layering, each operating system in the multi-operating system can be divided into an application layer, a framework layer and an operating system layer, and in order to make each operating system in the multi-operating system can obtain the system information of other operating systems to determine the system state of each operating system, the present application adds a system debugging layer between the operating system layer and the framework layer in each operating system, to register a debugging serial port in a designated code segment of each operating system through the system debugging layer, and create a preset command registration table in the data segment of each operating system.

[0076] As shown in the memory partitioning diagram of the multi-operating system Figure 5 As shown in the memory partitioning diagram of the multi-operating system, the memory of the multi-operating system can be divided into the following parts: a part of the memory is used to store the code segment of the first operating system, a part of the memory is used to store the data segment of the first operating system, a part of the memory is used to store the code segment of the second operating system, a part of the memory is used to store the data segment of the second operating system, a part of the memory is the shared memory of the multi-operating system, used to store the system information of the first operating system and the second operating system, and the other part of the memory is unused memory.

[0077] As shown in the memory partitioning diagram of the multi-operating system Figure 6As shown, when the first operating system in a multi-operating system is stuck and the second operating system in the multi-operating system is alive, the first operating system cannot obtain debugging commands through its own debugging serial port due to being in a stuck state. At this time, the second operating system can obtain debugging commands through its own debugging serial port and execute debugging commands to detect the first operating system and the second operating system, thereby reading the system information of the first operating system and the second operating system from the shared memory of the multi-operating systems, and printing the system information of the first operating system and the second operating system on the debugging serial port of the second operating system for operation and maintenance personnel to view. At the same time, the second operating system can determine the cause of the failure when the first operating system is stuck based on the system information of the first operating system, and determine the system status of the second operating system based on the system information of the second operating system.

[0078] like Figure 7 As shown, when the first operating system in the multi-operating systems survives and the second operating system in the multi-operating systems is stuck, the second operating system cannot obtain debugging commands through its own debugging serial port due to being in a stuck state. At this time, the first operating system can obtain debugging commands through its own debugging serial port and execute debugging commands to detect the first operating system and the second operating system, thereby reading the system information of the first operating system and the second operating system from the shared memory of the multi-operating systems, and printing the system information of the first operating system and the second operating system on the debugging serial port of the first operating system for operation and maintenance personnel to view. At the same time, the first operating system can determine the system status of the first operating system based on the system information of the first operating system, and determine the fault cause when the second operating system is stuck based on the system information of the second operating system.

[0079] like Figure 8 As shown, when both the first operating system and the second operating system in the multi-operating system are alive, the first operating system and the second operating system can obtain debugging commands through their own debugging serial ports and execute the debugging commands respectively to detect the first operating system and the second operating system, thereby reading the system information of the first operating system and the second operating system from the shared memory of the multi-operating system, and printing the system information of the first operating system and the second operating system on their respective debugging serial ports for operation and maintenance personnel to view. At this time, whether it is the first operating system or the second operating system, the system status of the first operating system can be determined based on the system information of the first operating system, and the system status of the second operating system can be determined based on the system information of the second operating system.

[0080] Beneficial effects: the present application introduces shared memory for storing system information of each operating system in the multi-operating system, so that any operating system in the multi-operating system can obtain the system information of other operating systems, and information sharing between the multi-operating systems is realized; further, the present application registers a debugging serial port in a specified code segment of the operating system, so that the operating system can obtain a debugging command through the debugging serial port. Based on this, when a certain operating system in the multi-operating system is deadlocked, the surviving operating system obtains a debugging command based on its own debugging serial port, and executes the debugging command to obtain the system information of the deadlocked operating system from the shared memory of the multi-operating system, so as to quickly determine the fault reason when the operating system is deadlocked, thereby meeting the efficient operation and maintenance requirements of the multi-operating system.

[0081] Reference Figure 9 As shown in the figure, the embodiment of the present application provides a fault detection device of a multi-operating system, which is applied to a target operating system, the target operating system is any one operating system except the deadlocked operating system in the multi-operating system, and the device provided by the embodiment of the present application specifically comprises:

[0082] The command obtaining module 11 is used for obtaining a target debugging command through a preset debugging serial port; the preset debugging serial port is a serial port registered in a specified code segment of the target operating system in advance;

[0083] The system information obtaining module 12 is used for executing the target debugging command to obtain the system information of the deadlocked operating system from the shared memory of the multi-operating system;

[0084] The fault reason detection module 13 is used for detecting the fault reason of the deadlocked operating system based on the system information of the deadlocked operating system.

[0085] Since the embodiments of the device part correspond to the above-mentioned embodiments, the embodiments of the device part are described with reference to the above-mentioned embodiments of the method part, and will not be described here.

[0086] Beneficial effects: the present application introduces shared memory for storing system information of each operating system in the multi-operating system, so that any operating system in the multi-operating system can obtain the system information of other operating systems, and information sharing between the multi-operating systems is realized; further, the present application registers a debugging serial port in a specified code segment of the operating system, so that the operating system can obtain a debugging command through the debugging serial port. Based on this, when a certain operating system in the multi-operating system is deadlocked, the surviving operating system obtains a debugging command based on its own debugging serial port, and executes the debugging command to obtain the system information of the deadlocked operating system from the shared memory of the multi-operating system, so as to quickly determine the fault reason when the operating system is deadlocked, thereby meeting the efficient operation and maintenance requirements of the multi-operating system.

[0087] Further, the embodiment of the present application further discloses an electronic device, Figure 10 is an electronic device structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the present application. The electronic device, specifically can include: at least one processor 21, at least one memory 22, power supply 23, communication interface 24, input output interface 25 and communication bus 26. Wherein, the memory 22 is used for storing computer programs, the computer programs are loaded and executed by the processor 21, to realize the related steps in the foregoing any embodiment disclosed multi operating system fault detection method. In addition, the electronic device in the embodiment specifically can be electronic computer.

[0088] In the embodiment, the power supply 23 is used for providing working voltage for each hardware device on the electronic device; the communication interface 24 can create data transmission channel between the electronic device and the external device, and the communication protocol followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited here; the input output interface 25 is used for obtaining external input data or outputting data to the outside, and the specific interface type can be selected according to the specific application needs, which is not specifically limited here.

[0089] In addition, the memory 22 as the carrier of resource storage can be read-only memory, random access memory, disk or optical disk, etc., and the resources stored thereon can include operating system 221, computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0090] Wherein, the operating system 221 is used for managing and controlling each hardware device on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the multi operating system fault detection method executed by the electronic device disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs capable of completing other specific work.

[0091] Further, the present application further discloses a computer readable storage medium for storing computer programs; wherein the computer programs are executed by the processor to realize the foregoing disclosed multi operating system fault detection method. The specific steps of the method can refer to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

[0092] Further, the present application also discloses a computer program product comprising computer programs / instructions; wherein the computer programs / instructions are executed by a processor to implement the foregoing disclosed multi-operating system fault detection method. For the specific steps of the method, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0093] The various embodiments are described in the present specification in progressive order, and each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, please refer to the corresponding content in other embodiments.

[0094] Those skilled in the art will further appreciate that the individual steps of the examples described in connection with the embodiments disclosed herein can be realized by electronic hardware, computer software, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, and to avoid obscuring the disclosure with details of the specific implementation, the descriptions herein have generally been stated in terms of the functions executed by the various components and steps. Whether such functions are implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functions in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosure.

[0095] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0096] Finally, it needs to be pointed out that, in this document, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0097] The technical solutions provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by using specific examples. The above description of the examples is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description of the specification should not be understood as a limitation on the present application.

Claims

1. A fault detection method for multiple operating systems, characterized in that: Applied to a target operating system, the target operating system being any one of multiple operating systems except the operating system in a stuck state, the method includes: Obtaining target debugging commands through a preset debugging serial port; the preset debugging serial port is a serial port pre-registered in a designated code segment of the target operating system; Executing the target debugging command to obtain system information of the operating system in the stuck state from the shared memory of the multiple operating systems; Based on the system information of the operating system in the stuck state, a fault cause of the operating system in the stuck state is detected.

2. The multi-operating system fault detection method according to claim 1, characterized in that: The step of obtaining a target debugging command through a preset debugging serial port includes: Acquire a first target debugging command input by a target user through a preset debugging serial port; Alternatively, a second target debugging command sent by the watchdog is obtained through a preset debugging serial port.

3. The multi-operating system fault detection method according to claim 2, characterized in that: The second target debugging command is a command generated by the watchdog before executing a reset operation on the operating system in the stuck state.

4. The multi-operating system fault detection method according to claim 1, characterized in that: When the designated code segment is a code segment for executing a Shell command, the target debugging command is a Shell command.

5. The multi-operating system fault detection method according to claim 1, characterized in that: The executing the target debugging command to obtain the system information of the operating system in the stuck state from the shared memory of the multiple operating systems includes: Determining a target command type of the target debugging command, and determining a target command format corresponding to the target command type; wherein different command types correspond to different command formats; Parsing the target debugging command using the target command format to obtain a corresponding command parsing result; querying a preset command registry based on the command parsing result to determine whether a command function corresponding to the command parsing result is found; If a command function corresponding to the command parsing result is found in the preset command registry, the command function is executed to obtain system information of the operating system in the stuck state from the shared memory of the multiple operating systems; The preset command registry is located in the data segment of the target operating system.

6. The multi-operating system fault detection method according to claim 1, characterized in that: After executing the target debugging command, the method further includes: Obtaining system information of other operating systems from the shared memory of the multiple operating systems; the other operating systems are systems in the multiple operating systems except the operating system in the stuck state; Based on the system information of the other operating system, a system status of the other operating system is determined.

7. The multi-operating system fault detection method according to any one of claims 1 to 6, characterized in that: When allocating at least one kernel to the target operating system, executing the target debugging command includes: Determining, from the at least one core, a target core running a debug command execution thread; The target debug command is executed by the target kernel using the debug command execution thread running on the target kernel.

8. A fault detection device for multiple operating systems, characterized in that: Applied to a target operating system, the target operating system being any one of multiple operating systems except the operating system in a stuck state, the device comprises: A command acquisition module, configured to acquire a target debugging command via a preset debugging serial port; the preset debugging serial port is a serial port pre-registered in a designated code segment of the target operating system; a system information acquisition module, configured to execute the target debugging command to acquire the system information of the operating system in the stuck state from the shared memory of the multiple operating systems; The fault cause detection module is used to detect the fault cause of the operating system in the stuck state based on the system information of the operating system in the stuck state.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the multi-operating system fault detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the multi-operating system fault detection method according to any one of claims 1 to 7.