Mainboard management system, method, device, medium and computer program product
Managing multiple motherboards through a single controller enables the hot switching of functional devices between different motherboards, solving the problems of resource waste and business interruption, and improving the reliability and stability of the system.
Patent Information
- Application Number
- CN202510607093.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, each motherboard needs to be equipped with a separate controller that results in waste of resources, and a sudden disconnection of functional devices may lead to data loss or application crashes.
Multiple motherboards are managed by a single controller, and the device link switching instructions are used to realize the hot switching of functional devices between different motherboards, ensuring a smooth transition and avoiding resource waste and business interruptions.
It realizes seamless switching of functional devices between different motherboards, reduces the waste of resources on the controller management motherboard, and improves the reliability and stability of the host business.
Smart Images

Figure CN120469892A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a motherboard management system, method, device, medium and computer program product. Background Art
[0002] A BMC (Baseboard Management Controller) is an embedded controller independent of the operating system, used for motherboard hardware management and monitoring. In related technologies, each motherboard requires a corresponding controller to monitor its hardware status and provide functional devices for each motherboard. This means that a single controller corresponds to a single motherboard. However, a motherboard does not always need to use the functions provided by the controller, nor does the controller need to monitor the motherboard in real time. Managing a single motherboard with a single controller results in a waste of resources.
[0003] Therefore, how to reduce the resource waste of the controller managing the mainboard is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The present application provides a motherboard management system, method, device, medium and computer program product, which reduces resource waste in a controller managing a motherboard.
[0005] The present application provides a motherboard management system, comprising a controller and multiple motherboards, wherein the controller is connected to the multiple motherboards and functional devices respectively;
[0006] The controller is configured to: when the functional device is connected to the first mainboard, receive a device link switching instruction and send a device removal signal to the first mainboard; wherein the device link switching instruction is used to instruct the functional device to switch from being connected to the first mainboard to being connected to the second mainboard;
[0007] The first mainboard is configured to: upon receiving a device removal signal, control an application or service using a functional device running in a host of the first mainboard to stop;
[0008] The controller is further configured to: when the application or service controlled by the host running on the first mainboard and using the functional device stops, disconnect the functional device from the first mainboard, establish a connection between the functional device and the second mainboard, and send a device removal signal to the second mainboard;
[0009] The second mainboard is used for: when receiving the device moving-in signal, resuming the application or service using the functional device running in the host of the second mainboard.
[0010] The present application also provides a motherboard management method, which is applied to a controller, wherein the controller is connected to multiple motherboards and functional devices respectively, and the method includes:
[0011] When the functional device is connected to the first mainboard, upon receiving a device link switching instruction, sending a device removal signal to the first mainboard so that a host running on the first mainboard controls an application or service using the functional device to stop; wherein the device link switching instruction is used to instruct the functional device to switch from being connected to the first mainboard to being connected to the second mainboard;
[0012] After the application or service using the functional device controlled by the host running on the first mainboard stops, disconnecting the functional device from the first mainboard and establishing a connection between the functional device and the second mainboard;
[0013] A device removal signal is sent to the second mainboard so that the host running on the second mainboard resumes using the application or service of the functional device.
[0014] The present application also provides a motherboard management method, which is applied to a motherboard in a motherboard management system, wherein a controller in the motherboard management system is respectively connected to multiple motherboards and functional devices, and the method includes:
[0015] When receiving a device removal signal sent by the controller, the application or service that controls the use of the functional device stops;
[0016] When the device move-in signal sent by the controller is received, the application or service that resumes using the functional device stops.
[0017] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned motherboard management methods when executing the computer program.
[0018] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned motherboard management methods are implemented.
[0019] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned motherboard management methods when executed by a processor.
[0020] The present application implements a single controller to manage multiple mainboards, reducing the waste of resources in managing mainboards by the controller. At the same time, the present application implements hot switching of functional devices between different mainboards through the collaborative work between the controller and multiple mainboards. When the controller receives the device switching instruction, it sends a device removal signal to the first mainboard. After the first mainboard receives the device removal signal, the host running on the first mainboard can promptly stop using the application or service of the functional device, avoiding data loss or application crash caused by the sudden disconnection of the functional device. The controller disconnects from the first mainboard and establishes a connection with the second mainboard only after confirming that the host running on the first mainboard has stopped using the functional device, and sends a device removal signal to the second mainboard, so that the host running on the second mainboard can resume related applications or services. This mechanism ensures a smooth transition of the device link switching process, avoids the impact of device link switching on the host business, and improves the reliability and stability of the host business.
[0021] The present application also discloses a motherboard management method, an electronic device, a computer-readable storage medium, and a computer program product, which can also achieve the above-mentioned technical effects.
[0022] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 is a structural diagram of a motherboard management system according to an exemplary embodiment;
[0025] Figure 2 1 is a routing state transition diagram according to an exemplary embodiment;
[0026] Figure 3 A structural diagram of a motherboard management system in an application embodiment provided by this application;
[0027] Figure 4 A timing diagram of a controller switching device link in an application embodiment provided by this application;
[0028] Figure 5 A timing diagram of removing a functional device in an application embodiment provided by this application;
[0029] Figure 6A timing diagram of a functional device moving in according to an application embodiment provided by this application;
[0030] Figure 7 A timing diagram of a motherboard application requesting to switch a device link in an application embodiment provided by this application;
[0031] Figure 8 This is a flow chart of a motherboard management method according to an exemplary embodiment;
[0032] Figure 9 is a flow chart showing another motherboard management method according to an exemplary embodiment;
[0033] Figure 10 The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0034] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0035] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0036] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0037] This embodiment provides a motherboard management system, including a controller 10 and multiple motherboards 20. The controller 10 is connected to the multiple motherboards 20 and functional devices 101 respectively.
[0038] The controller 10 is configured to: when the functional device 101 is connected to the first mainboard, receive a device link switching instruction and send a device removal signal to the first mainboard; wherein the device link switching instruction is used to instruct the functional device 101 to switch from being connected to the first mainboard to being connected to the second mainboard;
[0039] The first mainboard is configured to: upon receiving a device removal signal, control an application or service running in a host of the first mainboard that uses the functional device 101 to stop;
[0040] The controller 10 is further configured to: when the application or service using the functional device 101 controlled by the first mainboard stops, disconnect the functional device 101 from the first mainboard, establish a connection between the functional device 101 and the second mainboard, and send a device removal signal to the second mainboard;
[0041] The second mainboard is used for: when receiving the device removal signal, resuming the application or service using the functional device 101 running in the host of the second mainboard.
[0042] The controller 10 in this embodiment is a control device independent of the motherboard, and can be a BMC (Baseboard Management Controller). The controller 10 is used to monitor multiple hosts running on the motherboard and provide functional devices for multiple hosts, such as VGA (Video Graphic Array), USB (Universal Serial Bus), etc.
[0043] Initially, functional device 101 is connected to the first mainboard to support applications and services running on the host computer. When it's time to switch functional device 101 from the first mainboard to the second mainboard, controller 10 receives a device link switch command, which explicitly instructs functional device 101 to switch its connection target from the first mainboard to the second mainboard. Based on this command, controller 10 sends a device removal signal to the first mainboard, informing it to release functional device 101.
[0044] After receiving the device removal signal, the first motherboard performs a series of operations to ensure a smooth transition. Specifically, the host running on the first motherboard stops all applications and services within it that utilize functional device 101, preventing data loss or system instability caused by continued application operation during the device handover. After stopping applications and services, the controller 10 detects that the host running on the first motherboard has properly handled the release of functional device 101 and subsequently disconnects functional device 101 from the first motherboard.
[0045] After disconnecting from the first mainboard, the controller 10 immediately establishes a connection between the functional device 101 and the second mainboard to ensure that the functional device 101 can seamlessly switch to the new mainboard. After the connection is established, the controller 10 sends a device move-in signal to the second mainboard, notifying the second mainboard that the functional device 101 is ready and that the host running on the second mainboard can resume the use of related applications and services. After the second mainboard receives the device move-in signal, the host running on the second mainboard resumes the applications or services that were previously suspended due to the device switch, allowing the functional device 101 to normally provide services to the host running on the second mainboard, thereby realizing hot switching of the functional device 101 between different hosts and ensuring the continuity and stability of the host business.
[0046] The embodiment of the present application enables a single controller to manage multiple mainboards, reducing the waste of resources in managing mainboards by the controller. At the same time, the embodiment of the present application achieves hot switching of functional devices between different mainboards through the collaborative work between the controller and multiple mainboards. When the controller receives the device switching instruction, it sends a device removal signal to the first mainboard. After the first mainboard receives the device removal signal, the host running on the first mainboard can promptly stop using the application or service of the functional device, avoiding data loss or application crash caused by the sudden disconnection of the functional device. The controller disconnects from the first mainboard and establishes a connection with the second mainboard only after confirming that the host running on the first mainboard has stopped using the functional device, and sends a device removal signal to the second mainboard, so that the host running on the second mainboard can resume related applications or services. This mechanism ensures a smooth transition of the device link switching process, avoids the impact of device link switching on the host business, and improves the reliability and stability of the host business.
[0047] Based on the above embodiments, as a feasible implementation method, the controller is connected to multiple multiplexers, each multiplexer is connected to multiple mainboards and corresponding types of functional devices, and the multiplexers are used to control the corresponding types of functional devices to establish or disconnect with the mainboard.
[0048] In practice, the controller manages the connections between functional devices and the mainboard via a multiplexer. This design allows the controller to flexibly switch links between functional devices and different mainboards. Specifically, each type of functional device is equipped with a separate multiplexer controller to control the connection status between that functional device and each mainboard. When a functional device needs to be switched from one mainboard to another, the controller establishes and disconnects the link via the corresponding multiplexer controller.
[0049] like Figure 2As shown in the figure, using a controller managing three motherboards as an example, state 0 represents a disconnected link, and state 1 represents an established link. The state [0,0,0] represents [Motherboard 1 disconnected, Motherboard 2 disconnected, Motherboard 3 disconnected]. This state typically occurs after a device removal operation is complete and a device insertion operation is about to begin. The state [0,1,0] represents [Motherboard 1 disconnected, Motherboard 2 connected, Motherboard 3 disconnected]. This state indicates that Motherboard 2 has established a device link with the functional device. Multiplexer connection state switching follows the finite state principle, meaning that there are only a limited number of states (at most one motherboard can maintain a device link with the functional device) and a limited number of transition directions (the device link with the original motherboard must be disconnected before a device link with the new motherboard can be established).
[0050] This mechanism not only improves the flexibility of resource management, but also ensures that functional devices can only establish a connection with one motherboard at a time, thus avoiding potential conflicts and resource waste.
[0051] Based on the above embodiment, as a feasible implementation method, the controller includes a management module, a monitoring and switching module, and a routing control module; the management module is used to: receive a device link switching instruction and send the device link switching instruction to the monitoring and switching module; the monitoring and switching module is used to: when receiving the device link switching instruction, send a device removal signal to the first mainboard, and when the application or service of the host control using the functional device running on the first mainboard stops, send a device link switching request to the routing control module; the routing control module is used to: when receiving the device link switching request, control the multiplexing controller to disconnect from the first mainboard and control the multiplexing controller to establish a connection with the second mainboard; the monitoring and switching module is also used to: after the multiplexing controller establishes a connection with the second mainboard, send a device move-in signal to the second mainboard.
[0052] In a specific implementation, the controller includes a management module, a monitoring and switching module, and a routing control module. This modular design enables the controller to efficiently process device link switching instructions and coordinate the connections between multiple mainboards and functional devices.
[0053] The management module is the controller's interface with the outside world, responsible for receiving external device link switching commands. These commands may be issued by a system administrator through an interface (such as a web interface). Upon receiving the command, the management module converts it into a format that can be processed internally and sends it to the monitoring and switching module to ensure correct execution.
[0054] The monitoring and switching module undertakes the key coordination task. When the monitoring and switching module receives the device link switching instruction forwarded by the management module, it first sends a device removal signal to the first mainboard currently connected to the functional device. The purpose of this signal is to notify the host running on the first mainboard to stop using the functional device. After the host running on the first mainboard completes the stop operation of the relevant application or service, the monitoring and switching module will send a device link switching request to the routing control module to trigger the actual switching process of the link. After the routing control module completes the link switching and successfully disconnects the functional device from the first mainboard and connects it to the second mainboard, the monitoring and switching module will send a device move-in signal to the second mainboard to inform the host running on the second mainboard that the functional device is ready and can be used.
[0055] The routing control module is responsible for link switching operations. Upon receiving a link switch request from the monitoring and switching module, the routing control module sends a command to the multiplexer controller, controlling the multiplexer's routing function to complete the link switch. Following the command, the multiplexer controller disconnects the functional device from the first mainboard and establishes a connection with the second. By precisely controlling the multiplexer, the routing control module ensures that all functional devices establish a link with only one mainboard at a time, avoiding potential conflicts and resource allocation errors.
[0056] This modular design allows the controller to clearly divide the responsibilities of different functional modules, making the device link switching process more efficient and orderly. The management module is responsible for receiving and forwarding commands, the monitoring and switching module coordinates operations between the mainboard and functional devices, and the routing control module focuses on the actual link switching. This division of labor and collaboration not only improves system reliability but also facilitates subsequent maintenance and upgrades.
[0057] As a preferred embodiment, the controller also includes a log recording module and an exception handling module; the log recording module is used to: record the operation log during the device link switching process, including any one or a combination of the time of receiving the device removal signal, the time of sending the device move-in signal, and the switching action of the multiplexer; the exception handling module is used to: when an abnormal situation is detected during the device link switching process, execute the exception handling strategy corresponding to the abnormal situation.
[0058] In specific implementations, the controller is not only responsible for managing the link switching between functional devices and servers, but also integrates logging and exception handling functions to enhance the reliability and maintainability of the system. The role of the logging module is to record in detail the key operations during the device link switching process, such as the reception time of the device removal signal and the transmission time of the device movement signal, as well as the specific actions of the multiplexer during the switching process. This log information is crucial for tracking operation history, analyzing system performance, and diagnosing problems. At the same time, when the exception handling module detects any abnormal situation during the link switching process, it will immediately execute the preset exception handling strategy, which may include error recovery, automatic retry, or notification to the administrator, to ensure that the system can quickly recover from the abnormality and guarantee the continuity and stability of the functional device switching. Through the collaborative work of these two modules, the system can more intelligently and automatically handle various situations that may arise during device link switching.
[0059] On the basis of the above embodiments, as a feasible implementation method, the operating system of the host running on the mainboard includes kernel state and user state, the kernel state includes a removal signal monitoring module and an input signal monitoring module, and the user state includes a device uninstallation module and a device detection module; the removal signal monitoring module is used to: monitor the device removal signal, and when the device removal signal is monitored, send the device removal signal to the device uninstallation module; the device uninstallation module is used to: when the device removal signal is received, control the application or service that uses the functional device to stop; the input signal monitoring module is used to: monitor the device input signal, and when the device input signal is monitored, send the device input signal to the device detection module; the device detection module is used to: when the device input signal is received, resume the application or service that uses the functional device.
[0060] In a specific implementation, the host's operating system is divided into kernel-mode modules and user-mode modules. This modular design enables the host to efficiently respond to device removal and insertion signals and coordinate the stopping and resuming of applications and services.
[0061] In the kernel state of the operating system, the removal signal monitoring module is responsible for monitoring the device removal signal in the signal link. When the device removal signal is received, the removal signal monitoring module forwards the signal to the device uninstallation module in the user state, triggering the application stop and device uninstallation operations. This process ensures that the current host can safely release the functional device before the device is switched, avoiding data loss or application abnormalities during the device switching process. The incoming signal monitoring module is responsible for monitoring the device incoming signal in the signal link. When the device incoming signal is received, the incoming signal monitoring module forwards the signal to the device detection module in the user state, triggering the device loading and application recovery operations. This process ensures that after the device switch is completed, the new host can quickly resume the use of the functional device to ensure business continuity.
[0062] In the operating system's user mode, the device uninstall module receives a request from the kernel-mode removal signal monitoring module and stops any applications or services using the functional device, preventing data loss or system instability caused by continued application operation during the device switch. The device detection module receives a request from the kernel-mode migration signal monitoring module and resumes any applications or services that were previously suspended due to device removal. This process ensures that after the device switch is complete, the new host can quickly resume use of the functional device.
[0063] This modular design of kernel and user modes allows the host to clearly divide responsibilities between modules, making the device switching process more efficient and orderly. The kernel mode module is responsible for monitoring signals and coordinating the operations of the user mode module, while the user mode module is responsible for specific operations such as stopping applications, uninstalling devices, loading devices, and resuming applications. This division of labor and collaboration not only improves system reliability but also facilitates subsequent maintenance and upgrades.
[0064] Based on the above embodiments, as a feasible implementation method, the device uninstallation module is specifically used to: when a device removal signal is received, stop or save the application or service using the functional device, remove the functional device from the maintenance and management device set, and uninstall the driver of the functional device; the device detection module is specifically used to: add the functional device to the maintenance and management device set, load the driver of the functional device, and resume the application or service using the functional device.
[0065] In specific implementation, the device uninstallation module is mainly responsible for ensuring that the current mainboard safely releases the functional device before the device is switched, and the device detection module is responsible for quickly restoring the use of the functional device after the device is switched.
[0066] When the device uninstall module receives the device removal signal, it will first stop or save the application or service that is currently using the functional device. This is to ensure that during the device switching process, these applications or services will not experience abnormalities or data loss due to the sudden removal of the device. For example, if an application is transmitting data through a functional device, the device uninstall module will suspend the data transmission operation of the application to ensure data integrity. Then, the functional device is removed from the system's maintenance and management device collection. This means that the system will no longer regard the functional device as a usable device, thereby preventing other applications or services from misoperating the device. Furthermore, the driver of the functional device is uninstalled. The driver is the bridge for communication between the operating system and the hardware device. Uninstalling the driver can ensure that the device will not be misoperated by the system during the switching process, and it also prepares for the reloading of the device on the new motherboard.
[0067] Upon receiving a device move-in signal, the device detection module first adds the functional device back to the system's maintenance and management device set. This means the system re-identifies the functional device and considers it available. It then loads the functional device driver based on the device type and specifications, ensuring the operating system can communicate with the functional device and enable it to function properly.
[0068] As can be seen, through the specific functional implementation of the device uninstallation module and the device detection module, the mainboard can safely and efficiently release and restore devices during functional device switching. The device uninstallation module ensures that the device is properly stopped and removed before switching, avoiding anomalies during the device switching process; the device detection module ensures that the device can be quickly restored after switching, ensuring business continuity. This mechanism not only improves system reliability but also optimizes device switching efficiency, ensuring efficient operation of the mainboard in a multi-device environment.
[0069] Based on the above embodiment, as a feasible implementation, the device uninstallation module is further configured to set the power state of the functional device to a low-power state after stopping or saving the application or service using the functional device. The device detection module is further configured to set the power state of the functional device to an active state after loading the driver of the functional device. The controller is specifically configured to disconnect the functional device from the first mainboard and establish a connection between the functional device and the second mainboard upon detecting that the power state of the functional device is in a low-power state.
[0070] In specific implementations, after the device uninstall module stops or saves the application or service using the functional device, it sets the functional device's power state to a low-power state. This low-power mode is an energy-saving state in which the device retains only essential functions to reduce energy consumption while ensuring that the device can quickly respond to wake-up signals. The controller detects the functional device's power state and, after confirming that the device has entered a low-power state, disconnects the functional device from the first motherboard and establishes a connection with the second motherboard. This process ensures that the device is not accidentally used during the switching process, avoiding potential conflicts and data loss.
[0071] After loading the functional device driver, the device detection module switches the functional device's power state to the working state. The working state is the device's normal operating mode, in which the device can perform all functions. The device detection module controls the device's power management module to restore full functionality, enabling normal operation. After the device power state switches to the working state, the device detection module resumes any applications or services that were suspended due to device removal. These applications or services can immediately begin using the functional device, ensuring business continuity.
[0072] This power state management mechanism enables the motherboard system to achieve low power consumption and rapid recovery during functional device switching. The device uninstallation module ensures that a device enters a low-power state after removal, reducing energy consumption and ensuring a safe device state. The device detection module switches the device back to working state after reinstallation, quickly restoring device functionality. The controller monitors the device's power state to ensure safety and reliability during the switching process. This mechanism not only improves system energy efficiency but also optimizes device switching efficiency, ensuring efficient motherboard operation in a multi-device environment.
[0073] Based on the above embodiment, as a preferred implementation mode, the kernel state also includes a link request module, and the user state also includes a device application module; the device application module is used to: before the application or service uses the functional device, determine whether the functional device is connected to its own motherboard, and if not, send a link request signal to the link request module; the link request module is used to: when receiving the link request signal, send the link request signal to the controller; the controller is used to: when receiving the link request signal, trigger the device link switching.
[0074] In specific implementations, a link request module was added to the motherboard's kernel state, and a device application module was added to the user state. The device application module's function is to check whether a functional device is already connected to the current motherboard before an application or service needs to use it. If the device application module detects that the functional device is not yet connected to the current motherboard, it sends a link request signal to the link request module. Upon receiving the link request signal, the link request module forwards it to the controller. Upon receiving the link request signal, the controller triggers the device link switching process, establishing a connection between the functional device and the current motherboard.
[0075] To implement this link switching mechanism, each motherboard establishes two non-device communication links with the controller. One link receives device insertion or removal signals from the controller, while the other is used by the motherboard to initiate link requests from the controller. These links can use common signaling links, such as GPIO or I2C. This design allows the motherboard to proactively request connections with functional devices when needed, improving system flexibility and efficiency.
[0076] It can be seen that in this embodiment, the host running in the mainboard can actively trigger link switching when a functional device needs to be used without waiting for external instructions, thereby improving the flexibility and response speed of the system.
[0077] Based on the above embodiments, as a feasible implementation method, the functional device includes any one or a combination of any several of a storage device, a network device, and a graphics processing device; the controller is also used to: generate instructions for adjusting the resource allocation strategy of the functional device according to the type and current connection status of the functional device; the main board also includes a resource management module for allocating and adjusting the resources of the functional device according to the instructions of the controller.
[0078] In practice, the controller generates instructions to adjust resource allocation strategies based on the device type and current connection status. This optimizes resource usage, improves system efficiency, and ensures that devices receive appropriate resources based on their actual workloads and performance requirements. Furthermore, the motherboard integrates a resource management module, which executes instructions issued by the controller and allocates and adjusts resources for each device. This module dynamically allocates resources such as CPU, memory, and I / O bandwidth to different devices to meet system requirements.
[0079] In this way, the system can achieve refined management of functional devices and improve resource utilization efficiency, while also providing system administrators with greater flexibility and control capabilities to adapt to changing workloads and business needs.
[0080] The following describes an application embodiment provided by this application: Figure 3 As shown, the controller includes a management module, a monitoring switching module and a routing control module. The main board includes kernel state and user state. The kernel state includes a removal signal monitoring module, an input signal monitoring module and a link request module. The user state includes a device uninstallation module, a device detection module and a device application module.
[0081] The timing diagram of the controller switching device link is as follows Figure 4As shown, the controller administrator initiates a switch request to the monitoring and switching module through the controller's management interface (e.g., a newly added menu or button) or through a newly added command. This request contains information about the original and new mainboards, instructing the controller to switch the functional device's connection from the original mainboard to the new one. Upon receiving the switch request, the monitoring and switching module initiates a device removal signal to the original mainboard. Upon receiving the device removal signal, the original mainboard begins the device removal process, including stopping or saving applications or services using the functional device, setting the functional device's power state to low power mode, and disabling all device functions. The controller monitors the functional device's power state in real time. When it detects that the device's power state has been set to low power mode, it confirms that the original mainboard has completed the removal of the functional device. After confirming that the original mainboard has removed the functional device from management, the controller sends a link switch request to the multiplexer connected to the functional device through the routing control module, disconnecting the functional device's link from the original mainboard and establishing a link with the new mainboard. Once the link between the functional device and the new mainboard is established, the monitoring and switching module initiates a device removal signal to the new mainboard. After receiving the device move-in signal, the new mainboard detects and loads the functional device, loads the device driver, and completes the device initialization operation, so that the new mainboard can normally use the functional device.
[0082] The timing diagram for removing functional devices is as follows: Figure 5 As shown, the kernel module wait queue of motherboard 1 listens for device removal signals from the controller. When the controller's monitoring and switching module receives a link request from the administrator or the motherboard, it sends a device removal signal to motherboard 1, triggering the kernel module wait queue. This signal can be implemented in interrupt mode, with the kernel module wait queue receiving and responding to interrupts, or in status signal mode, with the kernel module wait queue monitoring link status changes in real time. After receiving the device removal signal, the kernel module traverses all devices, locates the functional device to be removed, and passes the relevant information to the user-mode device uninstall module. The device uninstall module first stops or saves applications or services that use the functional device, such as the display manager (GDM) service that uses VGA devices in Linux systems, to prevent damage to these applications or services caused by the device removal. Next, the device uninstall module sets the device's power state to low power consumption, disabling most of its functions except for those required to wake up and initialize the device. Subsequently, the device uninstall module requests the operating system to remove the functional device from the maintenance and management device set. The operating system then removes the device driver from the system to prevent misuse. The controller side detects the power status of the device. When the user-state device uninstall module sets the power status of the device to low-power mode, the controller can determine that the user state no longer uses the device and can apply to the multiplexer to disconnect the link between the functional device and the mainboard 1 to complete the device removal operation.
[0083] The timing diagram of functional device migration is as follows Figure 6 As shown, the controller applies to the multiplexer to establish a device link between the functional device and the mainboard 2, and notifies the new mainboard to use the functional device. The kernel module of the new mainboard also listens for the device move-in signal by waiting in the queue. When the signal is received, the kernel module is awakened and starts to execute the move-in operation. The user-mode device detection module first detects the device bus, adds the newly added device to the device set, and establishes management for the moved-in functional device. Then, the functional device driver is loaded so that the new mainboard user can use the functional device. The device enters low-power mode before the device is removed, so before the new mainboard needs to use the functional device, the device power needs to be set so that all functions are running. When it is detected that the mainboard 2 has applications or services that were previously suspended due to the removal of the device, the device detection module needs to wake up and restore these applications so that they can continue to operate normally.
[0084] The timing diagram of the motherboard application requesting to switch the device link is as follows Figure 7 As shown, when the application or service of the mainboard needs to use a functional device and there is no link between the functional device and the mainboard. The mainboard initiates a link switching request to the controller through the link request module, so that the controller triggers the monitoring switching process and establishes a link between the functional device and the mainboard. After the request is issued, the mainboard application or service enters a waiting sleep state, and wakes up the sleeping service after the device is moved in. After receiving the request initiated by the link request module, the controller initiates a device removal request to the original mainboard and starts the device removal process. The controller detects the power status of the device in real time. When the power status of the device is set to low power mode, it indicates that the original mainboard has removed the management of the functional device. The controller disconnects the device link with the original mainboard through the routing control module and establishes a device link with the new mainboard. The new mainboard completes the device move-in operation, wakes up the waiting application, and uses the functional device normally.
[0085] An embodiment of the present application provides a motherboard management method, and the method is described in detail in conjunction with the execution process of the motherboard management method.
[0086] See also Figure 8 , according to an exemplary embodiment, a flowchart of a motherboard management method is shown, such as Figure 8 As shown, including:
[0087] S101: When a functional device is connected to a first mainboard, upon receiving a device link switching instruction, sending a device removal signal to the first mainboard so that a host running on the first mainboard controls an application or service using the functional device to stop; wherein the device link switching instruction is used to instruct the functional device to switch from being connected to the first mainboard to being connected to the second mainboard;
[0088] The executor of this embodiment is a controller, which provides functional devices for different mainboards at different times. In this embodiment, the controller is responsible for managing the connection between the functional device and the mainboard. When the functional device is currently connected to the first mainboard and the controller receives a device link switching instruction, the controller will send a device removal signal to the first mainboard. The purpose of this signal is to notify the host running on the first mainboard that it needs to stop all applications or services that are using the functional device. The device link switching instruction clearly states that the functional device needs to be disconnected from the first mainboard and reconnected to the second mainboard. This process ensures that the corresponding applications or services running on the host of the first mainboard can be properly handled before the functional device performs link switching, preventing data loss or service interruption.
[0089] S102: After the application or service using the functional device controlled by the host running on the first mainboard stops, disconnecting the functional device from the first mainboard and establishing a connection between the functional device and the second mainboard;
[0090] After the host running on the first motherboard successfully stops using the application or service on the functional device, the controller proceeds to disconnect the functional device from the first motherboard. This is achieved through the controller's internal routing control module, which manages the physical link between the functional device and the motherboard. After disconnecting from the first motherboard, the controller immediately reconnects the functional device to the second motherboard. This step is a critical step in the functional device link switchover process, ensuring a smooth transition from the old connection to the new one, preparing the functional device for use by the second motherboard.
[0091] As a feasible implementation method, after the application or service of the functional device controlled by the host running on the first mainboard stops, the power state of the functional device is set to a low power consumption state; accordingly, when the application or service of the functional device controlled by the host running on the first mainboard stops, the connection between the functional device and the first mainboard is disconnected, and a connection between the functional device and the second mainboard is established, including: when it is detected that the power state of the functional device is a low power consumption state, the connection between the functional device and the first mainboard is disconnected, and a connection between the functional device and the second mainboard is established.
[0092] In a specific implementation, when the host running on the first mainboard completes stopping the applications or services that use the functional device, it will not only stop these applications or services, but will also adjust the power state of the functional device to low power mode. This step is to reduce the energy consumption of the device during the switching process and ensure that the device consumes minimal power when inactive. The low power state usually means that the device only maintains the most basic operations so that it can be quickly awakened when needed. Once the functional device enters the low power state, the controller will detect this change and perform a link switching operation accordingly. Specifically, the controller will disconnect the functional device from the first mainboard and simultaneously establish a connection between the functional device and the second mainboard. This process ensures that the functional device can switch from the first mainboard to the second mainboard safely and efficiently, while minimizing the service interruption time that may be caused by device switching.
[0093] As a feasible implementation method, disconnecting the functional device from the first mainboard and establishing the connection between the functional device and the second mainboard includes: controlling the multiplexer to disconnect from the first mainboard and establish a connection with the second mainboard; wherein different types of functional devices are connected to different multiplexing controllers.
[0094] In a specific implementation, multiplexers are used to switch the connection of functional devices between different motherboards. When a functional device needs to be switched from one motherboard to a second, the controller instructs the corresponding multiplexer to disconnect from the first motherboard and establish a connection with the second. This control method allows for precise management of the connections between functional devices and motherboards, ensuring that a functional device is connected to only one motherboard at any given time. Furthermore, different types of functional devices can be connected to different multiplexing controllers, allowing for more efficient management and optimized resource usage.
[0095] S103: Sending a device removal signal to the second mainboard so that the host running on the second mainboard can resume using the application or service of the functional device.
[0096] In practice, after the functional device establishes a connection with the secondary mainboard, the controller sends a device-moved-in signal to the secondary mainboard. This signal notifies the host running on the secondary mainboard that the functional device is now ready for use. Upon receiving the device-moved-in signal, the host running on the secondary mainboard resumes all applications or services that were suspended due to the link switch, allowing them to resume using the functional device. This step ensures seamless integration of the functional device on the secondary mainboard and application continuity, minimizing service interruptions caused by device link switching and improving overall system reliability and user experience.
[0097] Based on the above embodiment, as a preferred implementation, it further includes: when the functional device is connected to the first mainboard, when a link request signal from the second mainboard is received, executing the step of sending a device removal signal to the first mainboard.
[0098] In a specific implementation, when the host running on the second mainboard needs to use a functional device and the controller receives its link request signal, the controller will send a device removal signal to the first mainboard. This step is to prepare to switch the functional device from the first mainboard to the second mainboard. In this way, the controller can respond to the needs of different mainboards more flexibly and optimize the use of functional devices. When the first mainboard receives the device removal signal, the host running on the first mainboard will stop using the application or service of the functional device and may set the functional device to a low power state. Subsequently, the controller will disconnect the functional device from the first mainboard and establish a connection with the second mainboard, so that the host running on the second mainboard can start using the functional device. This implementation method improves the flexibility and efficiency of the system and ensures that functional devices can be dynamically allocated according to the actual needs of the host.
[0099] The present application embodiment discloses a motherboard management method, specifically:
[0100] See also Figure 9 , according to an exemplary embodiment, a flowchart of another motherboard management method is shown, such as Figure 9 Shown, including:
[0101] S201: When a device removal signal sent by a controller is received, the application or service using the functional device is controlled to stop;
[0102] The execution subject of this embodiment is the mainboard. In a specific implementation, the mainboard responds to the device removal signal from the controller and controls all applications or services that are using the functional device to stop running.
[0103] As a feasible implementation method, controlling the stopping of applications or services using functional devices includes: stopping or saving applications or services using functional devices, removing functional devices from maintenance and management equipment, and uninstalling drivers of functional devices.
[0104] In a specific implementation, when the motherboard receives a device removal signal from the controller, the host running on the motherboard stops or saves all applications or services that are using the functional device to prevent data loss or service interruption. Next, the functional device is removed from the device set it maintains and manages, meaning the host no longer considers the device active. Finally, the driver for the functional device is uninstalled to ensure that no driver conflicts or system errors occur during the device removal process. Through these steps, the host is prepared for the physical removal of the functional device, while also ensuring system stability and data security.
[0105] S202: When a device moving-in signal sent by the controller is received, the application or service of the device that resumes use of the function is stopped.
[0106] In a specific implementation, the mainboard responds to the device move-in signal sent by the controller, and the host running on the mainboard resumes the use of the applications and services of the functional device.
[0107] As a feasible implementation method, resuming the use of the stopped application or service of the functional device includes: adding the functional device to the maintenance and management device set, loading the driver of the functional device, and resuming the use of the application or service of the functional device.
[0108] In practice, the host running on the motherboard adds the functional device to its managed device set, allowing the host to identify and manage the device. It then loads the functional device's driver and resumes any applications or services that were suspended when the device was removed, allowing them to continue using the functional device. This process ensures rapid integration of the functional device on the new host and application continuity, minimizing service interruption.
[0109] As a feasible implementation method, after stopping or saving the application or service using the functional device, it also includes: setting the power state of the functional device to a low power consumption state; correspondingly, after loading the driver of the functional device, it also includes: setting the power state of the functional device to a working state.
[0110] In a specific implementation, after stopping or saving the application or service using a functional device, the host running on the mainboard will set the functional device's power state to low-power mode to reduce energy consumption and prepare for the device's safe removal. Accordingly, after the new host loads the functional device's driver, it will set the device's power state back to working mode, allowing the device to operate normally and provide services. This power state management not only helps save energy but also ensures the security and reliability of the device during the handover process.
[0111] As a preferred embodiment, it also includes: before the application or service uses the functional device, determining whether the functional device is connected to its own mainboard; if not, sending a link request signal to the controller so that the mainboard can establish a connection between the functional module and its own mainboard.
[0112] Before attempting to use a functional device, the host checks whether the device has established a connection with its motherboard. If so, the application executes normally. If not, the motherboard proactively sends a link request signal to the controller, requesting a connection between the functional device and the motherboard. This mechanism enables the motherboard to dynamically request and establish connections based on actual needs, improving system flexibility and responsiveness.
[0113] An embodiment of the present application further provides an electronic device, Figure 10 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 10 As shown, the electronic equipment includes:
[0114] Communication interface 1, capable of exchanging information with other devices such as network devices;
[0115] The processor 2 is connected to the communication interface 1 to implement information exchange with other devices and is used to execute the motherboard management method provided by one or more of the above technical solutions when running a computer program. The computer program is stored in the memory 3.
[0116] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 10 Various buses are labeled as bus system 4.
[0117] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.
[0118] It is understood that the memory 3 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk or a magnetic tape. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.
[0119] The method disclosed in the above-mentioned embodiment of the present application can be applied to processor 2 or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above-mentioned method can be completed by the integrated logic circuit of the hardware in processor 2 or instructions in the form of software. The above-mentioned processor 2 can be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the above-mentioned method in combination with its hardware.
[0120] When the processor 2 executes the program, the corresponding processes in each method of the embodiment of the present application are implemented. For the sake of brevity, they are not repeated here.
[0121] 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-mentioned motherboard management method embodiments when running.
[0122] 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.
[0123] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by the processor 2, the steps in any of the above-mentioned motherboard management method embodiments are implemented.
[0124] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 2, it implements the steps in any of the above-mentioned motherboard management method embodiments.
[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0126] The above describes in detail the motherboard management system, method, device, equipment, medium, and product provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The description of the above embodiments is only intended to help understand the method and core concept of this application. It should be noted that, for those skilled in the art, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of this application.
Claims
1. A motherboard management system, characterized in that: It includes a controller and multiple mainboards, wherein the controller is connected to the multiple mainboards and functional devices respectively; The controller is configured to: when the functional device is connected to the first mainboard, receive a device link switching instruction and send a device removal signal to the first mainboard; wherein the device link switching instruction is used to instruct the functional device to switch from being connected to the first mainboard to being connected to the second mainboard; The first mainboard is configured to: when receiving the device removal signal, control an application or service using the functional device running in a host on the first mainboard to stop; The controller is further configured to: when the application or service controlled by the host running on the first mainboard and using the functional device stops, disconnect the functional device from the first mainboard, establish a connection between the functional device and the second mainboard, and send a device removal signal to the second mainboard; The second mainboard is configured to resume an application or service using the functional device running in a host on the second mainboard when the device move-in signal is received.
2. The motherboard management system according to claim 1, characterized in that: The controller is connected to a plurality of multiplexers, each of the multiplexers is respectively connected to a plurality of the main boards and functional devices of corresponding types, and the multiplexers are used to control the functional devices of corresponding types to establish or disconnect the connection with the main board.
3. The motherboard management system according to claim 2, characterized in that: The controller includes a management module, a monitoring and switching module and a routing control module; The management module is used to: receive a device link switching instruction and send the device link switching instruction to the monitoring switching module; The monitoring switching module is configured to: upon receiving the device link switching instruction, send a device removal signal to the first mainboard, and after the application or service controlled by the host running on the first mainboard that uses the functional device is stopped, send a device link switching request to the routing control module; The routing control module is configured to: upon receiving a link request from the switching device, control the multiplexing controller to disconnect from the first mainboard and control the multiplexing controller to establish a connection with the second mainboard; The monitoring switching module is further configured to: send a device move-in signal to the second mainboard after the multiplexing controller establishes a connection with the second mainboard.
4. The motherboard management system according to claim 2, characterized in that: The controller also includes a logging module and an exception handling module; The log recording module is used to: record the operation log during the device link switching process, including any one or a combination of the time when the device removal signal is received, the time when the device move-in signal is sent, and the switching action of the multiplexer; The exception handling module is used to: when an abnormal situation is detected during the device link switching process, execute the abnormality handling strategy corresponding to the abnormal situation.
5. The motherboard management system according to claim 1, characterized in that: The operating system of the host running on the mainboard includes a kernel state and a user state, the kernel state includes a removal signal monitoring module and an input signal monitoring module, and the user state includes a device uninstallation module and a device detection module; The removal signal monitoring module is used to: monitor the device removal signal, and when the device removal signal is monitored, send the device removal signal to the device uninstallation module; The device uninstallation module is configured to: when receiving the device removal signal, control the application or service using the functional device to stop; The incoming signal monitoring module is used to monitor the device incoming signal, and when the device incoming signal is monitored, send the device incoming signal to the device detection module; The device detection module is configured to resume using the application or service of the functional device when receiving the device removal signal.
6. The motherboard management system according to claim 5, characterized in that: The device uninstallation module is specifically configured to: when receiving the device removal signal, stop or save the application or service using the functional device, remove the functional device from the maintenance and management equipment, and uninstall the driver of the functional device; The device detection module is specifically used to: add the functional device to the maintenance and management device set, load the driver of the functional device, and restore the application or service that uses the functional device.
7. The motherboard management system according to claim 6, characterized in that: After stopping or saving the application or service using the functional device, the device uninstallation module is further configured to: set the power state of the functional device to a low power consumption state; After loading the driver of the functional device, the device detection module is further configured to set the power state of the functional device to a working state.
8. The motherboard management system according to claim 7, characterized in that: The controller is specifically configured to: when detecting that the power state of the functional device is a low power state, disconnect the functional device from the first mainboard and establish a connection between the functional device and the second mainboard.
9. The motherboard management system according to claim 5, characterized in that: The kernel state also includes a link request module, and the user state also includes a device application module; The device application module is used to: before the application or service uses the functional device, determine whether the functional device is connected to its own mainboard, and if not, send a link request signal to the link request module; The link request module is configured to: upon receiving the link request signal, send the link request signal to the controller; The controller is configured to trigger device link switching upon receiving the link request signal.
10. The motherboard management system according to claim 1, characterized in that: The functional device includes any one or a combination of storage devices, network devices, and graphics processing devices; The controller is further configured to: generate an instruction for adjusting a resource allocation strategy of the functional device according to the type and current connection status of the functional device; The mainboard further includes a resource management module for allocating and adjusting the resources of the functional devices according to instructions from the controller.
11. A motherboard management method, characterized in that: Applied to a controller, the controller being connected to a plurality of mainboards and functional devices respectively, the method comprising: When the functional device is connected to the first mainboard, upon receiving a device link switching instruction, a device removal signal is sent to the first mainboard so that a host running on the first mainboard controls an application or service using the functional device to stop; wherein the device link switching instruction is used to instruct the functional device to switch from being connected to the first mainboard to being connected to the second mainboard; After the application or service controlled by the host running on the first mainboard and using the functional device stops, disconnecting the functional device from the first mainboard and establishing a connection between the functional device and the second mainboard; A device removal signal is sent to the second mainboard so that the host running on the second mainboard resumes using the application or service of the functional device.
12. The motherboard management method according to claim 11, characterized in that: The disconnecting the functional device from the first mainboard and establishing a connection between the functional device and the second mainboard includes: The multiplexer is controlled to disconnect from the first mainboard and establish a connection with the second mainboard; wherein different types of functional devices are connected to different multiplexing controllers.
13. The motherboard management method according to claim 11, characterized in that: Also includes: In the case where the functional device is connected to the first mainboard, when a link request signal from the second mainboard is received, a step of sending a device removal signal to the first mainboard is performed.
14. A motherboard management method, characterized in that: A motherboard is applied to a motherboard management system, wherein a controller in the motherboard management system is respectively connected to a plurality of the motherboards and functional devices, and the method comprises: When receiving a device removal signal sent by the controller, controlling the application or service using the functional device to stop; When the device removal signal sent by the controller is received, the application or service that resumes using the functional device stops.
15. The motherboard management method according to claim 14, characterized in that: The controlling the application or service using the functional device to stop includes: Stop or save the application or service using the functional device, remove the functional device from the maintenance and management equipment set, and uninstall the driver of the functional device.
16. The motherboard management method according to claim 14, characterized in that: The resuming of the stopped application or service of the functional device includes: Add the functional device to the maintenance and management device set, load the driver of the functional device, and restore the application or service using the functional device.
17. The motherboard management method according to claim 14, characterized in that: Also includes: Before an application or service uses the functional device, determining whether the functional device is connected to its own motherboard; If not, a link request signal is sent to the controller so that the mainboard establishes a connection between the functional module and its own mainboard.
18. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the motherboard management method according to any one of claims 11 to 17 when executing the computer program.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed, implements the steps of the motherboard management method according to any one of claims 11 to 17.
20. A computer program product, characterized in that It comprises a computer program, which, when executed, implements the steps performed by the motherboard management method according to any one of claims 11 to 17.