Method and device for starting server equipment
By deploying two operating systems in the server device, one of which is fast initialized and controls bus permissions, and the other operating system takes over the interaction process after it is started in place, the problem of low interaction efficiency of server devices is solved and more efficient Data interaction.
Patent Information
- Application Number
- CN202411343001.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The interaction efficiency between server devices is low, resulting in inefficient data interaction process.
Deploy two operating systems in a server device, one of which is more responsive and responsible for initializing and controlling bus permissions, and the other operating system takes over the interaction process at the stage of booting to allow the execution of device requests, ensuring that the interaction process is faster The operating system is completed.
The interaction efficiency between server devices is improved, and the interaction efficiency is avoided due to the impact of the second operating system startup time, ensuring smooth interaction process and improving overall data processing capabilities.
Smart Images

Figure CN119025171B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and apparatus for starting a server device. Background Art
[0002] The process of starting a server device usually involves the cooperation of another server device, and the operation of the server device also involves data interaction with other server devices. Currently, a server device is connected to other server devices through a bus, and the connected server devices interact with data through the bus. However, the interaction efficiency between the current server devices is relatively low. Summary of the invention
[0003] The embodiments of the present application provide a method and apparatus for starting a server device, so as to at least solve the problem of low interaction efficiency between server devices in the related art.
[0004] According to an embodiment of the present application, a method for starting a server device is provided, wherein a first operating system and a second operating system are deployed on a first server device, a response speed of the first operating system is greater than a response speed of the second operating system, the first server device and the second server device are connected via a target bus, the method is applied to the first server device, and the method comprises: when the first server device is started and the first operating system is started, the first operating system obtains control authority of the target bus, receives a first device request initiated by the second server device, the first operating system obtains processing authority of the device request to execute the first device request to obtain a first request result, and the first operating system uses the control authority of the target bus to send the first request result to the second server device; when the second operating system is started to a stage where communication with the second server device is allowed , the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device; when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
[0005] As an optional implementation, the first server device includes a baseboard management controller of a target server, the second server device includes a server host of the target server, and the target bus is a bus that allows the transmission of data that complies with an intelligent platform management interface protocol; when the first server device is started and the first operating system is started, the first operating system obtains control authority of the target bus, receives a first device request initiated by the second server device, obtains processing authority of the device request by the first operating system to execute the first device request to obtain a first request result, and uses the control authority of the target bus to send the first request result to the second server device, including: when the target server is started, starting the first operating system and the second operating system on the baseboard management controller; when the first bus driver of the target bus has been loaded on the first operating system and the first application of the intelligent platform management interface protocol has been run, the first operating system obtains control authority of the target bus, and receives the first device request initiated by the basic input and output system running on the server host through the first bus driver; the first operating system obtains processing authority of the device request, executes the first device request through the first application to obtain a first request result; the first operating system uses the control authority of the target bus to send the first request result to the basic input and output system through the first bus driver.
[0006] As an optional implementation manner, when the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmit the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: when the second operating system is started to the stage where the second bus driver of the target bus has been loaded, determining that the second operating system has been started to the stage where communication with the second server device is allowed; the second operating system obtains the control authority of the target bus, receives the second device request initiated by the basic input and output system through the second bus driver and transmits the second device request to the first operating system; the first operating system continues to use the processing authority of the device request to execute the second device request through the first application to obtain the second request result and transmit the second request result to the second operating system; the second operating system uses the control authority of the target bus to send the second request result to the basic input and output system through the second bus driver.
[0007] As an optional implementation, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device, including: when the second operating system is started to the second application program that has run the intelligent platform management interface protocol, determining that the second operating system has been started to the stage where the execution of device requests is allowed; the second operating system uses the control authority of the target bus to receive the third device request initiated by the basic input and output system through the second bus driver; the second operating system obtains the processing authority of the device request, and executes the third device request through the second application program to obtain the third request result; the second operating system uses the control authority of the target bus to send the third request result to the basic input and output system through the second bus driver.
[0008] As an optional implementation manner, the second operating system obtains the control authority of the target bus, receives the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: the second operating system obtains the control authority of the target bus from the first operating system; the second operating system uses the control authority of the target bus to access the target bus to obtain the second device request initiated by the second server device on the target bus; the second operating system sends the second device request to the first operating system;
[0009] The first operating system continues to use the processing authority of the device request to execute the second device request and obtain the second request result of the second device request; the first operating system sends the second request result to the second operating system; the second operating system uses the control authority of the target bus to access the target bus and send the second request result to the second server device.
[0010] As an optional implementation, the sending of the second device request by the second operating system to the first operating system includes: the second operating system writes the second device request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access it and the second operating system to access it; the second operating system triggers a first interrupt to the first operating system; the first operating system responds to the first interrupt and reads the second device request from the target storage space; the sending of the second request result by the first operating system to the second operating system includes: the first operating system writes the second request result to the target storage space; the first operating system triggers a second interrupt to the second operating system; the second operating system responds to the second interrupt and reads the second request result from the target storage space.
[0011] As an optional implementation manner, the second operating system obtains the control authority of the target bus, receives the second device request initiated by the second server device and transmits the second device request to the first operating system, including: the second operating system requests the first operating system for the control authority of the target bus; when the second operating system has requested the control authority of the target bus, the second operating system accesses the target bus to obtain the second device request initiated by the second server device through the target bus; the second operating system transmits the second device request to the first operating system through the target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system.
[0012] As an optional implementation, the request by the second operating system to the first operating system for control authority of the target bus includes: the second operating system sending a first control request to the first operating system, wherein the first control request is used to request control authority of the target bus; the first operating system releasing control authority of the target bus in response to the first control request and sending a first response message to the second operating system, wherein the first response message is used to indicate that the second operating system is allowed to obtain control authority of the target bus; the second operating system determining that control authority of the target bus has been requested in response to the first response message, or the second operating system determining that control authority of the target bus has been requested when detecting that the first response message has not been received within a first time period after the first control request is issued.
[0013] As an optional implementation, the sending of the first control request by the second operating system to the first operating system includes: the second operating system writes the first control request into a target storage space on the first server device, wherein the target storage space allows the first operating system to access it and also allows the second operating system to access it; the second operating system triggers a third interrupt to the first operating system; the first operating system responds to the first control request to release the control authority of the target bus and sends a first response message to the second operating system, including: the first operating system responds to the third interrupt to read the first control request from the target storage space; the first operating system responds to the first control request to release the control authority of the target bus and writes the first response information to the target storage space; the first operating system triggers a fourth interrupt to the second operating system; the second operating system responds to the first response information to determine that the control authority of the target bus has been requested, including: the second operating system responds to the fourth interrupt to read the first response information from the target storage space; the second operating system determines that the control authority of the target bus has been requested based on the first response information.
[0014] As an optional implementation, the second operating system obtains the processing permission requested by the device to execute the third device request to obtain a third request result, including: the second operating system requests the processing permission requested by the device from the first operating system; when the second operating system has requested the processing permission requested by the device, the second operating system runs the application requested by the device to execute the third device request to obtain the third request result.
[0015] As an optional implementation, the request by the second operating system to the first operating system for the processing permission requested by the device includes: the second operating system sending a second control request to the first operating system, wherein the second control request is used to request the processing permission requested by the device; the first operating system releasing the processing permission requested by the device in response to the second control request, and sending a second response message to the second operating system, wherein the second response message is used to indicate that the second operating system is allowed to obtain the processing permission requested by the device; the second operating system determining, in response to the second response message, that the processing permission requested by the device has been requested, or the second operating system determining, in response to detecting that the second response message has not been received within a second time period after the second control request is issued, that the processing permission requested by the device has been requested.
[0016] As an optional implementation, the sending of the second control request by the second operating system to the first operating system includes: the second operating system writes the second control request into a target storage space on the first server device, wherein the target storage space allows the first operating system to access it and also allows the second operating system to access it; the second operating system triggers a fifth interrupt to the first operating system; the first operating system responds to the second control request to release the processing permission requested by the device, and sends a second response message to the second operating system, including: the first operating system responds to the fifth interrupt to read the second control request from the target storage space; the first operating system responds to the second control request to release the processing permission requested by the device, and writes the second response message to the target storage space; the first operating system triggers a sixth interrupt to the second operating system; the second operating system responds to the second response message to determine that the processing permission requested by the device has been requested, including: the second operating system responds to the sixth interrupt to read the second response message from the target storage space; the second operating system determines that the processing permission requested by the device has been requested based on the second response message.
[0017] As an optional implementation, a target memory area is divided in the memory of the first server device, a first interrupt service function, an interrupt receiving thread and a business module are deployed in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, and a business process is deployed in the application layer. The target memory area is set to allow access by both the interrupt receiving thread and the inter-core communication driver. The method also includes: when first data to be sent to the business module is generated in the business process, the business process sends the first data to the inter-core communication driver through a system call; the inter-core communication driver writes the first data into the target memory area and sends a first inter-core soft interrupt to the first operating system; the first operating system triggers the first interrupt service function after receiving the first inter-core soft interrupt; the first interrupt service function wakes up the interrupt receiving thread; the interrupt receiving thread reads the first data from the target memory area and sends the first data to the business module.
[0018] As an optional implementation, a target memory area is divided in the memory of the first server device, an interrupt sending thread and a business module are run in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, a second interrupt service function is deployed in the inter-core communication driver, a business process is deployed in the application layer, and the target memory area is set to allow access by both the interrupt sending thread and the inter-core communication driver. The method also includes: when second data to be sent to the business process is generated in the business module, the business module sends the second data to the interrupt sending thread; the interrupt sending thread writes the second data to the target memory area and sends a second inter-core soft interrupt to the inter-core communication driver; the inter-core communication driver triggers the second interrupt service function; the second interrupt service function reads the second data from the target memory area and sends the second data to the business process through a system call.
[0019] As an optional implementation, after the second operating system receives the third device request initiated by the second server device using the control authority of the target bus, the method further includes: monitoring, by the first operating system, the running status of the processing authority requested by the device on the second operating system; obtaining, from the second operating system, the control authority of the target bus and the processing authority requested by the device when it is monitored that the running status indicates that the processing authority requested by the device on the second operating system is running abnormally; and controlling, by the first operating system, the restart of the second operating system.
[0020] As an optional implementation, the monitoring by the first operating system of the running status of the processing permission requested by the device on the second operating system includes: the first operating system sending a heartbeat command to the second operating system, wherein the heartbeat command is used to instruct the second operating system to send the system status of the second operating system and the functional status of the processing permission requested by the device to the first operating system, wherein the running status of the processing permission requested by the device on the second operating system includes: the system status and the functional status; the method also includes: the second operating system listening to the heartbeat command; if the duration of not listening to the heartbeat command is greater than or equal to the target duration, determining that the first operating system is operating abnormally, and restarting the first operating system by the second operating system.
[0021] According to another embodiment of the present application, a startup device for a server device is provided, wherein a first operating system and a second operating system are deployed on a first server device, a response speed of the first operating system is greater than a response speed of the second operating system, the first server device is connected to the second server device via a target bus, the device is applied to the first server device, and the device comprises: a first running module, for, when the first server device is started and the first operating system is started, the first operating system obtains control authority of the target bus, receives a first device request initiated by the second server device, the first operating system obtains processing authority of the device request to execute the first device request to obtain a first request result, and the first operating system uses the control authority of the target bus to send the first request result to the second server device; a second running module, for, when the second operating system is started to the stage where communication with the second server device is allowed In the case of the first operating system, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device; a third running module is used for, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] Through the present application, when the first server device is started and the first operating system with a faster response speed is started, the first operating system can obtain the control authority of the target bus and can obtain the processing authority of the device request, so it can respond to the request of the second server device faster, avoiding the long waiting of the request of the second device; when the second operating system is started to the stage where communication can be carried out, the second operating system obtains the control authority of the target bus, and the communication process between the first server device and the second server device is handed over to the second operating system for execution, and the first operating system continues to use the processing authority of the device request, and gradually transfers the interaction process of the server device to the second operating system; when the first server device is started to the stage where the second operating system is allowed to execute the device request, the second operating system uses the control authority of the target bus and the processing authority of the device request, and finally makes the interaction process of the server device all completed by the second operating system, and the interaction process of the server device in summary not only makes the startup process of the second operating system not become an obstacle to the interaction between the second server device and the first server device, but also makes the interaction process of the server device take over when the second operating system has more operating capabilities to improve the efficiency of the interaction process. Therefore, the problem of low interaction efficiency between server devices can be solved, and the effect of improving the interaction efficiency between server devices can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a hardware structure block diagram of a server device of a method for starting a server device according to an embodiment of the present application;
[0027] Figure 2 is a flowchart of a method for starting a server device according to an embodiment of the present application;
[0028] Figure 3 This is a schematic diagram of communication between operating systems according to an embodiment of the present application. Figure 1 ;
[0029] Figure 4 This is a schematic diagram of communication between operating systems according to an embodiment of the present application. Figure 2 ;
[0030] Figure 5 is a schematic diagram of the structure of data stored in a target memory area according to an embodiment of the present application;
[0031] Figure 6 is a structural diagram of a server device startup process according to an embodiment of the present application;
[0032] Figure 7 is a flow chart of a baseboard management controller startup process according to an embodiment of the present application;
[0033] Figure 8 is a flow chart of a control authority / processing authority handover process according to an embodiment of the present application;
[0034] Fig. 9 It is a schematic diagram of a process of a first operating system monitoring the running status of a second operating system according to an embodiment of the present application;
[0035] Fig.10 is a schematic diagram of a flow chart of a second operating system monitoring the running status of a first operating system according to an embodiment of the present application;
[0036] Fig.11 It is a structural block diagram of a startup device of a server device according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0038] 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.
[0039] 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 FIG. 1 is a hardware structure diagram of a server device in a method for starting a server device 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) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU, a system-on-chip SOC or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above-mentioned 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.
[0040] 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 server device 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.
[0041] 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.
[0042] In this embodiment, a method for starting a server device is provided. Figure 2 is a flowchart of a method for starting a server device according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0043] Step S202, when the first server device is started and the first operating system is started, the first operating system obtains the control authority of the target bus, receives the first device request initiated by the second server device, obtains the processing authority of the device request, executes the first device request to obtain the first request result, and sends the first request result to the second server device by using the control authority of the target bus;
[0044] Step S204, when the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device;
[0045] Step S206, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
[0046] Through the above steps, when the first server device is started and the first operating system with a faster response speed is started, the first operating system can obtain the control authority of the target bus and can obtain the processing authority of the device request, so it can respond to the request of the second server device faster, avoiding the long waiting of the request of the second device; when the second operating system is started to the stage where communication can be carried out, the second operating system obtains the control authority of the target bus, and the communication process between the first server device and the second server device is handed over to the second operating system for execution, and the first operating system continues to use the processing authority of the device request, and gradually transfers the interaction process of the server device to the second operating system; when the first server device is started to the stage where the second operating system is allowed to execute the device request, the second operating system uses the control authority of the target bus and the processing authority of the device request, and finally makes the interaction process of the server device all completed by the second operating system. In summary, the interaction process of the server device not only makes the startup process of the second operating system not become an obstacle to the interaction between the second server device and the first server device, but also makes the interaction process of the server device take over when the second operating system has more operating capabilities to improve the efficiency of the interaction process. Therefore, the problem of low interaction efficiency between server devices can be solved, and the effect of improving the interaction efficiency between server devices can be achieved.
[0047] Optionally, in an embodiment of the present application, the first server device may be, but is not limited to, a BMC (Baseboard Management Controller), which is an embedded processor used to monitor, report, and control the status of server hardware. BMC is an independent system under the server system, with its own processor and memory. Even if the host hardware or operating system crashes or is shut down, the host system can still be managed by the BMC system. BMC can monitor various parameters of the host, such as temperature, voltage, fan speed, power status, etc., and can realize functions such as remote power on and off, remote reinstallation of the host system, and remote display of the host screen.
[0048] The second server device may be, but is not limited to, a server host. During the server host startup process, the BIOS (Basic Input Output System) is responsible for initializing hardware devices, testing hardware, loading the operating system boot loader (Boot Loader) or starting the operating system from a storage device (such as a hard disk, USB (Universal Serial Bus) drive, CD, etc.) when the computer is turned on. BIOS is the computer's basic input and output system, which is a firmware program pre-installed on the computer motherboard. BIOS runs on the host CPU (Central Processing Unit) and ends its life cycle after the host operating system is started.
[0049] The target bus can be, but is not limited to, a bus that allows the transmission of data that complies with the Intelligent Platform Management Interface protocol, such as a KCS (Keyboard Controller Style) bus or a BT (Block Transfer) bus. During the BIOS boot process, it sends IPMI (Intelligent Platform Management Interface) protocol commands to the BMC through the KCS bus or the BT bus to obtain data. The KCS bus is a communication interface for system management and monitoring, and uses a byte-based handshake protocol for data transmission. The BT bus is an interface standard for data transmission, which is usually used in high-performance systems. It provides an efficient and reliable data transmission method, especially suitable for block transmission of large amounts of data. The BIOS reads the hardware configuration or software configuration file early in the boot process to select which bus to use for transmission.
[0050] IPMI is an open standard protocol for server management. The IPMI protocol allows system administrators to remotely monitor various parameters of the server, such as temperature, voltage, fan speed, power status, etc., and can run independently of the server host firmware and host operating system. Through IPMI, administrators can remotely turn on and off, restart the server, and even automatically send alarm notifications when there is a problem with the server. The IPMI protocol has been widely used in scenarios such as data centers and cloud computing, which can greatly improve the management efficiency and reliability of servers and reduce maintenance costs.
[0051] Optionally, in an embodiment of the present application, the first server device may be but is not limited to a RAID (Redundant Array of Independent Disks) controller, the second server device may be but is not limited to a host device deployed with a storage array, and the target bus may be but is not limited to a bus that allows transmission of data compliant with the PCIe (Peripheral Component Interconnect Express) protocol.
[0052] Optionally, in an embodiment of the present application, the response speed of the first operating system is greater than the response speed of the second operating system, which may be, but is not limited to, that the first operating system is more sensitive to response time than the second operating system. The above-mentioned first operating system and second operating system may be, but are not limited to, two heterogeneous operating systems deployed on the processor of the embedded system, that is, an embedded operating system. The embedded operating system can be divided into a real-time operating system (RTOS) and a non-real-time operating system according to the sensitivity to response time. The real-time operating system may include, but is not limited to Free RTOS (Free Real-Time Operating System) and RT Linux (Real Time Linux), and the non-real-time operating system may include, but is not limited to, contiki (Contiki Operating System), HeliOS (Helix Operating System), and Linux (Linux Operating System). Optionally, the first operating system may be, but is not limited to, a real-time operating system, and the second operating system may be, but is not limited to, a non-real-time operating system.
[0053] Optionally, in an embodiment of the present application, the first operating system may be, but is not limited to, used to implement the main functions of the first server device, and the second operating system may be, but is not limited to, used to implement the auxiliary functions of the first server device. The response speed of the second operating system may be, but is not limited to, lower than that of the first operating system, while the second operating system may be able to implement functions that the first operating system cannot implement.
[0054] Optionally, in an embodiment of the present application, the first server device may be, but is not limited to, a BMC, the first operating system may be, but is not limited to, a real-time operating system RTOS, and the second operating system may be, but is not limited to, Linux. The BMC may include, but is not limited to, at least two processor cores, one of which (at least one) is a processor core with good computing power and can be called a main core, and the other part (at least one) is a processor core with general computing power but good real-time performance and can be called a co-core. The hardware structure of the main core can provide more powerful performance support to the operating system on the main core, and the co-core provides weaker performance support to the operating system than the main core. Therefore, the main core may, but is not limited to, run a second operating system (such as a Linux operating system) with a more complex structure, more powerful performance but relatively slow startup speed, and run a first operating system (such as a real-time operating system RTOS) with a simpler structure, more ordinary performance but relatively faster startup speed on the slave core.
[0055] In the embodiment provided in step S202, the control of the target bus may be, but is not limited to, implemented by using a data reading and / or data writing module or program of the target bus, and the data reading and / or data writing module or program of the bus may be, but is not limited to, the bus driver corresponding to each bus. An operating system that obtains the control authority of the target bus may be, but is not limited to, allowed to use the bus driver corresponding to the target bus, and an operating system that does not obtain the control authority of the target bus may be, but is not limited to, prohibited from using the bus driver corresponding to the target bus; an operating system that obtains the processing authority of a device request may be, but is not limited to, allowed to execute the program corresponding to the device request, and an operating system that does not obtain the processing authority of the device request may be, but is not limited to, prohibited from executing the program corresponding to the device request.
[0056] In the embodiment provided in step S204, the second operating system can, but is not limited to, communicate with the second server device through the target bus. The stage from when the second operating system is started to when communication with the second server device is allowed includes, but is not limited to, that the components / programs in the second operating system for communicating with the second server device using the target bus have been successfully started, and the second operating system has the ability to receive a second device request from the second server device from the target bus and send a second processing result of the second device request to the second server device through the second target bus.
[0057] In the embodiment provided in step S206, the second operating system is started to the stage where the execution of the device request is allowed, including but not limited to the components / programs for communicating with the second server device using the target bus and the components / applications for executing the device request from the second server device have been successfully started, and the second operating system has the ability to receive the second device request of the second server device from the target bus and send the second processing result of the second device request to the second server device through the second target bus, and also has the ability to execute the third device request to obtain the third request result.
[0058] As an optional implementation, a target memory area is divided in the memory of the first server device, a first interrupt service function, an interrupt receiving thread and a business module are deployed in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, and a business process is deployed in the application layer. The target memory area is set to allow access by both the interrupt receiving thread and the inter-core communication driver. The method also includes: when first data to be sent to the business module is generated in the business process, the business process sends the first data to the inter-core communication driver through a system call; the inter-core communication driver writes the first data to the target memory area and sends a first inter-core soft interrupt to the first operating system; the first operating system triggers the first interrupt service function after receiving the first inter-core soft interrupt; the first interrupt service function wakes up the interrupt receiving thread; the interrupt receiving thread reads the first data from the target memory area and sends the first data to the business module.
[0059] Through the above steps, data in the second operating system is transferred to the first operating system, so that the first server device can still efficiently process data when the second operating system cannot process data, thereby improving the data processing efficiency of the first server device.
[0060] Optionally, in the embodiments of the present application, Figure 3 This is a schematic diagram of communication between operating systems according to an embodiment of the present application. Figure 1 ,like Figure 3As shown, the communication between Linux (i.e., the second operating system) and the real-time operating system RTOS (i.e., the first operating system) requires the use of inter-core communication soft interrupts (i.e., inter-core soft interrupts) and shared memory (i.e., the target memory area), which is in the memory of the BMC (i.e., the first server device). There are multiple channels in the shared memory (i.e., channel 0-channel n), and each channel can only transmit one command (i.e., data) at the same time. The command follows a certain data structure to facilitate parsing by both the first operating system and the second operating system. The inter-core communication module can be divided into two directions: Linux to real-time operating system, and real-time operating system to Linux. The process from Linux to real-time operating system includes the following steps:
[0061] Step S301, Linux is divided into a kernel layer and an application layer, the inter-core communication driver is located in the kernel layer, and each service module (i.e., service process) is located in the application layer. When each service module needs to send data to the real-time operating system, the data is sent to the inter-core communication driver of the kernel layer through system calls such as copy_from_user;
[0062] Step S302, after the inter-core communication driver obtains the data, it writes the data into an idle channel of the shared memory and sends an inter-core soft interrupt to the co-core (ie, to the first operating system);
[0063] Step S303, after receiving the inter-core soft interrupt, the cooperative core triggers the interrupt service function (ISR) of the real-time operating system, and the interrupt service function wakes up the IPI (Inter-Processor Interrupt) receiving thread (i.e., the interrupt receiving thread);
[0064] Step S304: the IPI receiving thread reads data from the shared memory, parses the data, and then sends the data to various service modules for execution according to the data content.
[0065] As an optional implementation, a target memory area is divided in the memory of the first server device, an interrupt sending thread and a business module are run in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, a second interrupt service function is deployed in the inter-core communication driver, a business process is deployed in the application layer, and the target memory area is set to allow access by both the interrupt sending thread and the inter-core communication driver. The method also includes: when second data to be sent to the business process is generated in the business module, the business module sends the second data to the interrupt sending thread; the interrupt sending thread writes the second data to the target memory area, and sends a second inter-core soft interrupt to the inter-core communication driver; the inter-core communication driver triggers the second interrupt service function; the second interrupt service function reads the second data from the target memory area, and sends the second data to the business process through a system call.
[0066] Through the above steps, data in the first operating system is transferred to the second operating system, so that the first server device can still efficiently process data when the first operating system cannot process data, thereby improving the data processing efficiency of the first server device.
[0067] Optionally, in the embodiments of the present application, Figure 4 This is a schematic diagram of communication between operating systems according to an embodiment of the present application. Figure 2 ,like Figure 4 As shown, the communication between Linux (i.e., the second operating system) and the real-time operating system RTOS (i.e., the first operating system) requires the use of inter-core communication soft interrupts (i.e., inter-core soft interrupts) and shared memory (i.e., the target memory area), which is in the memory of the BMC (i.e., the first server device). There are multiple channels in the shared memory (i.e., channel 0-channel n), and each channel can only transmit one command (i.e., data) at the same time. The command follows a certain data structure to facilitate parsing by both the first operating system and the second operating system. The inter-core communication module can be divided into two directions: Linux to real-time operating system, and real-time operating system to Linux. The process from real-time operating system to Linux includes the following steps:
[0068] Step S401: In the real-time operating system, there is no distinction between the kernel layer and the application layer, and no data transfer between the application layer and the kernel layer is required. Each service module sends data to the IPI sending module (i.e., the interrupt sending thread);
[0069] Step S402, after receiving the data, the IPI sending module structures the data, puts the data into an idle channel in the shared memory, and sends an inter-core soft interrupt to the main core;
[0070] Step S403, after receiving the inter-core soft interrupt, the main core triggers the interrupt service function, which takes out the data from the shared memory and parses it. After the data parsing is completed, the data is sent to the corresponding business module (i.e., business process) through the system call;
[0071] Step S404: After receiving the data, the corresponding business module executes the command according to the data.
[0072] Optionally, in the embodiments of the present application, Figure 5 is a schematic diagram of a structure of data stored in a target memory area according to an embodiment of the present application. The data stored in the shared memory (ie, the target memory area) has the following structure: Figure 5 The data structure shown in the figure, where the channel status value is 0 (channel not occupied) or 1 (channel occupied), and whether the channel is occupied can be determined based on the value. The structure of the IPI command (i.e., the first data and the second data) data header is:
[0073] typedef struct
[0074] {
[0075] uint32_tmagic; / / constant
[0076] uint32_t cmd; / / Command code, indicating what command is sent
[0077] int32_tcmdReturn; / / Command execution result
[0078] uint32_tbodyLen; / / length of command body
[0079] uint32_tbodyCrc; / / Checksum of command body
[0080] }IpiCmdHeader;
[0081] As an optional implementation, the first server device includes a baseboard management controller of the target server, the second server device includes a server host of the target server, and the target bus is a bus that allows the transmission of data that complies with the intelligent platform management interface protocol; when the first server device is started and the first operating system is started, the first operating system obtains the control authority of the target bus, receives the first device request initiated by the second server device, and the first operating system obtains the processing authority of the device request to execute the first device request to obtain the first request result, and the first operating system uses the control authority of the target bus to send the first request result to the second server device, including: when the target server is started, the first operating system and the second operating system are started on the baseboard management controller; when the first bus driver of the target bus has been loaded on the first operating system and the first application of the intelligent platform management interface protocol has been run, the first operating system obtains the control authority of the target bus, and receives the first device request initiated by the basic input and output system running on the server host through the first bus driver; the first operating system obtains the processing authority of the device request, and executes the first device request through the first application to obtain the first request result; the first operating system uses the control authority of the target bus to send the first request result to the basic input and output system through the first bus driver.
[0082] Through the above steps, when the target server is started, the first operating system and the second operating system are started on the baseboard management controller, and the first operating system can obtain the control authority of the target bus and the processing authority of the device request, so that the first operating system can receive the first device request initiated by the basic input and output system running on the server host when the second operating system has not yet been fully started successfully, and process the first device request to obtain the first request result of the first device request, and send the first request result back to the basic input and output system, so as to avoid affecting the data interaction with the server host due to the startup time of the second operating system, and improve the interaction efficiency between server devices.
[0083] As an optional implementation, when the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus, receives the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmit the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: when the second operating system is started to the second bus driver of the target bus has been loaded, it is determined that the second operating system has been started to the stage where communication with the second server device is allowed; the second operating system obtains the control authority of the target bus, receives the second device request initiated by the basic input and output system through the second bus driver and transmits the second device request to the first operating system; the first operating system continues to use the processing authority of the device request, executes the second device request through the first application to obtain the second request result and transmits the second request result to the second operating system; the second operating system uses the control authority of the target bus to send the second request result to the basic input and output system through the second bus driver.
[0084] Through the above steps, when the second operating system is started and the second bus driver of the target bus has been loaded, that is, the second operating system has the ability to obtain device requests from the target bus, the second operating system obtains the control authority of the target bus, and the process of obtaining the device request and the process of sending the corresponding result of the device request are transferred to the second operating system to complete, and all processes of the device request are gradually transferred to be implemented by the second operating system, so as to avoid affecting the data interaction between server devices due to insufficient processing power of the first operating system, and improve the data interaction efficiency between server devices.
[0085] Optionally, in an embodiment of the present application, the second operating system obtains control authority over the target bus, and after receiving a second device request initiated by the basic input / output system through the second bus driver, the business process deployed in the application layer in the second operating system sends the second device request to the inter-core communication driver loaded in the kernel layer of the second operating system through a system call, and the inter-core communication driver writes the second device request into a target memory area divided in the memory of the baseboard management controller and set to allow access by both the interrupt receiving thread deployed in the first operating system and the inter-core communication driver, and sends a third inter-core soft interrupt to the first operating system. After receiving the third inter-core soft interrupt, the first operating system triggers the first interrupt service function deployed in the first operating system, and the first interrupt service function wakes up the interrupt receiving thread, and the interrupt receiving thread reads the second device request from the target memory area, and sends the second device request to the business module deployed in the first operating system, thereby transmitting the second device request to the first operating system.
[0086] Optionally, in an embodiment of the present application, after executing the second device request through the first application to obtain the second request result, the business module running in the first operating system sends the second request result to the interrupt sending thread running in the first operating system, and the interrupt sending thread writes the second request result into a target memory area divided in the memory of the baseboard management controller and set to allow access by both the interrupt receiving thread and the inter-core communication driver loaded in the kernel layer of the second operating system, and sends a fourth inter-core soft interrupt to the inter-core communication driver loaded in the kernel layer of the second operating system, and the inter-core communication driver triggers the second interrupt service function deployed in the inter-core communication driver, and the second interrupt service function reads the second request result from the target memory area, and sends the second request result to the business process deployed in the application layer of the second operating system through a system call, thereby transmitting the second request result to the second operating system.
[0087] As an optional implementation, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device, including: when the second operating system is started to the second application program that has run the intelligent platform management interface protocol, determining that the second operating system has been started to the stage where the execution of device requests is allowed; the second operating system uses the control authority of the target bus to receive the third device request initiated by the basic input and output system through the second bus driver; the second operating system obtains the processing authority of the device request, executes the third device request through the second application program to obtain the third request result; the second operating system uses the control authority of the target bus to send the third request result to the basic input and output system through the second bus driver.
[0088] Through the above steps, when the second operating system has the ability to execute device requests, the process of obtaining, processing and sending corresponding request results of device requests is transferred to the second operating system to complete, thereby improving the processing efficiency of device requests and improving the efficiency of data interaction between server devices.
[0089] Optionally, in an embodiment of the present application, when the target server is powered on, the BMC (baseboard management controller) and the BIOS (basic input and output system) in the server host will be started at the same time. When only Linux operating system is running on the BMC, KCS and BT drivers will be loaded during the Linux kernel startup process, and the IPMI (intelligent platform management interface) application will be run after the Linux kernel startup is completed. The firmware of the BMC starts slowly, and during the BIOS startup process of the server host, it is necessary to transmit IPMI commands to the BMC and wait for the required data to continue to start. The time for the BIOS to wait for the BMC to respond to the IPMI command for nearly ten seconds greatly increases the startup time of the host operating system. If the real-time operating system is run directly in the co-core of the BMC, the KCS / BT driver and the IPMI application are always placed in the real-time operating system. Although the startup speed of the firmware on the BMC can be improved, when Linux needs to interact with the BIOS of the server host, the command needs to be sent to the co-core first, and then sent to the BIOS by the co-core, and the interaction efficiency is affected. With the solution provided by this application, during the server startup process, in the early stage of BMC startup, the real-time operating system will take over the control of the KCS / BT bus and use it to respond to IPMI commands, and gradually transfer the control of the communication bus and the IPMI response rights to the Linux system when the Linux operating system starts to a suitable stage. This not only solves the problem of slow interaction between the BMC and the server host in the early stage of server startup, but also ensures the interaction efficiency between the BMC and the server host after the BMC is fully started, thereby achieving the effect of improving the interaction efficiency between server devices.
[0090] Optional, Figure 6 is a structural diagram of a server device startup process according to an embodiment of the present application, such as Figure 6 As shown in the figure, BIOS sends IPMI commands (i.e., device requests) to BMC through the KCS / BT bus (i.e., target bus). Both Linux and the real-time operating system have KCS / BT drivers (i.e., second bus driver and first bus driver) to access the KCS / BT controller to obtain data sent by BIOS. After the IPMI module obtains data from the KCS / BT driver, it parses and executes the IPMI command sent by BIOS. After the IPMI module completes the command execution, it sends the command execution result back to BIOS through the KCS / BT driver. The inter-core communication (IPI) module and BMC memory (DDR) provide channels for interaction between Linux and the real-time operating system. During the BMC startup process, the authority handover between Linux and the real-time operating system can be carried out through the inter-core communication (IPI) module for information exchange.
[0091] Optionally, in an embodiment of the present application, the first server device includes an independent disk array controller of the target storage system, the second server device includes a storage system host of the target storage system, and the target bus is a bus that allows the transmission of data that complies with the high-speed serial computer expansion bus standard protocol; when the first server device is started and the first operating system is started, the first operating system obtains the control authority of the target bus, receives the first device request initiated by the second server device, the first operating system obtains the processing authority of the device request to execute the first device request to obtain the first request result, and the first operating system uses the control authority of the target bus to send the first request result to the second server device, including: when the target storage system is started, the first operating system and the second operating system are started on the independent disk array controller; when the third bus driver of the target bus has been loaded on the first operating system and the third application program of the high-speed serial computer expansion bus standard protocol has been run, the first operating system obtains the control authority of the target bus, and receives the first device request initiated by the basic input and output system running on the storage system host through the third bus driver; the first operating system obtains the processing authority of the device request, executes the first device request through the third application program to obtain the first request result; the first operating system uses the control authority of the target bus to send the first request result to the basic input and output system through the third bus driver.
[0092] Optionally, when the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmit the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: when the second operating system is started to the stage where the fourth bus driver of the target bus has been loaded, it is determined that the second operating system has been started to the stage where communication with the second server device is allowed; the second operating system obtains control authority of the target bus, receives the second device request initiated by the basic input and output system through the fourth bus driver and transmits the second device request to the first operating system; the first operating system continues to use the processing authority of the device request to execute the second device request through a third application to obtain the second request result and transmit the second request result to the second operating system; the second operating system uses the control authority of the target bus to send the second request result to the basic input and output system through the fourth bus driver.
[0093] Optionally, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device, including: when the second operating system is started to the fourth application program that has run the high-speed serial computer expansion bus standard protocol, determining that the second operating system has been started to the stage where the execution of device requests is allowed; the second operating system uses the control authority of the target bus to receive the third device request initiated by the basic input and output system through the fourth bus driver; the second operating system obtains the processing authority of the device request, executes the third device request through the fourth application program to obtain the third request result; the second operating system uses the control authority of the target bus to send the third request result to the basic input and output system through the fourth bus driver.
[0094] As an optional implementation, the second operating system obtains control authority of the target bus, receives a second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain a second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: the second operating system obtains control authority of the target bus from the first operating system; the second operating system uses the control authority of the target bus to access the target bus to obtain the second device request initiated by the second server device on the target bus; the second operating system sends the second device request to the first operating system; the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result of the second device request; the first operating system sends the second request result to the second operating system; the second operating system uses the control authority of the target bus to access the target bus to send the second request result to the second server device.
[0095] As an optional implementation, the second operating system sends a second device request to the first operating system, including: the second operating system writes the second device request to a target storage space on the first server device, wherein the target storage space allows access by both the first operating system and the second operating system; the second operating system triggers a first interrupt to the first operating system; the first operating system responds to the first interrupt and reads the second device request from the target storage space; the first operating system sends a second request result to the second operating system, including: the first operating system writes the second request result to the target storage space; the first operating system triggers a second interrupt to the second operating system; the second operating system responds to the second interrupt and reads the second request result from the target storage space.
[0096] Through the above steps, the first operating system and the second operating system can collaboratively process the second device request, and the entire processing process of the device request is gradually handed over to the second operating system. This also provides a new solution to the situation where the first operating system and the second operating system cannot independently process the device request, thereby improving the interaction efficiency of the server device.
[0097] Optionally, in the embodiments of the present application, Figure 7 is a flowchart of a baseboard management controller startup process according to an embodiment of the present application, such as Figure 7 As shown, the BMC startup process can be divided into three stages: RTOS response stage, Linux proxy KCS / BT stage, and Linux response stage. When the KCS / BT driver and IPMI process of the Linux system are not loaded, it is in the RTOS response stage. In this stage, the KCS / BT driver control and IPMI command response rights are in the RTOS; when the Linux KCS / BT driver is loaded but the IPMI process is not loaded, it is in the Linux proxy KCS / BT stage. In this stage, the KCS / BT control is in Linux and the IPMI command response is in RTOS; after the Linux KCS / BT driver and IPMI process are loaded, the KCS / BT control and IPMI command response are in Linux. Among them,
[0098] RTOS response phase (i.e., the first bus driver of the target bus has been loaded on the first operating system and the first application of the intelligent platform management interface protocol has been running): Since RTOS starts much faster than Linux, RTOS first obtains the control of KCS / BT and the processing rights of IPMI commands. When the KCS / BT driver in Linux starts running, it requests the control of KCS / BT from RTOS. After receiving the request, RTOS will release the control of KCS / BT and return a transferable message to Linux, so that Linux can obtain the control of KCS / BT. If Linux requests the control of KCS / BT from RTOS for a period of time and RTOS still does not return, it is considered that the RTOS is running abnormally, and Linux forcibly obtains the control of KCS / BT. After Linux obtains the control of KCS / BT, it enters the Linux proxy KCS / BT phase.
[0099] Linux agent KCS / BT stage (i.e. the second operating system is started to the second bus driver with the target bus loaded): In this stage, the processing right of IPMI commands lies with RTOS, and the control right of KCS / BT lies with Linux. When Linux receives a KCS / BT data packet, it will parse and structure the KCS / BT data packet, and then send it to the real-time operating system through the IPI module. After receiving the data, the real-time operating system will parse and execute the command. After the execution is completed, the IPMI reply packet is organized and then sent to Linux through the IPI module. Linux sends the IPMI reply packet to the BIOS through the KCS / BT bus. When the Linux IPMI process is started, Linux sends an IPMI command response right request to the RTOS, and the RTOS releases the IPMI command response right and enters the Linux control stage.
[0100] Linux response phase (i.e., the second operating system is started to the second application program that has run the Intelligent Platform Management Interface Protocol): Linux responds to the IPMI command, and the RTOS enters the exception monitoring mode. The RTOS will periodically send status query commands to Linux to inquire about the Linux status and IPMI process status. If Linux does not respond or the Linux IPMI process is abnormal, the RTOS enters the exception handling state.
[0101] As an optional implementation, the second operating system obtains control authority of the target bus, receives a second device request initiated by the second server device and transmits the second device request to the first operating system, including: the second operating system requests control authority of the target bus from the first operating system; when the second operating system has requested control authority of the target bus, the second operating system accesses the target bus to obtain the second device request initiated by the second server device through the target bus; the second operating system transmits the second device request to the first operating system through a target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system.
[0102] As an optional implementation, the second operating system requests the first operating system for control authority of a target bus, including: the second operating system sends a first control request to the first operating system, wherein the first control request is used to request control authority of the target bus; the first operating system releases control authority of the target bus in response to the first control request, and sends a first response message to the second operating system, wherein the first response message is used to indicate that the second operating system is allowed to obtain control authority of the target bus; the second operating system determines that control authority of the target bus has been requested in response to the first response message, or the second operating system determines that control authority of the target bus has been requested when detecting that the first response message is not received within a first time period after the first control request is issued.
[0103] Optionally, in an embodiment of the present application, sending the first control request by the second operating system to the first operating system includes but is not limited to sending the first control request by a business process deployed at the application layer of the second operating system to an inter-core communication driver loaded at the kernel layer of the second operating system through a system call; the inter-core communication driver writes the first control request to a target memory area divided in the memory of the first server device and set to allow access by both the interrupt receiving thread deployed in the first operating system and the inter-core communication driver, and sends a fifth inter-core soft interrupt to the first operating system; after receiving the fifth inter-core soft interrupt, the first operating system triggers the first interrupt service function deployed in the first operating system; the interrupt receiving thread is awakened by the first interrupt service function; the interrupt receiving thread reads the first control request from the target memory area, and sends the first control request to the business module deployed in the first operating system.
[0104] Optionally, in an embodiment of the present application, sending a first response message to the second operating system includes but is not limited to sending the first response message by a business module in the first operating system to an interrupt sending thread in the first operating system; writing the first response message by the interrupt sending thread into a target memory area divided in the memory of the first server device and set to allow access by both the interrupt receiving thread and the inter-core communication driver loaded by the kernel layer of the second operating system, and sending a sixth inter-core soft interrupt to the inter-core communication driver; triggering a second interrupt service function deployed in the inter-core communication driver by the inter-core communication driver; reading the first response message from the target memory area by the second interrupt service function, and sending the first response message to the business process deployed in the application layer of the second operating system through a system call.
[0105] As an optional implementation, the second operating system sends a first control request to the first operating system, including: the second operating system writes the first control request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system; the second operating system triggers a third interrupt to the first operating system; the first operating system responds to the first control request to release control authority of the target bus, and sends a first response message to the second operating system, including: the first operating system responds to the third interrupt to read the first control request from the target storage space; the first operating system responds to the first control request to release control authority of the target bus, and writes the first response message to the target storage space; the first operating system triggers a fourth interrupt to the second operating system; the second operating system responds to the first response message to determine that control authority to the target bus has been requested, including: the second operating system responds to the fourth interrupt to read the first response message from the target storage space; the second operating system determines that control authority to the target bus has been requested based on the first response message.
[0106] Through the above steps, the control authority of the target bus is transferred from the first operating system to the second operating system, ensuring that the second operating system can process the device request from the second server device after the first server device is normally started, avoiding the insufficient operation capability of the first operating system affecting the processing efficiency of the device request, and improving the interaction efficiency between server devices.
[0107] Optionally, in the embodiments of the present application, Figure 8 1 is a flowchart of a control authority / processing authority handover process according to an embodiment of the present application, wherein the processing flow of Linux requesting KCS / BT control authority (i.e., control authority of the target bus) or IPMI command response authority (i.e., processing authority requested by the device) from the real-time operating system is as follows: Figure 8As shown, in Linux, after Linux loads the KCS / BT driver (i.e., the second bus driver), it will request the control of KCS / BT from the real-time operating system; after Linux starts the IPMI process (i.e., the second application of the Intelligent Platform Management Interface Protocol), it will also request the IPMI command response right from the real-time operating system. When the request for control fails, it will wait for a while and request control again. If the number of repeated requests is not less than the set number, the control is forcibly obtained.
[0108] As an optional implementation, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, including: the second operating system requests the processing authority of the device request from the first operating system;
[0109] In the case that the second operating system has requested the processing authority of the device request, the second operating system runs the application requested by the device to execute the third device request and obtain the third request result.
[0110] As an optional implementation, the second operating system requests the first operating system for the processing permission requested by the device, including: the second operating system sends a second control request to the first operating system, wherein the second control request is used to request the processing permission requested by the device; the first operating system responds to the second control request to release the processing permission requested by the device, and sends a second response message to the second operating system, wherein the second response message is used to indicate that the second operating system is allowed to obtain the processing permission requested by the device; the second operating system responds to the second response message to determine that the processing permission requested by the device has been requested, or the second operating system determines that the processing permission requested by the device has been requested when detecting that the second response message is not received within a second time period after the second control request is issued.
[0111] Optionally, in an embodiment of the present application, sending a second control request by the second operating system to the first operating system includes but is not limited to sending the second control request by a business process deployed at the application layer of the second operating system to an inter-core communication driver loaded at the kernel layer of the second operating system through a system call; the inter-core communication driver writes the second control request to a target memory area divided in the memory of the first server device and set to allow access by both the interrupt receiving thread deployed in the first operating system and the inter-core communication driver, and sends a seventh inter-core soft interrupt to the first operating system; after receiving the seventh inter-core soft interrupt, the first operating system triggers the first interrupt service function deployed in the first operating system; the interrupt receiving thread is awakened by the first interrupt service function; the interrupt receiving thread reads the second control request from the target memory area, and sends the second control request to the business module deployed in the first operating system.
[0112] Optionally, in an embodiment of the present application, sending a second response message to the second operating system includes but is not limited to sending the second response message by a business module in the first operating system to an interrupt sending thread in the first operating system; writing the second response message by the interrupt sending thread into a target memory area divided in the memory of the first server device and set to allow access by both the interrupt receiving thread and the inter-core communication driver loaded by the kernel layer of the second operating system, and sending an eighth inter-core soft interrupt to the inter-core communication driver; triggering a second interrupt service function deployed in the inter-core communication driver by the inter-core communication driver; reading the second response message from the target memory area by the second interrupt service function, and sending the second response message to the business process deployed in the application layer of the second operating system through a system call.
[0113] As an optional implementation, the second operating system sends a second control request to the first operating system, including: the second operating system writes the second control request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system; the second operating system triggers a fifth interrupt to the first operating system; the first operating system responds to the second control request to release the processing permission requested by the device, and sends a second response message to the second operating system, including: the first operating system responds to the fifth interrupt to read the second control request from the target storage space; the first operating system responds to the second control request to release the processing permission requested by the device, and writes the second response message to the target storage space; the first operating system triggers a sixth interrupt to the second operating system; the second operating system responds to the second response message to determine that the processing permission requested by the device has been requested, including: the second operating system responds to the sixth interrupt to read the second response message from the target storage space; the second operating system determines that the processing permission requested by the device has been requested based on the second response message.
[0114] Through the above steps, the processing authority of the device request is transferred from the first operating system to the second operating system, ensuring that the second operating system can process the device request from the second server device after the first server device is normally started, avoiding the insufficient operating capacity of the first operating system affecting the processing efficiency of the device request, and improving the interaction efficiency between server devices.
[0115] As an optional implementation, after the second operating system receives a third device request initiated by the second server device using the control authority of the target bus, the method further includes: the first operating system monitors the running status of the processing authority requested by the device on the second operating system; when the monitored running status indicates that the processing authority requested by the device on the second operating system is running abnormally, obtaining the control authority of the target bus and the processing authority requested by the device from the second operating system; and the first operating system controls the second operating system to restart.
[0116] Through the above steps, after the second operating system is started to the stage where the execution of the device request is allowed and the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the first operating system monitors the running status of the processing authority of the device request on the second operating system. In the event of an abnormal operation, the first operating system temporarily takes over the control authority of the bus and the processing authority of the request and controls the restart of the second operating system, which can avoid problems in the subsequent operation process after the second operating system is successfully started, resulting in the first server device being unable to process the device request from the second server device in time, thereby improving the interaction efficiency between server devices.
[0117] As an optional implementation, the first operating system monitors the running status of the processing authority requested by the device on the second operating system, including: the first operating system sends a heartbeat command to the second operating system, wherein the heartbeat command is used to instruct the second operating system to send the system status of the second operating system and the functional status of the processing authority requested by the device to the first operating system, wherein the running status of the processing authority requested by the device on the second operating system includes: system status and functional status; the method also includes: the second operating system monitors the heartbeat command; when the duration of not monitoring the heartbeat command is greater than or equal to the target duration, it is determined that the first operating system is operating abnormally, and the second operating system restarts the first operating system.
[0118] Through the above steps, while the first operating system monitors the operation of the second operating system, the second operating system also monitors the operation of the first operating system, thereby avoiding the failure of monitoring the second operating system due to abnormal operation of the first operating system, and avoiding further causing the first server device to be completely unable to process device requests from the second server device.
[0119] Optionally, in the embodiments of the present application, Fig. 9 is a flow chart of a first operating system monitoring the running status of a second operating system according to an embodiment of the present application, such as Fig. 9 As shown, after Linux (i.e., the second operating system) and the real-time operating system (i.e., the first operating system) complete the handover of the IPMI command response right (i.e., the processing right of the device request), the real-time operating system will send a status query command (i.e., a heartbeat command) to Linux at regular intervals, and Linux will reply to the real-time operating system with the status of Linux (i.e., the system status) and the status of the IPMI process (i.e., the functional status of the processing right). When Linux does not reply or the IPMI process status is abnormal, the exception handling in the real-time operating system is triggered. The above monitoring process includes the following steps:
[0120] Step S901, the real-time operating system periodically sends a status query command to Linux, and after receiving the command, Linux sends the Linux system status and IPMI process status to the real-time operating system;
[0121] Step S902, if the real-time operating system receives a reply from Linux and the IPMI process status is normal, it will send a status query command again after sleeping for a period of time;
[0122] Step S903, if the real-time operating system does not receive a reply from Linux or the IPMI integration status is abnormal (when the IPMI status is abnormal, the Linux system will try to restart the IPMI process), and the number of retries is less than the set value, then the status query command is sent again after sleeping for a period of time;
[0123] Step S904: If the number of retries is greater than the set value and Linux still does not reply or the IPMI process status is still abnormal, it is considered that the Linux system is abnormal and cannot be recovered;
[0124] Step S905, when the Linux system is abnormal and cannot be recovered, the real-time operating system requests the IPMI command response right from Linux. If the request fails, it will retry. When the retry reaches a certain number of times and still fails, the real-time operating system will forcibly obtain the IPMI command response right and the control right of KCS / BT and restart the Linux system.
[0125] Optionally, in the embodiment of the present application, while the first operating system monitors the operation of the second operating system, the second operating system also monitors the operating status of the first operating system. Fig.10 is a flow chart of a second operating system monitoring the running state of a first operating system according to an embodiment of the present application, such as Fig.10 As shown, in Linux (i.e., the second operating system), the following steps are performed:
[0126] Step S1001, Linux monitors the heartbeat command sent by the real-time operating system (i.e., the first operating system);
[0127] Step S1002, if the command is received, sleep for a specified time and listen again;
[0128] Step S1003, if no heartbeat command is received, determine whether it has timed out, if not, wait for a specified time and listen for the heartbeat command again;
[0129] Step S1004: If the time has timed out, it is considered that the real-time operating system has a problem, and the real-time operating system is restarted.
[0130] 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 it can also be implemented 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, disk, CD), 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 of each embodiment of the present application.
[0131] In this embodiment, a startup device for a server device is also provided. A first operating system and a second operating system are deployed on a first server device. The response speed of the first operating system is greater than the response speed of the second operating system. The first server device and the second server device are connected via a target bus. The device is applied to the first server device. The device is used to implement the above-mentioned embodiments and preferred implementation modes. Those that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0132] Fig.11 is a structural block diagram of a startup device of a server device according to an embodiment of the present application, such as Fig.11 As shown, the device comprises:
[0133] The first operation module 1102 is used for, when the first server device is started and the first operating system is started, obtaining the control authority of the target bus by the first operating system, receiving the first device request initiated by the second server device, obtaining the processing authority of the device request by the first operating system to execute the first device request to obtain the first request result, and sending the first request result to the second server device by the first operating system using the control authority of the target bus;
[0134] The second operation module 1104 is used for, when the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain the second request result and transmit the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device;
[0135] The third operation module 1106 is used for, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
[0136] Through the above steps, when the first server device is started and the first operating system with a faster response speed is started, the first operating system can obtain the control authority of the target bus and can obtain the processing authority of the device request, so it can respond to the request of the second server device faster, avoiding the long waiting of the request of the second device; when the second operating system is started to the stage where communication can be carried out, the second operating system obtains the control authority of the target bus, and the communication process between the first server device and the second server device is handed over to the second operating system for execution, and the first operating system continues to use the processing authority of the device request, and gradually transfers the interaction process of the server device to the second operating system; when the first server device is started to the stage where the second operating system is allowed to execute the device request, the second operating system uses the control authority of the target bus and the processing authority of the device request, and finally makes the interaction process of the server device all completed by the second operating system. In summary, the interaction process of the server device not only makes the startup process of the second operating system not become an obstacle to the interaction between the second server device and the first server device, but also makes the interaction process of the server device take over when the second operating system has more operating capabilities to improve the efficiency of the interaction process. Therefore, the problem of low interaction efficiency between server devices can be solved, and the effect of improving the interaction efficiency between server devices can be achieved.
[0137] As an optional implementation, the first server device includes a baseboard management controller of the target server, the second server device includes a server host of the target server, and the target bus is a bus that allows the transmission of data that complies with the intelligent platform management interface protocol; the first operation module includes: a startup unit, which is used to start the first operating system and the second operating system on the baseboard management controller when the target server is started; a first receiving unit, which is used to obtain the control authority of the target bus by the first operating system when the first bus driver of the target bus has been loaded on the first operating system and the first application of the intelligent platform management interface protocol has been run, and receive the first device request initiated by the basic input and output system running on the server host through the first bus driver; a first execution unit, which is used to obtain the processing authority of the device request by the first operating system, and execute the first device request through the first application to obtain the first request result; a first sending unit, which is used to use the control authority of the target bus by the first operating system to send the first request result to the basic input and output system through the first bus driver.
[0138] As an optional implementation, the second operating module includes: a first determining unit, used to determine that the second operating system has been started to the stage allowing communication with the second server device when the second operating system has been started to the stage where the second bus driver of the target bus has been loaded; a second receiving unit, used to obtain control authority of the target bus by the second operating system, receive a second device request initiated by the basic input and output system through the second bus driver and transmit the second device request to the first operating system; a second executing unit, used to continue to use the processing authority of the device request by the first operating system, execute the second device request through the first application to obtain a second request result and transmit the second request result to the second operating system; a second sending unit, used to use the control authority of the target bus by the second operating system to send the second request result to the basic input and output system through the second bus driver.
[0139] As an optional implementation, the third operating module includes: a second determination unit, used to determine that the second operating system has been started to the stage allowing the execution of device requests when the second operating system has been started to the second application program that has run the intelligent platform management interface protocol; a third receiving unit, used to receive the third device request initiated by the basic input and output system through the second bus driver by the second operating system using the control authority of the target bus; a third execution unit, used to obtain the processing authority of the device request by the second operating system, and execute the third device request through the second application program to obtain the third request result; a third sending unit, used to send the third request result to the basic input and output system through the second bus driver by the second operating system using the control authority of the target bus.
[0140] As an optional implementation, the second operation module further includes: an acquisition unit, configured to obtain the control authority of the target bus from the first operating system by the second operating system; a first access unit, configured to access the target bus by the second operating system using the control authority of the target bus to obtain the second device request initiated by the second server device on the target bus;
[0141] The fourth sending unit is used for the second operating system to send the second device request to the first operating system; the fourth execution unit is used for the first operating system to continue to use the processing authority of the device request to execute the second device request to obtain a second request result of the second device request; the fifth sending unit is used for the first operating system to send the second request result to the second operating system; the second access unit is used for the second operating system to access the target bus using the control authority of the target bus to send the second request result to the second server device.
[0142] As an optional implementation manner, the fourth sending unit is further used to: write the second device request by the second operating system to the target storage space on the first server device, wherein the target storage space allows the first operating system to access and the second operating system to access; trigger a first interrupt to the first operating system by the second operating system; and read the second device request from the target storage space in response to the first interrupt by the first operating system;
[0143] As an optional implementation, the fifth sending unit is also used for: the first operating system writes the second request result into the target storage space; the first operating system triggers a second interrupt to the second operating system; and the second operating system responds to the second interrupt and reads the second request result from the target storage space.
[0144] As an optional implementation, the second operating module further includes: a first request unit, used by the second operating system to request the first operating system for control authority of the target bus; a third access unit, used by the second operating system to access the target bus to obtain a second device request initiated by the second server device through the target bus when the second operating system has requested control authority of the target bus; a transmission unit, used by the second operating system to transmit the second device request to the first operating system through the target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system.
[0145] As an optional implementation, the first request unit is also used for: the second operating system sending a first control request to the first operating system, wherein the first control request is used to request control authority of the target bus; the first operating system releasing control authority of the target bus in response to the first control request, and sending a first response message to the second operating system, wherein the first response message is used to indicate that the second operating system is allowed to obtain control authority of the target bus; the second operating system determining that control authority of the target bus has been requested in response to the first response message, or the second operating system determining that control authority of the target bus has been requested when detecting that the first response message is not received within a first time period after the first control request is issued.
[0146] As an optional implementation, the first request unit is also used to: write the first control request by the second operating system to the target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system; trigger the third interrupt by the second operating system to the first operating system; respond to the third interrupt by the first operating system to read the first control request from the target storage space; respond to the first control request by the first operating system to release the control authority of the target bus and write the first response information to the target storage space; trigger the fourth interrupt by the first operating system to the second operating system; respond to the fourth interrupt by the second operating system to read the first response information from the target storage space; and determine by the second operating system that the control authority of the target bus has been requested based on the first response information.
[0147] As an optional implementation, the third running module also includes: a second request unit, used by the second operating system to request the first operating system for processing permissions requested by the device; and a running unit, used by the second operating system to run the application requested by the device to execute the third device request and obtain a third request result when the second operating system has requested the processing permissions requested by the device.
[0148] As an optional implementation, the second request unit is also used for: the second operating system sending a second control request to the first operating system, wherein the second control request is used to request the processing permission requested by the device; the first operating system releasing the processing permission requested by the device in response to the second control request, and sending a second response message to the second operating system, wherein the second response message is used to indicate that the second operating system is allowed to obtain the processing permission requested by the device; the second operating system determining that the processing permission requested by the device has been requested in response to the second response message, or the second operating system determining that the processing permission requested by the device has been requested when detecting that the second response message is not received within a second time period after the second control request is issued.
[0149] As an optional implementation, the second request unit is also used to: write the second control request by the second operating system to the target storage space on the first server device, wherein the target storage space allows the first operating system to access it as well as the second operating system; trigger the fifth interrupt by the second operating system to the first operating system; respond to the fifth interrupt by the first operating system to read the second control request from the target storage space; respond to the second control request by the first operating system to release the processing authority requested by the device, and write second response information to the target storage space; trigger the sixth interrupt by the first operating system to the second operating system; respond to the sixth interrupt by the second operating system to read the second response information from the target storage space; and determine by the second operating system that the processing authority requested by the device has been requested based on the second response information.
[0150] As an optional implementation, a target memory area is divided in the memory of the first server device, a first interrupt service function, an interrupt receiving thread and a business module are deployed in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, and a business process is deployed in the application layer. The target memory area is set to allow access by both the interrupt receiving thread and the inter-core communication driver. The device also includes: a calling module, which is used to send the first data to the inter-core communication driver through a system call by the business process when the first data to be sent to the business module is generated in the business process; a first writing module, which is used to write the first data to the target memory area by the inter-core communication driver and send the first inter-core soft interrupt to the first operating system; a receiving module, which is used to trigger the first interrupt service function after receiving the first inter-core soft interrupt through the first operating system; a wake-up module, which is used to wake up the interrupt receiving thread by the first interrupt service function; a first reading module, which is used to read the first data from the target memory area by the interrupt receiving thread and send the first data to the business module.
[0151] As an optional implementation, a target memory area is divided in the memory of the first server device, an interrupt sending thread and a business module are run in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, a second interrupt service function is deployed in the inter-core communication driver, and a business process is deployed in the application layer. The target memory area is set to allow access by both the interrupt sending thread and the inter-core communication driver. The device also includes: a sending module, which is used to send the second data to the interrupt sending thread by the business module when the second data to be sent to the business process is generated in the business module; a second writing module, which is used to write the second data to the target memory area by the interrupt sending thread, and send a second inter-core soft interrupt to the inter-core communication driver; a triggering module, which is used to trigger the second interrupt service function by the inter-core communication driver; a second reading module, which is used to read the second data from the target memory area by the second interrupt service function, and send the second data to the business process through a system call.
[0152] As an optional implementation, the device also includes: a monitoring module, which is used by the first operating system to monitor the running status of the processing permission requested by the device on the second operating system; an acquisition module, which is used to obtain the control permission of the target bus and the processing permission requested by the device from the second operating system when the monitored running status indicates that the processing permission requested by the device on the second operating system is running abnormally; and a control module, which is used to control the second operating system to restart by the first operating system.
[0153] As an optional implementation, the monitoring module includes: a sixth sending unit, configured to send a heartbeat command from the first operating system to the second operating system, wherein the heartbeat command is used to instruct the second operating system to send the system state of the second operating system and the functional state of the processing permission requested by the device to the first operating system, wherein the running state of the processing permission requested by the device on the second operating system includes: the system state and the functional state;
[0154] As an optional implementation, the device also includes: a monitoring module, used by the second operating system to monitor heartbeat commands; a determination module, used to determine that the first operating system is operating abnormally when the duration of not monitoring the heartbeat command is greater than or equal to the target duration, and restart the first operating system by the second operating system.
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] An embodiment of the present application also provides 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.
[0163] 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.
[0164] 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.
[0165] 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 server device, characterized in that: A first operating system and a second operating system are deployed on a first server device, a response speed of the first operating system is greater than a response speed of the second operating system, the first server device is connected to the second server device via a target bus, the method is applied to the first server device, and the method includes: When the first server device is started and the first operating system is started, the first operating system obtains the control authority of the target bus, receives the first device request initiated by the second server device, obtains the processing authority of the device request, executes the first device request to obtain a first request result, and sends the first request result to the second server device using the control authority of the target bus; When the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain a second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device; When the second operating system is started to the stage where execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive a third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain a third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
2. The method according to claim 1, characterized in that The first server device includes a baseboard management controller of a target server, the second server device includes a server host of the target server, and the target bus is a bus that allows transmission of data that complies with an intelligent platform management interface protocol; The method comprises: when the first server device is started and the first operating system is started, the first operating system obtains the control authority of the target bus, receives the first device request initiated by the second server device, obtains the processing authority of the device request, executes the first device request to obtain the first request result, and sends the first request result to the second server device by the first operating system using the control authority of the target bus, including: When the target server is started, starting the first operating system and the second operating system on the baseboard management controller; When the first bus driver of the target bus has been loaded on the first operating system and the first application program of the intelligent platform management interface protocol has been run, the first operating system obtains the control authority of the target bus and receives the first device request initiated by the basic input and output system running on the server host through the first bus driver; The first operating system obtains the processing authority of the device request, and the first application executes the first device request to obtain a first request result; The first operating system uses the control authority of the target bus to send the first request result to the basic input and output system through the first bus driver.
3. The method according to claim 2, characterized in that When the second operating system is started to the stage where communication with the second server device is allowed, the second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain a second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: When the second operating system is started to the point where the second bus driver of the target bus has been loaded, determining that the second operating system has been started to the stage where communication with the second server device is allowed; The second operating system obtains the control authority of the target bus, receives the second device request initiated by the basic input and output system through the second bus driver, and transmits the second device request to the first operating system; The first operating system continues to use the processing authority of the device request, executes the second device request through the first application to obtain a second request result, and transmits the second request result to the second operating system; The second operating system uses the control authority of the target bus to send the second request result to the basic input and output system through the second bus driver.
4. The method according to claim 3, characterized in that When the second operating system is started to the stage where the execution of the device request is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device, including: In the case where the second operating system is started to the second application program that has run the intelligent platform management interface protocol, determining that the second operating system has been started to the stage that allows the execution of the device request; The second operating system uses the control authority of the target bus to receive the third device request initiated by the basic input and output system through the second bus driver; The second operating system obtains the processing authority of the device request, and executes the third device request through the second application to obtain a third request result; The second operating system uses the control authority of the target bus to send the third request result to the basic input and output system through the second bus driver.
5. The method according to claim 1, characterized in that The second operating system obtains the control authority of the target bus to receive the second device request initiated by the second server device and transmits the second device request to the first operating system, the first operating system continues to use the processing authority of the device request to execute the second device request to obtain a second request result and transmits the second request result to the second operating system, and the second operating system uses the control authority of the target bus to send the second request result to the second server device, including: The second operating system obtains the control authority of the target bus from the first operating system; The second operating system uses the control authority of the target bus to access the target bus, and obtains the second device request initiated by the second server device on the target bus; The second operating system sends the second device request to the first operating system; The first operating system continues to use the processing authority of the device request to execute the second device request, and obtains the second request result of the second device request; The first operating system sends the second request result to the second operating system; The second operating system uses the control authority of the target bus to access the target bus and sends the second request result to the second server device.
6. The method according to claim 5, characterized in that The sending of the second device request by the second operating system to the first operating system includes: the second operating system writes the second device request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access and the second operating system to access; the second operating system triggers a first interrupt to the first operating system; and the first operating system reads the second device request from the target storage space in response to the first interrupt; The sending of the second request result by the first operating system to the second operating system includes: the first operating system writing the second request result to the target storage space; the first operating system triggering a second interrupt to the second operating system; and the second operating system responding to the second interrupt and reading the second request result from the target storage space.
7. The method according to claim 1, characterized in that The second operating system obtaining the control authority of the target bus, receiving the second device request initiated by the second server device and transmitting the second device request to the first operating system includes: The second operating system requests the first operating system for control authority of the target bus; In a case where the second operating system has requested the control authority of the target bus, the second operating system accesses the target bus to obtain the second device request initiated by the second server device through the target bus; The second operating system transmits the second device request to the first operating system through a target storage space on the first server device, wherein the target storage space allows the first operating system to access and also allows the second operating system to access.
8. The method according to claim 7, characterized in that The requesting, by the second operating system, from the first operating system for control authority of the target bus includes: The second operating system sends a first control request to the first operating system, wherein the first control request is used to request control authority of the target bus; The first operating system releases the control authority of the target bus in response to the first control request, and sends a first response message to the second operating system, wherein the first response message is used to indicate that the second operating system is allowed to obtain the control authority of the target bus; The second operating system determines that control permission to the target bus has been requested in response to the first response information, or the second operating system determines that control permission to the target bus has been requested when it detects that the first response information is not received within a first time period after issuing the first control request.
9. The method according to claim 8, characterized in that The sending of the first control request by the second operating system to the first operating system includes: the second operating system writing the first control request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access and also allows the second operating system to access; and the second operating system triggering a third interrupt to the first operating system; The first operating system responding to the first control request to release the control authority of the target bus and sending the first response information to the second operating system includes: the first operating system responding to the third interrupt to read the first control request from the target storage space; the first operating system responding to the first control request to release the control authority of the target bus and writing the first response information to the target storage space; the first operating system triggering a fourth interrupt to the second operating system; The second operating system determines, in response to the first response information, that control authority to the target bus has been requested, including: the second operating system responds to the fourth interrupt and reads the first response information from the target storage space; and the second operating system determines, based on the first response information, that control authority to the target bus has been requested.
10. The method according to claim 1, characterized in that The second operating system obtaining the processing authority of the device request to execute the third device request to obtain the third request result includes: The second operating system requests the first operating system for the processing permission requested by the device; In the case that the second operating system has requested the processing authority of the device request, the second operating system runs the application program of the device request to execute the third device request and obtain the third request result.
11. The method according to claim 10, characterized in that The second operating system requests the first operating system for the processing permission requested by the device, including: The second operating system sends a second control request to the first operating system, wherein the second control request is used to request a processing permission requested by the device; The first operating system releases the processing permission requested by the device in response to the second control request, and sends a second response message to the second operating system, wherein the second response message is used to indicate that the second operating system is allowed to obtain the processing permission requested by the device; The second operating system determines that the processing permission requested by the device has been requested in response to the second response information, or the second operating system determines that the processing permission requested by the device has been requested when it detects that the second response information is not received within a second time period after the second control request is issued.
12. The method according to claim 11, characterized in that The sending of the second control request by the second operating system to the first operating system includes: the second operating system writing the second control request to a target storage space on the first server device, wherein the target storage space allows the first operating system to access and also allows the second operating system to access; and the second operating system triggering a fifth interrupt to the first operating system; The first operating system responding to the second control request to release the processing permission of the device request and sending the second response information to the second operating system includes: the first operating system responding to the fifth interrupt to read the second control request from the target storage space; the first operating system responding to the second control request to release the processing permission of the device request and writing the second response information to the target storage space; the first operating system triggering a sixth interrupt to the second operating system; The second operating system determines, in response to the second response information, that the processing permission requested by the device has been requested, including: the second operating system responds to the sixth interrupt and reads the second response information from the target storage space; the second operating system determines, based on the second response information, that the processing permission requested by the device has been requested.
13. The method according to claim 1, characterized in that A target memory area is divided in the memory of the first server device, a first interrupt service function, an interrupt receiving thread and a service module are deployed in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, and a service process is deployed in the application layer, the target memory area is set to allow access by both the interrupt receiving thread and the inter-core communication driver, and the method further includes: When first data to be sent to the business module is generated in the business process, the business process sends the first data to the inter-core communication driver through a system call; The inter-core communication driver writes the first data into the target memory area, and sends a first inter-core soft interrupt to the first operating system; The first operating system triggers the first interrupt service function after receiving the first inter-core soft interrupt; The interrupt receiving thread is awakened by the first interrupt service function; The interrupt receiving thread reads the first data from the target memory area and sends the first data to the service module.
14. The method according to claim 1, characterized in that A target memory area is divided in the memory of the first server device, an interrupt sending thread and a service module are run in the first operating system, a kernel layer and an application layer are divided in the second operating system, an inter-core communication driver is loaded in the kernel layer, a second interrupt service function is deployed in the inter-core communication driver, a service process is deployed in the application layer, the target memory area is set to allow access by both the interrupt sending thread and the inter-core communication driver, and the method further includes: When second data to be sent to the business process is generated in the business module, the business module sends the second data to the interrupt sending thread; The interrupt sending thread writes the second data into the target memory area, and sends a second inter-core soft interrupt to the inter-core communication driver; The second interrupt service function is triggered by the inter-core communication driver; The second interrupt service function reads the second data from the target memory area, and sends the second data to the business process through a system call.
15. The method according to claim 1, characterized in that After the second operating system receives the third device request initiated by the second server device using the control authority of the target bus, the method further includes: The first operating system monitors the running status of the processing permission requested by the device on the second operating system; When the monitored operation status indicates that the processing authority requested by the device on the second operating system is operating abnormally, obtaining the control authority of the target bus and the processing authority requested by the device from the second operating system; The first operating system controls the second operating system to restart.
16. The method according to claim 15, characterized in that The monitoring, by the first operating system, of the running state of the processing permission requested by the device on the second operating system comprises: sending, by the first operating system, a heartbeat command to the second operating system, wherein the heartbeat command is used to instruct the second operating system to send the system state of the second operating system and the functional state of the processing permission requested by the device to the first operating system, wherein the running state of the processing permission requested by the device on the second operating system comprises: the system state and the functional state; The method further includes: the second operating system monitors the heartbeat command; if the duration of not monitoring the heartbeat command is greater than or equal to the target duration, determining that the first operating system is operating abnormally, and restarting the first operating system by the second operating system.
17. A startup device for a server device, characterized in that: A first operating system and a second operating system are deployed on a first server device, a response speed of the first operating system is greater than a response speed of the second operating system, the first server device is connected to the second server device via a target bus, the apparatus is applied to the first server device, and the apparatus includes: a first running module, configured to, when the first server device is started and the first operating system is started, obtain, by the first operating system, the control authority of the target bus, receive a first device request initiated by the second server device, obtain, by the first operating system the processing authority of the device request to execute the first device request to obtain a first request result, and send, by the first operating system, the first request result to the second server device using the control authority of the target bus; a second operation module, configured to, when the second operating system is started to a stage where communication with the second server device is allowed, cause the second operating system to obtain control authority of the target bus to receive a second device request initiated by the second server device and transmit the second device request to the first operating system, cause the first operating system to continue to use the processing authority of the device request to execute the second device request to obtain a second request result and transmit the second request result to the second operating system, and cause the second operating system to use the control authority of the target bus to send the second request result to the second server device; The third operation module is used for, when the second operating system is started to the stage where the execution of device requests is allowed, the second operating system uses the control authority of the target bus to receive the third device request initiated by the second server device, the second operating system obtains the processing authority of the device request to execute the third device request to obtain the third request result, and the second operating system uses the control authority of the target bus to send the third request result to the second server device.
18. 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 16 when executed by a processor.
19. 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 16 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 16 are implemented.
