Intelligent method and device for operating system to process hardware exception

Through intelligent learning methods of exception feature codes and exception feature pools, hardware exceptions are accurately positioned and subdivided, solving the problem of infinite amplification of hardware failures in the existing technology, and improving system stability and availability are achieved.

CN119415298AActive Publication Date: 2025-02-11FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411466119.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-11
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The prior art adopts simple and rough classification and processing methods when handling hardware exceptions, resulting in infinite amplification of hardware failures and increasing the probability of operating system downtime.

Method used

The hardware exceptions are accurately positioned and subdivided through exception signature codes, and the intelligent learning of the exception feature pool is used to train the processing strategies of evolutionary exceptions to achieve refined identification and processing of hardware failures.

Benefits of technology

It improves system stability and availability, reduces the damage to system stability by hardware failures, and enhances the system's resistance to hardware failures and software errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415298A_ABST
    Figure CN119415298A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent method and device for an operating system to process hardware exceptions, and the method comprises the steps: enabling an intelligent exception processing device to be automatically deployed in each business board card when the system is started, and obtaining an exception feature code; a system is initialized to retain a memory, an abnormal feature pool is constructed, and receiving and sending threads are created in the abnormal feature pool; the device collects the abnormal feature codes into a feature pool, automatic training learning is carried out, and an abnormal processing strategy and an abnormal state are generated; processing the current exception through a strategy, and storing the feature code, the strategy and the exception state in the trained feature pool into a non-volatile storage medium as static resources; and the device periodically polls the system, and completes sharing of the feature pool, exception handling and updating operation of the static resources based on a polling result. According to the invention, full-automatic and intelligent processing of abnormities is realized, and the stability and safety of system operation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of embedded systems, and in particular relates to an intelligent method and device for operating system to handle hardware anomalies. Background Art

[0002] As the foundation of all application software, the basic software operating system has become the focus of domestic research, and the stability of the system is of utmost importance. The stability of the system is mainly reflected in the self-healing ability of the operating system when hardware or software errors occur.

[0003] In a multi-core scenario, the whole process is more complicated. For example, if an error occurs on a bus node, the bus controller reports the error to the CPU via the AXI interface in the form of an interrupt. The interrupt is reported to the CPU that handles the interrupt through the interrupt subsystem. Before the interrupt report takes effect, the result of the error may have been obtained by another CPU and processed according to the result of the error. The propagation and processing of this error are asynchronous, which inevitably leads to an unknown system state. In order to prevent the spread of errors, the hardware has made very complex classifications of errors based on the propagation range of the error report. The Linux system is developed for community enthusiasts and is not for commercial purposes, so it simplifies the processing of these errors and only classifies them into two types: CE (correctable errors) and UE (uncorrectable errors). If the LINUX kernel detects that the error is a CE error, this error can be actively repaired and usually does not affect the stability of the system; if the system detects that the error is not a UE error, it will be troublesome and the system will crash.

[0004] Traditional Linux operating systems simply divide hardware anomalies into recoverable and unrecoverable situations. This classification is too rough and is not conducive to differentiated fault handling, which increases system instability. In fact, unrecoverable system errors also exist in different states. Some hardware anomalies have a low probability of occurrence and have no impact on system stability after the occurrence of the anomaly. This error may occur once a month or once a year. Obviously, the use of a unified processing method for all unrecoverable system errors is not conducive to system stability. For the kernel, system errors are caused by hardware failures. The kernel does not know the specific cause or how to repair it. The operating system itself cannot perform corresponding repair operations for hardware errors. However, simple classification and rough processing will infinitely magnify hardware failures, resulting in a greatly increased probability of operating system downtime. This method is obviously not suitable for applications with strict requirements on system stability, especially for communication systems. Summary of the invention

[0005] In view of the deficiencies in the prior art, an embodiment of the present invention provides an intelligent method and device for an operating system to handle hardware exceptions. The method and device utilize the diversity of operating system hardware exceptions to accurately locate and segment operating system hardware exceptions through an exception feature code (AFC), and adopt intelligent learning of an exception feature pool (STL) to train an evolutionary exception handling strategy. The method solves the problem in the prior art of simply and roughly classifying hardware exceptions in the operating system and roughly handling exception problems, which leads to infinite amplification of hardware failures and greatly increases the probability of operating system crashes, thereby achieving the effect of improving system stability and availability.

