Starting method and device of starting module

By configuring the target queue and reference queue in the server, the startup delay problem caused by the DXE module's dependence on external modules is solved, a more efficient startup process is realized, and the server's fast startup and stable operation are ensured.

CN118796286APending Publication Date: 2024-10-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410866500.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

During the server startup process, the DXE module's dependence on external modules causes blocking, resulting in a prolonged BIOS startup time, and may even cause startup failure, affecting the startup speed and stability of the entire machine.

Method used

By configuring the target queue and reference queue in the target system, the module in the startup fault state is transferred from the target queue to the reference queue, and the order is updated according to the module information, skipping the faulty module and directly starting other available modules to ensure the continuity of the startup operation. sex and efficiency.

Benefits of technology

It effectively reduces the server startup delay, avoids system stagnation caused by startup module failure, and improves the startup efficiency and stability of the target system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796286A_ABST
    Figure CN118796286A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a starting method of a starting module, and the method comprises the steps: transferring a first starting module included in a target queue from the target queue to a reference queue, the first starting module being a starting module in a starting fault state in the starting modules included in the target queue; querying a to-be-started second starting module in the target system from the target queue in which the first starting module is removed; under the condition that the second starting module does not exist in the target queue after the first starting module is removed, the arrangement sequence of the first starting modules included in the reference queue is updated according to the module information of the first starting modules, and a candidate queue is obtained; and starting the first starting module included in the candidate queue according to the starting sequence indicated by the candidate queue. By means of the method and device, the problem that the starting efficiency of the target system is low is solved, and then the effect of improving the starting efficiency of the target system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for starting a starting module. Background Art

[0002] Multiple DXE (Driver execute environment) modules are deployed in the BIOS (Basic input and output system). When the system starts, the UEFI (Unified Extensible Firmware Interface) BIOS scans, loads, and executes each DXE module in sequence according to the dependencies of the DXE modules of the BIOS itself, until all DXEs are executed, and then boots the operating system. However, in actual applications, some DXE execution stages have some external module dependencies. For example, the BIOS needs to wait for the cooperation of modules such as ME (Management Engine) and BMC to complete the final startup process. If the DXE is temporarily blocked in an external module, the BIOS needs to wait for the external module to start to a specific stage before the external module can respond correctly, which causes the BIOS startup delay to increase, affecting the startup rate of the entire machine. It is even possible that during the waiting period, the BIOS continuously attempts to communicate with the external module. Before the external module responds normally, the BIOS runs out of the default retry mechanism, causing the DXE module to fail to execute, and in severe cases, causing the server to fail to start. Summary of the invention

[0003] The embodiments of the present application provide a method and device for starting a starting module, so as to at least solve the problem of low starting efficiency of a target system in the related art.

[0004] According to an embodiment of the present application, a method for starting a startup module is provided, which is applied to a target system deployed on a server, wherein the target system is used to initialize the running state of the server, wherein multiple startup modules are deployed in the target system, wherein the startup modules are used to build the running environment of the target system, wherein a target queue and a reference queue are configured in the target system, wherein the target queue is used to store the startup modules to be started in the target system, and wherein the reference queue is used to store the startup modules in the target system that are in a startup failure state, wherein the method comprises:

[0005] Transferring a first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue;

[0006] Querying the target system for a second startup module to be started from the target queue from which the first startup module has been removed;

[0007] In a case where the second startup module does not exist in the target queue after the first startup module is removed, updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system;

[0008] The first startup modules included in the candidate queue are started according to the startup order indicated by the candidate queue.

[0009] As an optional implementation manner, updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue includes:

[0010] Filtering a fourth startup module from the reference queue according to the module association information of the third startup module, wherein the module association information is used to indicate the dependency relationship between the startup modules when they are started, the startup result of the fourth startup module is used to trigger the startup of the third startup module, the model information includes the module association information, and the first startup module includes the third startup module and the fourth startup module;

[0011] In the case where there are multiple fourth startup modules, the position of the third startup module in the reference queue is updated according to the startup priority of each of the fourth startup modules to obtain the candidate queue, wherein the startup priority indicates the order in which the multiple third startup modules are started.

[0012] As an optional implementation, the reference queue includes a reference task tree, the reference task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node.

[0013] The step of updating the position of the third startup module in the reference queue according to the startup priority of each of the fourth startup modules to obtain the candidate queue includes:

[0014] Filtering out a fifth startup module from the plurality of fourth startup modules, wherein the fifth startup module is connected to the third startup module in the reference task tree, and a startup priority of the fifth startup module is higher than a startup priority of the third startup module;