[0006] An aspect of an embodiment of the present invention is to provide an intelligent method for an operating system to handle hardware exceptions, the method comprising:

[0007] A set of abnormal intelligent processing devices is deployed on the operating system. When the operating system is started, the abnormal intelligent processing devices are automatically deployed in each business card of the operating system and obtain abnormal feature codes from each business card of the operating system;

[0008] Initialize the reserved memory of the operating system, build the abnormal feature pool of each business board in the reserved memory, and create a receiving thread and a sending thread in the built abnormal feature pool;

[0009] The acquired abnormal feature codes of the single service board are collected into the corresponding abnormal feature pool, and the intelligent processing device automatically trains and learns the abnormal feature pool to generate the abnormal processing strategy and abnormal status of the current abnormal feature code;

[0010] The current exception is handled through the exception handling strategy. At the same time, the exception feature pool after training and learning is synchronized with the exception feature pool after training and learning of the adjacent business board through the sending and receiving thread, and the exception feature code, exception handling strategy and exception status are stored in the non-volatile storage medium as a static resource;

[0011] After training and learning, the abnormal feature pool of each business board periodically polls the system through the receiving thread and the sending thread to detect whether there is any abnormality. Based on the detection results, the abnormal feature pool of adjacent business boards is shared, abnormality is handled, and static resources are updated.

[0012] Another aspect of the embodiment of the present invention is to provide a device for an operating system to handle hardware exceptions, the device comprising: an exception handling module and an exception intelligent learning module, wherein:

[0013] The exception handling module also includes an exception feature code calculation unit, an exception handling strategy unit and an exception error feature pool unit, which are mainly used to perform exception handling when an exception occurs in the system;

[0014] Furthermore, the exception feature code calculation unit is used to calculate the exception feature code based on the acquired system exception information; the exception handling strategy unit is used to perform exception handling according to the exception handling strategy of the exception feature pool corresponding to the exception feature code; the exception error feature pool unit is used to update the exception feature code in real time according to the exception information generated in the system, incorporate it into the exception feature pool, and expand the exception feature pool space.

[0015] The abnormal intelligent learning module is used to send and receive abnormal feature codes, and automatically train and learn the abnormal feature pool to generate an abnormality handling strategy;

[0016] Furthermore, the abnormal feature pool is automatically trained and learned, specifically by periodically polling the sending thread to detect whether there is an abnormality in the abnormal feature pool. If there is an abnormality, it means that the abnormal feature pool has been updated, and the local abnormal feature pool is refreshed and the static feature code and processing strategy in the non-volatile storage medium are synchronously refreshed.

[0017] Compared with the prior art, the present invention has the following advantages:

[0018] 1. The present invention utilizes the diversity of hardware and system anomalies to accurately locate and subdivide hardware system anomalies through anomaly feature codes, and trains and evolves anomaly processing strategies through intelligent learning of anomaly feature pools, thereby achieving the effect of improving system stability and availability, and solving the problem of the rough classification and rough processing method of traditional kernels for unrecoverable hardware errors;

[0019] 2. The present invention locks hardware faults through abnormal feature codes, and continuously improves the abnormal feature pool through training and automatic learning, so as to achieve more refined identification and processing of hardware faults. At the same time, the abnormal feature codes are used to divert hardware errors and minimize the damage to system stability caused by hardware faults. The system's resistance to hardware faults and software errors is significantly enhanced, which can effectively reduce the problem of abnormal downtime of the operating system.

[0020] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 The present invention is a flowchart of an intelligent method for an operating system to handle hardware anomalies.

[0023] Figure 2 It is a schematic diagram of the composition of the abnormal feature code quadruple of the present invention.

[0024] Figure 3 It is a schematic diagram of the deployment work of the abnormal intelligent processing device system of the present invention.

[0025] Figure 4 It is a schematic diagram of the training of the abnormal feature pool abnormal processing strategy of the present invention.

[0026] Figure 5 It is a structural diagram of the abnormal intelligent processing device of the present invention.

[0027] Figure 6 It is a flow chart of the exception handling module of the present invention.

[0028] Figure 7 It is a flow chart of the abnormal intelligent learning module of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose and advantages of the technical solution in the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The present invention is described in detail in conjunction with the drawings for another embodiment.

[0030] Embodiment 1:

[0031] See also Figure 1 , Figure 1 The present invention is a flow chart of an intelligent method for an operating system to handle hardware anomalies, the method comprising:

[0032] Step S1: deploy a set of abnormal intelligent processing devices on the operating system. When the operating system is started, the abnormal intelligent processing devices are automatically deployed in each service board of the operating system, and obtain abnormal feature codes from each service board of the operating system;

[0033] Furthermore, the abnormal characteristic code is obtained from each business card of the operating system, specifically: the current operating system processor type and operating system version information are obtained in the abnormal information context, the processor hardware status information and the running task information when the fault occurs are collected, and the current abnormal characteristic code is calculated based on this information.

[0034] For further information, see Figure 2 , Figure 2 : This is a schematic diagram of the abnormal feature code quadruple composition of the present invention, wherein the abnormal feature code is composed of a processor type, an operating system type, a hardware state, and an abnormal task quadruple, a total of 240 bits; wherein:

[0035] The processor type is 8-bit coded and supports common processor types;

[0036] The operating system type is a 32-bit code that records the operating system kernel version information when the exception occurs;

[0037] The hardware status is a 32-bit code used to obtain a hardware error status code directly from a processor exception when a hardware failure occurs;

[0038] The abnormal task uses 21 bytes of space, i.e. 168 bits of encoding, to store the name of the abnormal task;

[0039] The abnormal feature code associates the processor type, operating system kernel version information, hardware error status code and abnormal task name together.

[0040] Step S2: Initialize the reserved memory of the operating system, build an abnormal feature pool of each service board in the reserved memory, and create a receiving thread and a sending thread in the built abnormal feature pool;

[0041] For further information, see Figure 3 , Figure 3 It is a schematic diagram of the system deployment work of the abnormal intelligent processing device of the present invention. In this embodiment, a set of abnormal intelligent processing devices is deployed on the operating system. When the operating system is started, the abnormal intelligent processing devices will be automatically deployed in various business boards of the operating system. The various business boards specifically include main control disks, business disks and line cards; the abnormal intelligent processing devices automatically deployed in various business boards of the operating system can realize the synchronization of abnormal feature pool information of the abnormal intelligent processing devices in adjacent business boards through the sending and receiving threads in the abnormal feature pool in the device.

[0042] Furthermore, the abnormal feature pool is an array composed of triples as members, each item of the array is a triple consisting of an abnormal feature code, a processing strategy and an abnormal state, and each triple is composed of 256BITs, wherein: the processing strategy is 8BIT encoded, the abnormal state is 8BIT encoded, and the processing strategies are divided into strategy 1 to strategy 5, strategy 1 is the lowest processing strategy, and strategy 5 is the highest processing strategy.

[0043] Step S3: The acquired abnormal feature code of a single service board is aggregated into a corresponding abnormal feature pool, and the intelligent processing device automatically trains and learns the abnormal feature pool to generate an abnormal processing strategy and abnormal state of the current abnormal feature code;

[0044] Furthermore, in step S3, the intelligent processing device automatically trains and learns the abnormal feature pool to generate an abnormal handling strategy and abnormal state of the current abnormal feature code; it also includes: detecting the working state of the current processor of the system, analyzing the occurrence of system peripherals and abnormal interrupts, dividing the abnormal handling strategy of the abnormal feature code and marking the abnormal state.

[0045] Further, in this embodiment, please refer to Figure 4 , Figure 4 Schematic diagram of the training of abnormal feature pool abnormal handling strategy of the present invention. The abnormal handling strategy is divided into five strategies, specifically:

[0046] If the processor scheduling is normal, the exception handling strategy of the current exception code is automatically learned and trained as strategy one; if the processor has a scheduling exception, but the system can basically run normally, the exception handling strategy of the current exception code is automatically learned and trained as strategy two; if the processor has a scheduling exception, the hardware error interrupt is strongly associated with the abnormal task, and the abnormal task is the source of the system exception, then the exception handling strategy of the current exception code is automatically learned and trained as strategy three; if the processor has a scheduling exception and hardware error interrupts are frequent, then the exception handling strategy of the current exception code is automatically learned and trained as strategy four; if the processor scheduling is extremely difficult, then the exception handling strategy of the current exception code is automatically learned and trained as strategy five.

[0047] Furthermore, the strategies 1 to 5 respectively perform the following operations:

[0048] If it is strategy 1, the execution operation is: directly exit the exception, the system is normal;