[0015] Detecting a sixth startup module from the plurality of fourth startup modules, wherein the sixth startup module is a startup module included in the plurality of fourth startup modules and having a lower startup priority than the fifth startup module;

[0016] In the case that the sixth startup module exists in the plurality of fourth startup modules, the third startup module is configured as a child node mounted under the sixth startup module in the reference task tree.

[0017] As an optional implementation manner, transferring the first startup module included in the target queue from the target queue to the reference queue includes:

[0018] Acquire the startup status of the reference startup module in the target queue under the current system environment of the target system, wherein the reference startup module is the startup module currently to be started in the target queue;

[0019] In a case where the startup state is used to indicate that the reference startup module is in a startup failure state, the reference startup module is determined as the first startup module, or the reference startup module and a candidate startup module in the target queue are determined as the first startup module, wherein the candidate startup module is a startup module in the target queue that has a target association relationship with the reference startup module;

[0020] The first startup module is transferred to the reference queue.

[0021] As an optional implementation, the target queue includes a target task tree, the target task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node.

[0022] The transferring the first startup module to the reference queue includes:

[0023] In the case where the first startup module includes the reference startup module and the candidate startup module, the subtask tree composed of the reference startup module and the candidate startup modules under the reference startup module included in the target task tree is migrated to the reference queue.

[0024] As an optional implementation manner, the obtaining the startup state of the reference startup module in the target queue under the current system environment of the target system includes:

[0025] Detecting a data type of the startup data required for startup of the reference startup module, wherein the startup data is data that triggers startup of the reference startup module;

[0026] The startup state of the reference startup module is detected according to the detection method corresponding to the data type.

[0027] As an optional implementation manner, detecting the startup state of the reference startup module according to the detection method corresponding to the data type includes:

[0028] In a case where the data type is used to indicate that the startup data is data generated after the initial startup module deployed in the target system is started, detecting the startup state of the initial startup module in the target system; in a case where the startup state is used to indicate that the candidate startup module is in an unstarted state, determining that the startup state is used to indicate that the reference startup module is in the startup failure state;

[0029] In a case where the data type is used to indicate that the startup data is data generated by the operation of a target firmware that has a communication relationship with the target system, a target request is sent to the target firmware, wherein the target firmware is firmware deployed in the server for controlling the operating state of the target system, and the target request is used to request the target firmware to run in the operating state required for the reference startup module to start; in a case where it is determined that the target firmware fails to respond to the target request, the startup state is determined to indicate that the reference startup module is in the startup failure state.

[0030] According to another embodiment of the present application, a startup module startup device is provided, which is applied to a target system deployed on a server, the target system is used to initialize the running state of the server, multiple startup modules are deployed in the target system, the startup module is used to build the running environment of the target system, a target queue and a reference queue are configured in the target system, the target queue is used to store the startup modules to be started in the target system, and the reference queue is used to store the startup modules in the target system that are in a startup failure state, and the device includes:

[0031] A transfer module, used to transfer a first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue;

[0032] A query module, configured to query a second startup module to be started in the target system from the target queue from which the first startup module has been removed;

[0033] an updating module, configured to update the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module when the second startup module does not exist in the target queue after the first startup module is removed, so as to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system;

[0034] A starting module is used to start the first starting modules included in the candidate queue according to the starting order indicated by the candidate queue.

[0035] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0036] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0037] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0038] According to the present application, since a target queue and a reference queue are configured on a target system, the target queue is used to store the startup modules to be started in the target system, and the reference queue is used to store the startup modules in the target system that are in a startup failure state. Then, during the startup of the target system, the first startup module in the target queue that is in a startup failure state is transferred from the target queue to the reference queue, and the second startup module to be started is queried in the target queue from which the first startup module has been removed. This allows the startup operation of the first startup module to be skipped when the first startup module is in a startup failure state, and other second startup modules that can be started are started. After the second startup module does not exist in the target queue, the startup operation of the first startup module stored in the reference queue is re-executed, so that the startup operation of the startup module by the target system is in a continuous execution state, avoiding system startup stagnation caused by the startup failure state of the startup module, and reducing the startup delay of the target system. Therefore, the technical problem of low startup efficiency of the target system in the related art can be solved, and the effect of improving the startup efficiency of the target system can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1is a hardware environment schematic diagram of a method for starting a starting module according to an embodiment of the present application;

[0040] Figure 2 is a flowchart of a method for starting a starting module according to an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of a dynamic dependency model according to an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of a dynamic dependency chain task scheduling execution process according to an embodiment of the present application;

[0043] Figure 5 It is a structural block diagram of a starting device of a starting module according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0046] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device for a method for starting a module according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the startup method of the startup module in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0049] In this embodiment, a method for starting a starting module is provided. Figure 2 1 is a flowchart of a method for starting a startup module according to an embodiment of the present application, which is applied to a target system deployed on a server, wherein the target system is used to initialize the running state of the server, wherein multiple startup modules are deployed in the target system, wherein the startup modules are used to build the running environment of the target system, wherein a target queue and a reference queue are configured in the target system, wherein the target queue is used to store startup modules to be started in the target system, and wherein the reference queue is used to store startup modules in the target system that are in a startup failure state, such as Figure 2 As shown, the process includes the following steps:

[0050] Step S202, transferring the first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue;

[0051] Step S204, querying the target system for a second startup module to be started from the target queue from which the first startup module has been removed;

[0052] Step S206, in the case that the second startup module does not exist in the target queue after the first startup module is removed, updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system;

[0053] Step S208: Start the first start modules included in the candidate queue according to the start sequence indicated by the candidate queue.

[0054] Through the above steps, since the target queue and the reference queue are configured on the target system, the target queue is used to store the startup modules to be started in the target system, and the reference queue is used to store the startup modules in the target system that are in a startup failure state, and then during the startup process of the target system, the first startup module in the target queue that is in a startup failure state is transferred from the target queue to the reference queue, and the second startup module to be started is queried in the target queue from which the first startup module has been removed, so that when the first startup module is in a startup failure state, the startup operation of the first startup module is skipped, and other second startup modules that can be started are started, and after the second startup module does not exist in the target queue, the startup operation of the first startup module stored in the reference queue is re-executed, so that the startup operation of the startup module of the target system is in a continuous execution state, avoiding the system startup stagnation caused by the startup failure state of the startup module, and reducing the startup delay of the target system. Therefore, the technical problem of low startup efficiency of the target system in the related technology can be solved, and the effect of improving the startup efficiency of the target system can be achieved.

[0055] Optionally, in the embodiment of the present application, the target system may be, but is not limited to, a BIOS system used for initialization.

[0056] Optionally, in an embodiment of the present application, the startup module may be, but is not limited to, a DXE (Driver Execute Environment) module.

[0057] In the embodiment provided in the above step S202, the first startup module may include but is not limited to a startup module in a startup failure state included in the startup module currently to be started, or may also be a reference startup module whose startup timing is located after the first startup module but has a startup association relationship with the target startup module, that is, the startup timing of the reference startup module is not reached at present, but the startup result of the target startup module is a trigger condition that directly or indirectly triggers the reference startup module to start, so the first startup module includes the target startup module, or the target startup module and the reference startup module that has an association relationship with the target startup module, and this scheme does not limit this.

[0058] Optionally, in an embodiment of the present application, the startup failure state is used to indicate that the startup module is in a startup blocking state because the current system operating environment of the target system cannot meet the startup conditions of the startup module, thereby temporarily stopping the startup of the startup module.

[0059] In the embodiment provided by the above step S204, the method for querying the second startup module in the target queue can be to search for a startup module whose startup sequence is located after the first startup module according to the startup order indicated by the target queue. When the startup order indicates that there is no other startup module after the startup sequence of the first startup module, it is determined that the second startup module does not exist in the target queue. When there are other startup modules whose startup sequence is located after the first startup module in the target queue, the system operating environment of the current target system is matched with the system environment required for starting the other startup modules. When the system operating environment and the system environment required for starting the other startup modules are consistent, the other startup modules are determined as the second startup module. When the system operating environment of the target system and the system environment required for starting the other startup modules are inconsistent, it is determined that the second startup module does not exist in the target queue.

[0060] In the embodiment provided in the above step S206, the module information may include but is not limited to the source of the triggering condition required for starting the startup module, and the source of the triggering condition may include but is not limited to a candidate startup module in the target system, and / or, other exogenous modules outside the target system (the exogenous module is a module deployed on the server for adjusting the operating state of the target system), that is, after the candidate startup module is started, it outputs the startup parameters that trigger the startup of the current startup module, or after the exogenous module starts running, it can generate the startup parameters that trigger the startup of the current startup module, and then the method of updating the arrangement order of the first startup modules in the reference queue according to the module information may include but is not limited to, among multiple first startup modules Detect the seventh startup module of the exogenous startup module since startup, sort the seventh startup module according to the startup sequence of the exogenous startup module, build a task tree of the startup module with the seventh startup module as the root node, detect the startup dependency of each eighth startup module except the seventh startup module in the first startup module, and then build the eighth startup module as a leaf node hanging under the corresponding seventh startup module according to the startup dependency (wherein, the eighth startup module can be directly hung under the seventh startup module, or can also be indirectly hung under the seventh startup module, that is, a certain eighth startup module can be indirectly hung under the seventh startup module through other startup modules), and then obtain a candidate queue. Through the above method, the seventh startup module that directly depends on the startup of the external source module is first constructed in chronological order according to the running order of the external source module to form multiple root nodes of the startup task tree, and the eighth startup module is constructed as a leaf node hanging under the seventh startup module according to the startup dependency relationship of the eighth startup module to the seventh startup module. Therefore, when the first startup module in the candidate startup queue is started according to the startup sequence indicated by the startup task tree, the startup blockage caused by the mismatch of the startup sequence between the startup modules can be avoided, thereby making the startup efficiency of the startup modules in the candidate queue higher.