[0049] If it is strategy 2, the execution operation is: log and then exit abnormally, the system can automatically recover;

[0050] If it is strategy three, the execution operation is: kill the problem process and then exit the exception to eliminate the system instability factor;

[0051] If it is strategy 4, the execution operation is: after closing the abnormal interrupt, exit the abnormality;

[0052] If it is strategy five, the execution operation is: PANIC system fatal failure, enter the PANIC process.

[0053] Furthermore, the abnormal state marking of the abnormal feature code is specifically: the abnormal state indicates the occurrence of the current abnormal feature code, "0" indicates no abnormality occurs, "1" indicates an abnormality occurs, and "x" indicates a mixed state, which means that multiple abnormalities occur; when multiple abnormal feature codes occur at the same time, the abnormal state is a mixed state.

[0054] Step S4: handle the current exception through the exception handling strategy. At the same time, synchronize the exception feature code, exception handling strategy and exception status of the exception feature pool after training and learning with the exception feature pool after training and learning of the adjacent business board through the transceiver thread, and store them in the non-volatile storage medium as a static resource;

[0055] Step S5: After training and learning, the abnormal feature pool of each service board periodically polls the operating system through the receiving thread and the sending thread to detect whether there is an abnormality, and completes the sharing of the abnormal feature pool of adjacent service boards, abnormality processing and static resource update operations based on the detection results.

[0056] Furthermore, when the operating system is periodically polled and detected without abnormalities, it means that the automatic training and learning of the abnormal feature pool is completed, and the trained abnormal feature pool and abnormal handling strategy and other results are obtained. The completion result is shared with the abnormal feature pool of the adjacent business board, and polling continues; when the system is periodically polled and detected with abnormalities, it means that the automatic training and learning of the abnormal feature pool is not completed, and it is necessary to wait for the automatic training and learning of the abnormal feature pool to be completed before continuing to poll. At the same time, the completion result is shared with the abnormal feature pool of the adjacent business board, and the shared abnormal feature pool is compared with the abnormal feature pool in the static resources, and the abnormality handling and static resource update operations are performed based on the comparison results.

[0057] Furthermore, the shared abnormal feature pool is compared with the abnormal feature pool in the static resource, and the abnormality processing and the update operation of the static resource are performed based on the comparison result; specifically, the following steps are also included:

[0058] Step S501: obtaining a read-write lock of the abnormal feature pool in the memory, generating a key according to the abnormal feature code and abnormal handling strategy in the abnormal feature pool read and written by the read-write lock, and compressing the abnormal feature code pool;

[0059] Step S502: Generate an exception pool frame based on the secret key and the compressed exception feature code pool, and release the read-write lock after the exception pool frame is generated;

[0060] Step S503: sending the abnormal pool frame to the abnormal feature pool in the static resource through the sending thread in the form of a broadcast frame;

[0061] Step S504: The abnormal feature pool in the static resource receives the abnormal pool frame through the receiving thread, and based on the key in the abnormal pool frame, determines whether it is consistent with the key in the abnormal feature pool in the static resource, and performs abnormal processing and static resource update operations according to the judgment result.

[0062] Further, in step S504, based on the key in the abnormal pool frame, it is determined whether it is consistent with the key in the abnormal feature pool in the static resource, and further includes:

[0063] Step S5031: If the key in the exception pool frame matches the key of the static resource, it means that the received exception feature pool is consistent with the local static resource and does not need to be updated. Then the current exception is processed based on the existing exception processing strategy in the static resource;

[0064] Step S5032: If the key in the exception pool frame does not match the key of the static resource, it means that there is a new exception in the exception feature pool, and the exception feature pool and exception handling strategy in the static resource need to be updated.

[0065] Further, in step S5032, when there is a new anomaly in the anomaly feature pool, it is necessary to update the anomaly feature pool and the anomaly handling strategy in the static resource. First, it is necessary to determine the anomaly state of the anomaly feature code. If the anomaly state is "x", that is, when multiple anomalies occur, the anomaly state is a mixed state. In this state, the anomaly feature pool of the static resource is not updated; if the anomaly state is "0" or "1", that is, it is not in the "x" state, the following steps are performed:

[0066] Step S5032a: decompress the abnormal feature code pool through the receiving thread in the abnormal feature pool in the static resource, and obtain the read-write lock of the abnormal feature pool in the static resource;