[0061] Optionally, in an embodiment of the present application, the above operation may be, but is not limited to, a loop execution process until all startup modules in the target system are started and then the loop is stopped, that is, at the beginning of each loop cycle, the startup operation is performed on the startup modules that are allowed to be started in the target queue, the startup modules with startup failures are stored in the reference queue, and after there are no other startup modules in the target queue, the startup order of the startup modules in the reference queue is sorted to obtain a sorted candidate queue, and the first startup module in the candidate queue is transferred to the target queue in sequence according to its order in the candidate queue, so that the startup modules to be started in the target queue can continue to be started in the next loop cycle.

[0062] As an optional implementation manner, updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue includes:

[0063] Filtering a fourth startup module from the reference queue according to the module association information of the third startup module, wherein the module association information is used to indicate the dependency relationship between the startup modules when they are started, the startup result of the fourth startup module is used to trigger the startup of the third startup module, the model information includes the module association information, and the first startup module includes the third startup module and the fourth startup module;

[0064] In the case where there are multiple fourth startup modules, the position of the third startup module in the reference queue is updated according to the startup priority of each of the fourth startup modules to obtain the candidate queue, wherein the startup priority indicates the order in which the multiple third startup modules are started.

[0065] Optionally, in an embodiment of the present application, the module association information may include, but is not limited to, a module identifier for generating startup parameters on which the startup of the current startup module depends, and this solution does not limit this.

[0066] Optionally, in an embodiment of the present application, the third startup module may be, but is not limited to, a startup module that has a direct or indirect relationship with the fourth startup module, that is, the startup result of the fourth startup module will directly cause the third startup module to be started, or the startup result of the fourth startup module may be used to trigger the startup operation of other startup modules, and the startup results of other startup modules may be used to trigger the startup operation of the third startup module. This solution does not limit this.

[0067] Optionally, in an embodiment of the present application, the greater the startup priority, the earlier the startup sequence, and the smaller the startup priority, the later the startup sequence during startup.

[0068] Through the above content, after multiple fourth startup modules are screened out for the third startup module from the reference queue according to the module association information, the position of the third startup module in the reference queue is updated according to the startup priority of the fourth startup module, so that the third startup module after the updated position will not be blocked due to the failure of the dependent startup module to start, thereby improving the startup efficiency of the third startup module.

[0069] As an optional implementation, the reference queue includes a reference task tree, the reference task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node.

[0070] The step of updating the position of the third startup module in the reference queue according to the startup priority of each of the fourth startup modules to obtain the candidate queue includes:

[0071] Filtering out a fifth startup module from the plurality of fourth startup modules, wherein the fifth startup module is connected to the third startup module in the reference task tree, and a startup priority of the fifth startup module is higher than a startup priority of the third startup module;

[0072] Detecting a sixth startup module from the plurality of fourth startup modules, wherein the sixth startup module is a startup module included in the plurality of fourth startup modules and having a lower startup priority than the fifth startup module;

[0073] In the case that the sixth startup module exists in the plurality of fourth startup modules, the third startup module is configured as a child node mounted under the sixth startup module in the reference task tree.

[0074] In an embodiment of the present application, the startup priority of the fifth startup module directly connected to the third startup module in the reference task tree where the third startup module is located is matched with the priorities of other startup modules in the fourth startup module, thereby screening out a sixth startup module whose startup priority is later than that of the fifth startup module, and by hanging the third startup module under the sixth startup module, the phenomenon that the third startup module cannot be started due to the failure of the sixth startup module to be started is avoided, thereby improving the startup efficiency of the system.

[0075] As an optional implementation manner, transferring the first startup module included in the target queue from the target queue to the reference queue includes:

[0076] Acquire the startup status of the reference startup module in the target queue under the current system environment of the target system, wherein the reference startup module is the startup module currently to be started in the target queue;

[0077] In a case where the startup state is used to indicate that the reference startup module is in a startup failure state, the reference startup module is determined as the first startup module, or the reference startup module and a candidate startup module in the target queue are determined as the first startup module, wherein the candidate startup module is a startup module in the target queue that has a target association relationship with the reference startup module;

[0078] The first startup module is transferred to the reference queue.

[0079] Optionally, in an embodiment of the application, the startup status of the reference startup module can be, but is not limited to, obtained by monitoring the execution results of the startup operation executed on the reference startup model. For example, the operation results of the startup operation executed on the reference startup module are monitored. When the startup operation is repeated more than a target number of times and the reference startup module cannot be started, the startup status is determined to indicate that the reference startup module is in a startup failure state.

[0080] Optionally, in an embodiment of the present application, the startup state of the reference startup module can also be predicted based on the current system environment of the target system, that is, the trigger parameters required for starting the reference startup module are obtained, and the module that generates the trigger parameters is detected. When the current system environment of the target system is used to indicate that the module that generates the trigger parameters is in an unstarted state, it can be determined that the startup state is used to indicate that the reference startup module is in a startup failure state.

[0081] As an optional implementation, the target queue includes a target task tree, the target task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node.

[0082] The transferring the first startup module to the reference queue includes:

[0083] In the case where the first startup module includes the reference startup module and the candidate startup module, the subtask tree composed of the reference startup module and the candidate startup modules under the reference startup module included in the target task tree is migrated to the reference queue.

[0084] Through the above content, in the case that the first startup module includes a reference startup module and a candidate startup module, the subtask tree consisting of the reference startup module and the candidate startup module hanging under the reference startup module included in the target task tree is migrated to the reference queue together. On the one hand, it can avoid the candidate task tree from being blocked again in the target queue. On the other hand, during the migration, the task tree consisting of the reference startup module and the candidate startup module is migrated together, thereby avoiding the occurrence of startup failures due to startup timing mismatch between the reference startup module and the candidate startup module in the reference queue.

[0085] As an optional implementation manner, the obtaining the startup state of the reference startup module in the target queue under the current system environment of the target system includes:

[0086] Detecting a data type of the startup data required for startup of the reference startup module, wherein the startup data is data that triggers startup of the reference startup module;

[0087] The startup state of the reference startup module is detected according to the detection method corresponding to the data type.

[0088] Through the above content, by detecting the data type of the startup data required for starting the startup module, and then detecting the startup state of the reference startup module according to the detection method corresponding to the data type, the adaptability of the detection operation and the data type of the startup data is ensured, thereby improving the detection efficiency of the startup state.

[0089] As an optional implementation manner, detecting the startup state of the reference startup module according to the detection method corresponding to the data type includes:

[0090] In a case where the data type is used to indicate that the startup data is data generated after the initial startup module deployed in the target system is started, detecting the startup state of the initial startup module in the target system; in a case where the startup state is used to indicate that the candidate startup module is in an unstarted state, determining that the startup state is used to indicate that the reference startup module is in the startup failure state;

[0091] In a case where the data type is used to indicate that the startup data is data generated by the operation of a target firmware that has a communication relationship with the target system, a target request is sent to the target firmware, wherein the target firmware is firmware deployed in the server for controlling the operating state of the target system, and the target request is used to request the target firmware to run in the operating state required for the reference startup module to start; in a case where it is determined that the target firmware fails to respond to the target request, the startup state is determined to indicate that the reference startup module is in the startup failure state.

[0092] In order to better understand the above process, the above process is described below in conjunction with an optional embodiment, but it is not intended to limit the technical solution of the embodiment of the present application.

[0093] As an optional implementation, the embodiment of the present application also provides a scheduling optimization method for UEFI DXE modules. When a DXE module needs to rely on the execution result of an external module, the BIOS re-hangs the DXE module back to the queue to be executed, and then attempts to schedule and run other DXE modules that have satisfied the dependency or have no dependency. The method includes the following steps:

[0094] a. Establish a dynamic dependency chain model for DXE modules;

[0095] b. Scan DXE modules and try to execute them. When a DXE module is blocked, the dependent DXE modules are blocked in turn. However, BIOS continues to scan the remaining DXE modules and tries to run the DXE module tasks without dependencies. That is, BIOS uses a more aggressive method to maximize the execution of all current DXE modules;

[0096] c. After a DXE module is completed, check whether it has a dependency chain. If so, try to execute the unfinished tasks on its dependency chain in sequence; otherwise, return to step b.

[0097] The specific implementation methods of the technology of this application are as follows:

[0098] 1. Dynamic dependency model. Figure 3 is a schematic diagram of a dynamic dependency model according to an embodiment of the present application, such as Figure 3 As shown, when the BIOS starts scheduling the DXE module to execute, it creates and fills the dynamic dependency model. Figure 1 The following instructions are given:

[0099] 1. The queue is a one-dimensional array consisting of the top tasks (A...B) of each dependency chain. A non-empty queue indicates all currently pending and dependent task trees, where task A and task B have no dependency relationship;

[0100] 2. The dependency chain is a tree structure, where each node represents a suspended task. If task t1 depends on task t2, then t1 is a child node of t2. If there is no dependency relationship between t1 and t3, but both depend on the top task A, then t1 and t3 are sibling nodes.

[0101] 3. The task at the top of the dependency chain should have no other internal dependent tasks, but it depends on external modules, and the current external module cannot respond to requests normally.

[0102] 2. Dynamic dependency task scheduling. Figure 4 This is a schematic diagram of a dynamic dependency chain task scheduling execution process according to an embodiment of the present application. The specific implementation process is as follows:

[0103] 1. Take the top task t0 in the dependency chain and try to execute it. If the external dependency module can respond correctly, task t0 can be executed smoothly.

[0104] 2. After task t0 is executed, check whether it has dependent tasks waiting to be executed. Here, tasks t1, t2, and t3 are all dependent on t0. Since t0 has been executed, the three dependent tasks of t0 currently have no other dependencies and can be scheduled for execution. Here, the breadth-first method (from left to right, from top to bottom) is used to traverse the child node tasks of t0;

[0105] 3. If you find that t2 is dependent on t5 when scheduling task t2, you need to attach t2 and its node to t5. After executing t5, try to schedule tasks t2 and t4 again. Figure 3 ;

[0106] 4. Repeat steps 1-2 to check whether tasks in other dependency chains can be scheduled for execution. Here, the next step is to schedule 5 and its child nodes.

[0107] 3. BIOSDXE module scheduling and operation. With the dependency chain dynamic model and dependency chain scheduling method, when BIOS starts DXE, it can schedule all DXE modules to run according to the following steps:

[0108] 1. BIOS scans for new DXE images that have not been loaded and executed. If there is one, load the DXE image and then execute step 2. Otherwise, jump to step 6.

[0109] 2. When the BIOS current task (DXE module) is loaded and executed, if the dependent module has been loaded, or there is no dependent module, the current task is executed normally, and then step 3 is executed, otherwise step 4 is executed;

[0110] 3. Check whether the currently completed task has a subtask node. If yes, switch to the subtask and return to step 2. Otherwise, jump to step 1.

[0111] 4. If the current BIOS task t1 is loaded, it has a dependent module t2, but t2 has not been loaded yet. At this time, the t1 task is pushed into the dependency chain queue (keeping the elements in the queue unique), and the CPU switches the task to t2. If the t2 task is an exogenous dependency (for example, it depends on the initialization of platform firmware such as bmc and me), then execute step 5, otherwise return to step 2;

[0112] 5. BIOS communicates with the external dependency and tries to execute task t2. If the external dependency does not respond or responds with an error message, t2 is put into the dependency chain queue (with only one element) and then returns to step 1. If the external dependency responds normally, it returns to step 3 after executing t2.

[0113] 6. BIOS checks the dependency chain queue. If the queue is empty, it means that the DXE module has been loaded and executed (i.e., post end state). Otherwise, jump to step 7.

[0114] 7. At this point, the top tasks of each dependency chain in the queue must be tasks with external dependencies. Take the top task of the dependency chain and try to execute it. If the external firmware responds normally, then traverse the subtasks of the dependency chain, switch to the subtask and try to execute it until the dependency chain is processed. Or if the current task still has dependencies during the dependency chain processing, and the dependent task has not been executed, then move the current task and its subtask nodes below the dependent task node, and then repeat step 7 until all dependency chain tasks are processed.

[0115] Through the scheduling optimization method of the UEFIDXE module proposed in the present application, in the scenario where multiple modules of the server are started in coordination, the waiting delay of the BIOS loading startup process for other modules can be reduced, the server startup speed can be improved, and the startup failure problem caused by waiting for other modules during the startup process can be reduced, thereby improving the operation stability of the server during startup; on the other hand, because the BIOS adopts a more aggressive DXE module execution scheduling method, other management modules in the system (BMC, ME, etc.) that rely on the stage results of the BIOS startup process can obtain the BIOS's coordinated response more quickly, thereby improving the initialization startup speed of other modules.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0117] In the present embodiment, a startup device for a startup module is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are omitted. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0118] Figure 51 is a structural block diagram of a startup device of a startup module according to an embodiment of the present application, which is applied to a target system deployed on a server, wherein the target system is used to initialize the running state of the server, wherein multiple startup modules are deployed in the target system, wherein the startup module is used to build the running environment of the target system, wherein a target queue and a reference queue are configured in the target system, wherein the target queue is used to store the startup modules to be started in the target system, and wherein the reference queue is used to store the startup modules in the target system that are in a startup failure state, such as Figure 5 As shown, the device comprises:

[0119] A transfer module 502, configured to transfer a first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue;

[0120] A query module 504, configured to query the target system for a second startup module to be started from the target queue from which the first startup module has been removed;

[0121] An updating module 506 is configured to update the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module when the second startup module does not exist in the target queue after the first startup module is removed, so as to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system;

[0122] The starting module 508 is used to start the first starting modules included in the candidate queue according to the starting order indicated by the candidate queue.

[0123] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0124] As an optional implementation, the update module includes:

[0125] a screening unit, configured to screen out a fourth startup module from the reference queue according to module association information of the third startup module, wherein the module association information is used to indicate a dependency relationship between startup modules when they are started, a startup result of the fourth startup module is used to trigger the startup of the third startup module, the model information includes the module association information, and the first startup module includes the third startup module and the fourth startup module;

[0126] An updating unit is used to update the position of the third startup module in the reference queue according to the startup priority of each of the fourth startup modules when there are multiple fourth startup modules, so as to obtain the candidate queue, wherein the startup priority indicates the order in which the multiple third startup modules are started.

[0127] As an optional implementation manner, the updating unit is further used for:

[0128] Filtering out a fifth startup module from the plurality of fourth startup modules, wherein the fifth startup module is connected to the third startup module in the reference task tree, and a startup priority of the fifth startup module is higher than a startup priority of the third startup module;

[0129] Detecting a sixth startup module from the plurality of fourth startup modules, wherein the sixth startup module is a startup module included in the plurality of fourth startup modules and having a lower startup priority than the fifth startup module;

[0130] In the case that the sixth startup module exists in the plurality of fourth startup modules, the third startup module is configured as a child node mounted under the sixth startup module in the reference task tree.

[0131] As an optional implementation, the transfer module includes:

[0132] An acquisition unit, configured to acquire a startup state of a reference startup module in the target queue under a current system environment of the target system, wherein the reference startup module is a startup module currently to be started in the target queue;

[0133] a determining unit, configured to, when the startup state indicates that the reference startup module is in a startup failure state, determine the reference startup module as the first startup module, or determine the reference startup module and a candidate startup module in the target queue as the first startup module, wherein the candidate startup module is a startup module in the target queue that has a target association relationship with the reference startup module;

[0134] A transfer unit is used to transfer the first startup module to the reference queue.

[0135] As an optional implementation manner, the transfer unit is further used for:

[0136] In the case where the first startup module includes the reference startup module and the candidate startup module, the subtask tree composed of the reference startup module and the candidate startup modules under the reference startup module included in the target task tree is migrated to the reference queue.

[0137] As an optional implementation manner, the acquisition unit is further used to:

[0138] Detecting a data type of the startup data required for startup of the reference startup module, wherein the startup data is data that triggers startup of the reference startup module;

[0139] The startup state of the reference startup module is detected according to the detection method corresponding to the data type.

[0140] As an optional implementation manner, the acquisition unit is further used to:

[0141] In a case where the data type is used to indicate that the startup data is data generated after the initial startup module deployed in the target system is started, detecting the startup state of the initial startup module in the target system; in a case where the startup state is used to indicate that the candidate startup module is in an unstarted state, determining that the startup state is used to indicate that the reference startup module is in the startup failure state;

[0142] In a case where the data type is used to indicate that the startup data is data generated by the operation of a target firmware that has a communication relationship with the target system, a target request is sent to the target firmware, wherein the target firmware is firmware deployed in the server for controlling the operating state of the target system, and the target request is used to request the target firmware to run in the operating state required for the reference startup module to start; in a case where it is determined that the target firmware fails to respond to the target request, the startup state is determined to indicate that the reference startup module is in the startup failure state.

[0143] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0144] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0145] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0146] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0147] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0148] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0149] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0150] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0151] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0152] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for starting a startup module, characterized in that: A target system deployed on a server, the target system is used to initialize the running state of the server, a plurality of startup modules are deployed in the target system, the startup modules are used to build the running environment of the target system, a target queue and a reference queue are configured in the target system, the target queue is used to store the startup modules to be started in the target system, and the reference queue is used to store the startup modules in the target system that are in a startup failure state, the method comprising: Transferring a first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue; Querying the target system for a second startup module to be started from the target queue from which the first startup module has been removed; In a case where the second startup module does not exist in the target queue after the first startup module is removed, updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system; The first startup modules included in the candidate queue are started according to the startup order indicated by the candidate queue.