[0067] Step S5032b: Based on the acquired read-write lock of the abnormal feature pool in the static resource, the decompressed abnormal feature code pool and the generated new abnormal handling strategy are read and written into the abnormal feature pool of the static resource, and the static abnormal feature code and the abnormal handling strategy in the non-volatile storage medium are synchronously refreshed;

[0068] Step S5032c: Release the read-write lock of the abnormal feature pool in the static resource, enter the blocked receiving state, and complete the update operation of the static resource.

[0069] Further, after the update operation is completed, that is, after the new abnormal feature code pool and the generated new abnormality handling strategy are updated and stored in the non-volatile storage medium, the abnormal state of the abnormal feature code in the abnormal feature pool is reset to "0".

[0070] Embodiment 2:

[0071] See also Figure 5 , Figure 5 : is a structural diagram of the abnormal intelligent processing device of the present invention, the device comprises: an abnormal processing module and an abnormal intelligent learning module; wherein:

[0072] The exception handling module also includes an exception feature code calculation unit, an exception handling strategy unit and an exception error feature pool unit, which are mainly used to perform exception handling when an exception occurs in the system;

[0073] Furthermore, the exception feature code calculation unit is used to calculate the exception feature code based on the acquired system exception information; the exception handling strategy unit is used to perform exception handling according to the exception handling strategy of the exception feature pool corresponding to the exception feature code; the exception error feature pool unit is used to update the exception feature code in real time according to the exception information generated in the system, incorporate it into the exception feature pool, and expand the exception feature pool space.

[0074] The abnormal intelligent learning module is used to send and receive abnormal feature codes, automatically train and learn the abnormal feature pool to generate abnormal processing strategies, and update and store the abnormal feature pool and the abnormal processing strategies;

[0075] Furthermore, the abnormal feature pool is automatically trained and learned, specifically by periodically polling the sending thread to detect whether there is an abnormality in the abnormal feature pool. If there is an abnormality, it means that the abnormal feature pool has been updated, and the local abnormal feature pool is refreshed and the static feature code and processing strategy in the non-volatile storage medium are synchronously refreshed.

[0076] Further, in this embodiment, please refer to Figure 6 , Figure 6 1 is a flow chart of an exception handling module in an embodiment of the present invention. In the exception handling module, when an exception occurs, the current system processor type and operating system version information are obtained in the exception context, the processor hardware status information and the running task information when the fault occurs are collected, and the current AFC (abnormal feature code) is calculated based on this information; the AFC is matched with each AFC in the abnormal feature pool. If the current abnormal feature code does not match all the abnormal feature codes in the abnormal feature pool, it is marked that a new abnormal feature code is found and a new AFC is learned. It is necessary to expand the abnormal feature pool, include the abnormal feature code in the abnormal feature pool, and set the default lowest level processing strategy one to prepare for abnormal feature code training; if the abnormal feature code matches a certain abnormal feature code in the abnormal feature pool, the abnormality is handled according to the abnormality handling strategy of the abnormal feature pool corresponding to the AFC;

[0077] If it is strategy one, it means that the hardware failure has a very slight impact on the system, and the exception handling module can just clear the exception scene; if it is strategy two, it means that the hardware failure has a certain impact on the system, but the system basically runs normally, and the exception handling module records the exception log and restores the scene; if it is strategy three, it means that the abnormal task affects the normal operation of the current system, and the exception handling module sends an abort signal to the abnormal task and restores the scene; if it is strategy four, it means that the hardware failure is very serious, and the exception handling module closes the interrupt of the corresponding hardware and restores the scene; if it is strategy five, it means that the hardware failure of the system is very serious and fault diversion processing cannot be performed, and the exception handler module controls the system to enter the PANIC process. The exception handling module runs in the exception context of the kernel space.

[0078] Furthermore, in this embodiment, the abnormal intelligent learning module will be described in two forms:

[0079] First, see Figure 7 , Figure 7 1 is a flow chart of the abnormal intelligent learning module in the embodiment of the present invention. When the abnormal intelligent learning module is powered on and started, the static abnormal feature code is obtained from the non-volatile storage medium of the operating system, the system reserved memory is initialized, an abnormal feature pool is constructed in the reserved memory, and a receiving thread and a sending thread are created to synchronize information with adjacent abnormal feature pools; after the initialization is completed, local abnormal information is periodically obtained, and if no abnormality occurs, periodic polling is performed; if an abnormality occurs, the working state of the current processor (CPU) of the system is detected, the system peripherals and the abnormal interruption occurrence are analyzed, and the abnormal handling strategy is adjusted according to the detection situation, specifically: if the processor is adjusted If the degree is normal, the exception handling strategy of the current exception code automatically learned and trained is strategy one; if the processor has a scheduling exception, but the system can basically run normally, the exception handling strategy of the current exception code automatically learned and trained is strategy two; if the processor has a scheduling exception, the hardware error interrupt is strongly associated with the abnormal task, and the abnormal task is the source of the system exception, the exception handling strategy of the current exception code automatically learned and trained is strategy three; if the processor has a scheduling exception and the hardware error interrupt is frequent, the exception handling strategy of the current exception code automatically learned and trained is strategy four; if the processor scheduling is extremely difficult, the exception handling strategy of the current exception code automatically learned and trained is strategy five. After completing the training of the abnormal feature pool, the abnormal intelligent learning module stores the abnormal feature code in the non-volatile storage medium and resets the abnormal state of the abnormal feature code in the abnormal pool to "0".

[0080] Furthermore, the abnormal intelligent learning module runs in the user state, and the receiving thread and the sending thread periodically poll the system to detect whether any abnormality occurs. If there is no abnormality, it means that the automatic training and learning of the abnormal feature pool is completed, and the trained abnormal feature pool and abnormal handling strategy and other results are obtained. The completion result is shared with the adjacent abnormal feature pool and polling continues; when the system is periodically polled to detect an abnormality, it means that the automatic training and learning of the abnormal feature pool is not completed, and it is necessary to wait for the automatic training and learning of the abnormal feature pool to be completed before continuing to poll. At the same time, the completion result is shared with the adjacent abnormal feature pool, and the shared abnormal feature pool is compared with the abnormal feature pool in the static resource, and the abnormality is handled based on the comparison result. And the update operation of static resources, specifically: first, obtain the read-write lock of the exception feature pool in the memory, generate a key based on the exception feature code and exception handling strategy in the read-write lock, and compress the exception feature code pool; secondly, generate an exception pool frame based on the key and the compressed exception feature code pool, and release the read-write lock after the exception pool frame is generated; thirdly, send the exception pool frame to the exception feature pool in the static resource through the sending thread in the form of a broadcast frame; finally, the exception feature pool in the static resource receives the exception pool frame through the receiving thread, and based on the key in the exception pool frame, determines whether it is consistent with the key in the exception feature pool in the static resource, and performs exception handling and static resource update operations according to the judgment result.

[0081] Furthermore, determine whether it matches the key in the exception feature pool in the static resource. Specifically: if the key in the exception pool frame matches the key in the static resource, it means that the received exception feature pool is consistent with the local static resource and does not need to be updated. The current exception is handled based on the existing exception handling strategy in the static resource; if the key in the exception pool frame does not match the key in the static resource, it means that there is a new exception in the exception feature pool, and it is necessary to update the exception feature pool and exception handling strategy in the static resource.

[0082] Furthermore, the described need to update the exception feature pool and exception handling strategy in the static resources is specifically as follows: decompress the exception feature code pool through the receiving thread in the exception feature pool in the static resources, and simultaneously obtain the read-write lock of the exception feature pool in the static resources; based on the obtained read-write lock of the exception feature pool in the static resources, read and write the decompressed exception feature code pool and the generated new exception handling strategy into the exception feature pool of the static resources, and synchronously refresh the static exception feature code and exception handling strategy in the non-volatile storage medium; release the read-write lock of the exception feature pool in the static resources, enter the blocked receiving state, and complete the update operation of the static resources.

[0083] Secondly, when the abnormal intelligent learning module is started when the system is not powered on, it means that the system is soft restarted. In this case, the system may have an abnormal startup problem last time, that is, there may be a hardware error that causes the system to restart. In this case, before the abnormal intelligent learning module initializes the abnormal feature pool, it first compares the abnormal feature pool in the memory with the abnormal feature pool in the non-volatile storage medium. If there is no abnormality in the abnormal feature code in the abnormal feature pool in the memory, the abnormal feature pool in the non-volatile storage medium is directly used to initialize the reserved memory; if there is an abnormality in the abnormal feature code in the abnormal feature pool in the memory, and there is no mixed state, it means that the system has a hardware abnormality that caused the system to restart, and the corresponding abnormal handling strategy needs to be upgraded. When initializing the abnormal feature pool, the abnormal handling strategy of the abnormal feature code corresponding to the abnormality is upgraded, and the abnormal handling level is increased, and the latest abnormal pool and handling strategy are simultaneously written to the non-volatile storage medium.

[0084] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An intelligent method for operating system to handle hardware exceptions, characterized in that: A set of abnormal intelligent processing devices is deployed on the operating system. When the operating system is started, the abnormal intelligent processing devices are automatically deployed in each business card of the operating system and obtain abnormal feature codes from each business card of the operating system; Initialize the reserved memory of the operating system, build the abnormal feature pool of each business board in the reserved memory, and create a receiving thread and a sending thread in the built abnormal feature pool; The acquired abnormal feature codes of the single service board are collected into the corresponding abnormal feature pool, and the intelligent processing device automatically trains and learns the abnormal feature pool to generate the abnormal processing strategy and abnormal status of the current abnormal feature code; The current exception is handled through the exception handling strategy. At the same time, the exception feature pool after training and learning is synchronized with the exception feature pool after training and learning of the adjacent business board through the receiving and sending threads, and the exception feature code, exception handling strategy and exception status are stored in the non-volatile storage medium as a static resource; After training and learning, the abnormal feature pool of each business card periodically polls the operating system through the receiving thread and the sending thread to detect whether there is any abnormality. Based on the detection results, the abnormal feature pool of adjacent business cards is shared, abnormality is handled, and static resources are updated.

2. An intelligent method for operating system to handle hardware exceptions as claimed in claim 1, characterized in that: The abnormal feature code is composed of a 4-tuple of processor type, operating system type, hardware status and abnormal task, with a total of 240 BIT descriptions, where: The processor type is 8-bit coded and supports common processor types; The operating system type is a 32-bit code that records the operating system kernel version information when the exception occurs; The hardware status is a 32-bit code used to obtain a hardware error status code directly from a processor exception when a hardware failure occurs; The abnormal task uses 21 bytes of space to store the name of the abnormal task.

3. The intelligent method for operating system to handle hardware exceptions as claimed in claim 1, characterized in that: The abnormal feature pool is an array, each item of which is a triple consisting of an abnormal feature code, an abnormal handling strategy, and an abnormal state, and each triple consists of 256 bits, where: The exception handling strategy is 8BIT coded, the exception status is 8BIT coded, and the handling strategy includes strategy 1 to strategy 5; The abnormal state indicates the occurrence of the current abnormal feature code, "0" indicates no abnormality occurs, "1" indicates an abnormality occurs, and "x" indicates a mixed state, which means that multiple abnormalities occur; when multiple abnormal feature codes occur at the same time, the abnormal state is a mixed state.

4. The intelligent method for operating system to handle hardware exceptions as claimed in claim 3, characterized in that: The processing strategies include strategy 1 to strategy 5, specifically: If the processor scheduling is normal, the exception handling strategy of the current exception code is automatically learned and trained as strategy one; if the processor has a scheduling exception, but the system can basically run normally, the exception handling strategy of the current exception code is automatically learned and trained as strategy two; if the processor has a scheduling exception, the hardware error interrupt is strongly associated with the abnormal task, and the abnormal task is the source of the system exception, then the exception handling strategy of the current exception code is automatically learned and trained as strategy three; if the processor has a scheduling exception and hardware error interrupts are frequent, then the exception handling strategy of the current exception code is automatically learned and trained as strategy four; if the processor scheduling is extremely difficult, then the exception handling strategy of the current exception code is automatically learned and trained as strategy five.

5. The intelligent method for operating system to handle hardware exceptions as claimed in claim 1, characterized in that: The abnormal feature pool after training and learning of each service board periodically polls the operating system through a receiving thread and a sending thread to detect whether an abnormality occurs, and completes the sharing of the abnormal feature pool of adjacent service boards, abnormality processing, and updating of static resources based on the detection results, wherein: When the detection result is no abnormality, it means that the automatic training and learning of the abnormal feature pool is completed, and the completion result is shared with the abnormal feature pool of the adjacent business board and continues to poll; When the detection result is abnormal, it means that the automatic training and learning of the abnormal feature pool is not completed, and it is necessary to wait for the automatic training and learning of the abnormal feature pool to be completed before continuing to poll. At the same time, the completion result of the automatic training and learning is shared with the abnormal feature pool of the adjacent business board, and the shared abnormal feature pool is compared with the abnormal feature pool in the static resource. Based on the comparison result, the exception processing and static resource update operations are performed.