2. The method according to claim 1, characterized in that: The updating the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module to obtain a candidate queue includes: Filtering a fourth startup module from the reference queue according to the module association information of the third startup module, wherein the module association information is used to indicate the dependency relationship between the startup modules when they are started, the startup result of the fourth startup module is used to trigger the startup of the third startup module, the model information includes the module association information, and the first startup module includes the third startup module and the fourth startup module; In the case where there are multiple fourth startup modules, the position of the third startup module in the reference queue is updated according to the startup priority of each of the fourth startup modules to obtain the candidate queue, wherein the startup priority indicates the order in which the multiple third startup modules are started.

3. The method according to claim 2, characterized in that The reference queue includes a reference task tree, the reference task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node, and a connection relationship exists between the startup module configured as a child node and the startup module configured as the root node in the reference task tree, The step of updating the position of the third startup module in the reference queue according to the startup priority of each of the fourth startup modules to obtain the candidate queue includes: Filtering out a fifth startup module from the plurality of fourth startup modules, wherein the fifth startup module is connected to the third startup module in the reference task tree, and a startup priority of the fifth startup module is higher than a startup priority of the third startup module; Detecting a sixth startup module from the plurality of fourth startup modules, wherein the sixth startup module is a startup module included in the plurality of fourth startup modules and having a lower startup priority than the fifth startup module; In the case that the sixth startup module exists in the plurality of fourth startup modules, the third startup module is configured as a child node mounted under the sixth startup module in the reference task tree.

4. The method according to claim 1, characterized in that: The transferring the first startup module included in the target queue from the target queue to the reference queue comprises: Acquire the startup status of the reference startup module in the target queue under the current system environment of the target system, wherein the reference startup module is the startup module currently to be started in the target queue; In a case where the startup state is used to indicate that the reference startup module is in a startup failure state, the reference startup module is determined as the first startup module, or the reference startup module and a candidate startup module in the target queue are determined as the first startup module, wherein the candidate startup module is a startup module in the target queue that has a target association relationship with the reference startup module; The first startup module is transferred to the reference queue.

5. The method according to claim 4, characterized in that The target queue includes a target task tree, and the target task tree includes a startup module configured as a root node, or includes a startup module configured as a root node and a startup module configured as a child node. The transferring the first startup module to the reference queue includes: In the case where the first startup module includes the reference startup module and the candidate startup module, the subtask tree composed of the reference startup module and the candidate startup modules under the reference startup module included in the target task tree is migrated to the reference queue.

6. The method according to claim 4, characterized in that The obtaining of the startup status of the reference startup module in the target queue under the current system environment of the target system includes: Detecting a data type of the startup data required for startup of the reference startup module, wherein the startup data is data that triggers startup of the reference startup module; The startup state of the reference startup module is detected according to the detection method corresponding to the data type.

7. The method according to claim 6, characterized in that The detecting the startup state of the reference startup module according to the detection method corresponding to the data type includes: In a case where the data type is used to indicate that the startup data is data generated after the initial startup module deployed in the target system is started, detecting the startup state of the initial startup module in the target system; in a case where the startup state is used to indicate that the candidate startup module is in an unstarted state, determining that the startup state is used to indicate that the reference startup module is in the startup failure state; In a case where the data type is used to indicate that the startup data is data generated by the operation of a target firmware that has a communication relationship with the target system, a target request is sent to the target firmware, wherein the target firmware is firmware deployed in the server for controlling the operating state of the target system, and the target request is used to request the target firmware to run in the operating state required for the reference startup module to start; in a case where it is determined that the target firmware fails to respond to the target request, the startup state is determined to indicate that the reference startup module is in the startup failure state.

8. A starting device for a starting module, characterized in that: A target system deployed on a server, the target system is used to initialize the running state of the server, a plurality of startup modules are deployed in the target system, the startup modules are used to build the running environment of the target system, a target queue and a reference queue are configured in the target system, the target queue is used to store the startup modules to be started in the target system, and the reference queue is used to store the startup modules in the target system that are in a startup failure state, the device comprises: A transfer module, used to transfer a first startup module included in the target queue from the target queue to the reference queue, wherein the first startup module is a startup module in a startup failure state among the startup modules included in the target queue; A query module, configured to query a second startup module to be started in the target system from the target queue from which the first startup module has been removed; an updating module, configured to update the arrangement order of the first startup modules included in the reference queue according to the module information of the first startup module when the second startup module does not exist in the target queue after the first startup module is removed, so as to obtain a candidate queue, wherein the module information is used to indicate the startup conditions required for startup of the startup module, and the arrangement order is used to indicate the startup order of the first startup modules in the target system; A starting module is used to start the first starting modules included in the candidate queue according to the starting order indicated by the candidate queue.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.