6. An intelligent method for operating system to handle hardware exceptions as claimed in claim 5, characterized in that: The shared abnormal feature pool is compared with the abnormal feature pool in the static resource, and the abnormality processing and the updating operation of the static resource are performed based on the comparison result, specifically: Obtain the read-write lock of the abnormal feature pool in the memory, generate a key based on the abnormal feature code and abnormal handling strategy in the read-write lock, and compress the abnormal feature code pool; Generate an exception pool frame based on the secret key and the compressed exception signature pool, and release the read-write lock after the exception pool frame is generated; Send the exception pool frame to the exception feature pool in the static resource through the sending thread in the form of a broadcast frame; The abnormal feature pool in the static resource receives the abnormal pool frame through the receiving thread, and based on the key in the abnormal pool frame, determines whether it is consistent with the key in the abnormal feature pool in the static resource, and performs abnormal processing and static resource update operations according to the judgment result.

7. An intelligent method for operating system to handle hardware exceptions as claimed in claim 6, characterized in that: The method further comprises: judging whether the key in the abnormal pool frame is consistent with the key in the abnormal feature pool in the static resource, and performing abnormal processing and updating operations of the static resource according to the judgment result; and If the key in the exception pool frame matches the key of the static resource, it means that the received exception feature pool is consistent with the local static resource and does not need to be updated. In this case, the current exception is handled based on the existing exception handling strategy in the static resource; If the key in the exception pool frame does not match the key in the static resource, it means that there is a new exception in the exception feature pool, and the exception feature pool and exception handling strategy in the static resource need to be updated.

8. An intelligent method for operating system to handle hardware exceptions as claimed in claim 7, characterized in that: If there is a new anomaly in the anomaly feature pool, it is necessary to update the anomaly feature pool and the anomaly handling strategy in the static resource. Before the update operation, it is also necessary to determine the abnormal state of the anomaly feature code, where: If the abnormal status is "x", the abnormal feature pool of static resources will not be updated; If the abnormal state is "0" or "1", the abnormal feature pool of the static resource is updated, specifically: Decompress the abnormal feature code pool through the receiving thread in the abnormal feature pool in the static resource, and obtain the read-write lock of the abnormal feature pool in the static resource at the same time; Based on the acquired read-write lock of the abnormal feature pool in the static resource, the decompressed abnormal feature code pool and the generated new abnormal handling strategy are read and written to the abnormal feature pool of the static resource, and the abnormal feature code and abnormal handling strategy in the non-volatile storage medium are synchronously refreshed; Release the read-write lock of the abnormal feature pool in the static resource, enter the blocked receiving state, and complete the update operation of the static resource.

9. A device for operating system to handle hardware exceptions, characterized in that: The device comprises an exception handling module and an exception intelligent learning module, wherein: The exception handling module also includes an exception feature code calculation unit, an exception handling strategy unit and an exception error feature pool unit, which are mainly used to perform exception handling when an exception occurs in the system; The abnormal intelligent learning module is used for sending and receiving abnormal feature codes, automatically training and learning the abnormal feature pool to generate abnormal processing strategies, and updating and storing the abnormal feature pool and the abnormal processing strategies.

10. The device for handling hardware exceptions in an operating system according to claim 9, characterized in that: The abnormal feature code calculation unit is used to calculate the abnormal feature code from the acquired system abnormality information; The exception handling strategy unit is used to perform exception handling according to the exception handling strategy of the exception feature pool corresponding to the exception feature code; The abnormal error feature pool unit is used to update the abnormal feature code in real time and incorporate it into the abnormal feature pool according to the abnormal information appearing in the system, and expand the abnormal feature pool space.

Citation Information

Patent Citations

  • Data backup processing method, data memory node apparatus and data memory apparatus

    CN101587453A

  • Computer system fault diagnosis decision and processing method

    CN102662788A

  • Server fault automatic detection system and detection method based on decision tree

    CN109218114A

  • Processing method and device for kernel exception of system on chip and computer readable storage medium

    CN116010140A

  • Fault-tolerant data processing computer system and method for implementing a distributed two-tier state machine

    US20170201590A1