WO2018119707A1 - 内核配置信息的管理方法、装置和电子设备 - Google Patents
内核配置信息的管理方法、装置和电子设备 Download PDFInfo
- Publication number
- WO2018119707A1 WO2018119707A1 PCT/CN2016/112484 CN2016112484W WO2018119707A1 WO 2018119707 A1 WO2018119707 A1 WO 2018119707A1 CN 2016112484 W CN2016112484 W CN 2016112484W WO 2018119707 A1 WO2018119707 A1 WO 2018119707A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- operating system
- kernel
- configuration information
- guest operating
- foreground
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3495—Performance evaluation by tracing or monitoring for systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/545—Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45591—Monitoring or debugging support
Definitions
- the present application relates to the field of virtualization technologies, and in particular, to a method, an apparatus, and an electronic device for managing kernel configuration information.
- the kernel configuration information is included in the kernel of each guest operating system, and the second kernel configuration information is included in the kernel of the main operating system.
- the kernel configuration information refers to that the kernel provides the user space through an operating system call or an input/output control interface to control configuration information of the device managed by the kernel or to configure configuration information of the function of the kernel.
- the functional modules of the guest operating system are divided into non-synchronous function modules and synchronous function modules.
- the operation of the asynchronous function module does not depend on the corresponding function module in the main operating system.
- the operation of the synchronous function module depends on the corresponding function module in the main operating system.
- the display function module of the guest operating system is a synchronous function module whose execution depends on the display function module of the main operating system.
- the functional modules of the main operating system are also divided into non-synchronous functional modules and synchronous functional modules.
- the asynchronous function module is not dependent on the corresponding function module in other guest operating systems, and the synchronization function module is dependent on the corresponding function module in other guest operating systems.
- the display function module of the main operating system is a synchronous function module that is relied upon by the display function module of the guest operating system.
- the non-synchronous function module in the guest operating system accesses the kernel configuration information in the guest operating system kernel through the corresponding service in the user space, and reads the information involved in the non-synchronous function module in the kernel configuration information in the guest operating system kernel. Take, modify, etc.
- the kernel configuration information in the kernel of the host operating system is accessed through the corresponding service in the user space, and the information involved in the synchronization function module in the kernel configuration information in the kernel of the main operating system is read and modified.
- the synchronization function module of the main operating system running in the foreground operates after the kernel configuration information in the kernel of the main operating system, the guest operating system is switched from the background to the foreground, and at this time, the kernel configuration information in the kernel of the main operating system is mainly operated.
- the modification of the synchronization function module in the system changes, but the kernel configuration information in the guest operating system kernel has not changed, so that the kernel configuration information in the guest operating system kernel is out of sync with the kernel configuration information in the main operating system kernel.
- the embodiment of the present application provides a method, a device, and an electronic device for managing kernel configuration information, which are mainly used to synchronize kernel configuration information of a client foreground operating system with kernel configuration information in a host operating system kernel.
- an embodiment of the present application provides a method for managing kernel configuration information, where the method includes:
- the kernel configuration information in the kernel of the guest operating system is synchronized to the kernel of the host operating system
- the kernel configuration information in the main operating system kernel is synchronized to the guest operating system when it is detected that the guest operating system is switched from the background to the foreground.
- the embodiment of the present application provides a management apparatus for kernel configuration information, where the apparatus includes:
- the first synchronization module is configured to synchronize the kernel configuration information in the kernel of the guest operating system to the kernel of the host operating system in the virtual device corresponding to the guest operating system when monitoring that the guest operating system is switched from the foreground to the background. ;
- the second synchronization module is configured to synchronize the kernel configuration information in the main operating system kernel to the guest operating system in the virtual device corresponding to the guest operating system when monitoring that the guest operating system is switched from the background to the foreground.
- an embodiment of the present application provides an electronic device, where the electronic device includes:
- a memory one or more processors; a memory coupled to the processor via a communication bus; a processor configured to execute instructions in the memory; and a storage medium storing instructions for performing the steps of the method of the first aspect described above.
- an embodiment of the present application provides a computer program product for use in conjunction with an electronic device, the computer program product comprising a computer program embedded in a computer readable storage medium, the computer program comprising The instructions of the various steps in the method of the first aspect.
- the kernel configuration information in the kernel of the guest operating system is synchronized to the kernel of the host operating system;
- the kernel configuration information in the kernel of the main operating system is synchronized to the guest operating system, and the kernel configuration information of the client foreground operating system is implemented. Synchronization of kernel configuration information in the operating system kernel.
- FIG. 1 is a schematic structural diagram of an embedded system according to an embodiment of the present application.
- FIG. 2 is a schematic flowchart of a method for managing kernel configuration information in an embodiment of the present application
- FIG. 3 is a schematic flowchart of another method for managing kernel configuration information in an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a device for managing kernel configuration information in an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
- the synchronization function module of the main operating system running in the foreground operates on the kernel configuration information in the kernel of the main operating system
- the guest operating system is switched from the background to the foreground, and at this time, the kernel in the kernel of the main operating system
- the configuration information changes due to the modification of the synchronization function module in the main operating system, but the kernel configuration information in the guest operating system kernel has not changed, so that the kernel configuration information in the guest operating system kernel and the kernel configuration information in the host operating system kernel are not changed.
- the present application provides a method for managing kernel configuration information.
- the kernel configuration in the kernel of the guest operating system is configured.
- the information is synchronized to the kernel of the main operating system; in the virtual machine corresponding to the guest operating system, when the guest operating system is detected to be switched from the background to the foreground, the kernel configuration information in the kernel of the main operating system is synchronized to the guest operating system. Synchronize the kernel configuration information of the client's foreground operating system with the kernel configuration information in the host operating system kernel.
- the method for managing kernel configuration information provided by the present application is used in a guest operating system in the embedded system shown in FIG. 1.
- the embedded system includes a host operating system and at least one guest operating system that is provided by the virtual machine and runs in the guest virtual machine. Kernel configuration information is included in the kernel of each guest operating system, and kernel configuration information is also included in the kernel of the main operating system. For convenience of description, the embodiment naming the kernel configuration information included in the kernel of the guest operating system as the first kernel configuration information, and naming the kernel configuration information included in the kernel of the main operating system as the second kernel configuration information.
- a system switching module is integrated in each operating system, and the system switching module records the operation As the current system state of the system, if the current system state changes from the background state to the foreground state, the synchronization function module of the operating system is triggered to report the event to the user space.
- the service corresponding to the synchronization function module in the user space updates the content of the first kernel configuration information of the guest operating system of the client by receiving the reported event.
- the synchronous function module For the synchronous function module, it consists of two parts, one is the front end of the synchronous function module in the guest operating system, and the other is the back end of the synchronous function module in the main operating system.
- the back end accesses or sets the second kernel configuration information through the synchronous function module interface provided by the main operating system.
- the backend program can normally operate the interface provided by the host operating system.
- the backend program does not allow access to the interface provided by the host operating system.
- the execution flow is as shown in FIG. 2 .
- the current system state in the system switching module included in the main operating system is set to the foreground state, and the callback function is registered in the system switching module included in the main operating system.
- the synchronization function module is relied on by the function module of any guest operating system.
- the display function module of the main operating system is a synchronization function module, which is relied on by the display function module of the guest operating system.
- the callback function should have the following functions: read the corresponding content of the synchronization function module in the kernel configuration information, and report the content to the user space of the main operating system in the form of an event.
- the primary operating system reads the second kernel configuration information and starts each service in its user space based on this information. Change the current system state in the system switch module included in the main operating system to the foreground state. At the same time, a callback function is registered in all the synchronization function modules of the main operating system in the system switching module included in the main operating system.
- the system switch included in any guest operating system After any guest operating system starts, the system switch included in any guest operating system
- the current system state in the module is changed to the background state, and the callback function is registered for the synchronization function module in any guest operating system in the system switching module included in any guest operating system.
- the synchronization function module depends on the function module in the main operating system.
- the display function module of the guest operating system is a synchronization function module, and its operation needs to depend on the display function module of the main operating system.
- the kernel configuration information in the kernel of the guest operating system is synchronized to the kernel of the host operating system.
- system switch module records the current system state of the operating system.
- the current system state in the system switch module included in the operating system is changed to the background state. Therefore, it is possible to monitor whether the guest operating system is switched from the foreground to the background according to the recorded content in the system switching module included in the guest operating system.
- the first kernel configuration information in the kernel of the guest operating system is synchronized to the second kernel configuration information in the kernel of the host operating system.
- the first kernel configuration information is made the same as the second kernel configuration information.
- the kernel configuration information in the kernel of the main operating system is synchronized to the guest operating system.
- the process of synchronizing the kernel configuration information in the kernel of the main operating system to the guest operating system can be implemented by the following two sub-steps.
- step 1 the guest operating system C acquires the second kernel configuration information.
- any operating system notifies the synchronization function through a callback function in the system switching module.
- the module obtains information related to the synchronization function module from the second kernel configuration information.
- Step 2 Synchronize the first kernel configuration information with the second kernel configuration information.
- the information related to the synchronization function module in the first kernel configuration information is synchronized with the information related to the synchronization function module in the second kernel configuration information by the service of the corresponding function module in the user space.
- the guest operating system C notifies the synchronization function module C of the client operating system C to obtain the information corresponding to the second kernel configuration through the callback function in the system switching module included therein.
- the synchronization function module C communicates with the back end in the main operating system through the front end, so that the back end reads the information related to the synchronization function module in the second kernel configuration information through the synchronization function module C interface provided by the main operating system.
- the system switching module 2 triggers the synchronization function module C to report the event to the user space.
- the corresponding service notifies the kernel configuration information change corresponding to the synchronization function module C, and synchronizes the information related to the synchronization function module in the first kernel configuration information with the information related to the synchronization function module in the second kernel configuration information to complete the kernel configuration information.
- the synchronization process notifies the kernel configuration information change corresponding to the synchronization function module C, and synchronizes the information related to the synchronization function module in the first kernel configuration information with the information related to the synchronization function module in the second kernel configuration information to complete the kernel configuration information.
- step 301 and step 302 After performing step 301 and step 302, in any operating system, when the operating system is detected to switch to the foreground, the kernel information in the system service is updated according to the kernel information in the kernel.
- any operating system can be a main operating system or a guest operating system.
- system services are used to provide kernel configuration information for applications.
- the kernel information in the system service is also synchronized with the second kernel configuration information of the guest operating system C.
- the application interface provided by the main operating system is operated only when it is detected that the guest operating system is running in the foreground.
- the application interface can be used to change the kernel information in the main operating system kernel.
- the kernel information in the host operating system kernel can be changed through the application interface.
- the kernel configuration information in the kernel of the guest operating system is synchronized to the kernel of the host operating system;
- the kernel configuration information in the kernel of the main operating system is synchronized to the guest operating system, and the kernel configuration information of the client foreground operating system is implemented. Synchronization of kernel configuration information in the operating system kernel.
- the present embodiment provides a management apparatus for kernel configuration information, and the management apparatus of the kernel configuration information solves the problem similarly to the method shown in FIG. 3, so that the implementation of the management apparatus of the kernel configuration information may be Referring to the implementation of the method shown in FIG. 3, the repetition will not be described again.
- the management device of the kernel configuration information includes:
- the first synchronization module 401 is configured to synchronize the kernel configuration information in the kernel of the guest operating system to the kernel of the host operating system in the virtual device corresponding to the guest operating system when monitoring that the guest operating system is switched from the foreground to the background. in;
- the second synchronization module 402 is configured to synchronize kernel configuration information in the main operating system kernel to the guest operating system in the virtual device corresponding to the guest operating system when monitoring that the guest operating system is switched from the background to the foreground.
- the device further includes:
- the update module is configured to update kernel information in the system service according to kernel information in the kernel when monitoring the operating system to switch to the foreground in any operating system; the system service is used to provide kernel configuration information for the application.
- the device further includes:
- the processing module is configured to operate, on the virtual machine corresponding to the guest operating system, the application program interface provided by the main operating system when the guest operating system is monitored in the foreground; wherein the application interface can be used to change the main operating system Kernel information in the kernel.
- the kernel configuration information in the kernel of the guest operating system is synchronized to the kernel of the host operating system;
- the kernel configuration information in the kernel of the main operating system is synchronized to the guest operating system, and the kernel configuration information of the client foreground operating system is implemented. Synchronization of kernel configuration information in the operating system kernel.
- the embodiment of the present application further provides an electronic device.
- the electronic device includes:
- a memory 501 one or more processors 502; the memory and the processor are coupled by a communication bus; the processor is configured to execute instructions in the memory; the storage medium storing the kernel configuration for performing any of the above Instructions for each step in the method of managing information.
- an embodiment of the present application further provides a computer program product for use in combination with an electronic device, the computer program product comprising a computer program embedded in a computer readable storage medium, the computer program comprising The electronic device is caused to execute the instructions of the respective steps in the management method of the kernel configuration information according to any one of the above.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
- the present application may employ computer-usable storage media (including but not included in one or more computer-usable program code(s). It is limited to the form of a computer program product implemented on a disk storage, a CD-ROM, an optical storage, or the like.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Hardware Redundancy (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
一种内核配置信息的管理方法、装置和电子设备,该方法在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中(301);在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统(302)。该方法监测到客户操作系统由前台切换到后台运行时,将客户操作系统内核中的内核配置信息同步到主操作系统的内核中;监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统,实现前台客户操作系统的内核配置信息与主操作系统的内核配置信息的同步。
Description
本申请涉及虚拟化技术领域,特别涉及一种内核配置信息的管理方法、装置和电子设备。
在包括一个主操作系统和至少一个客户操作系统的多操作系统中,每个客户操作系统的内核中包括内核配置信息,主操作系统的内核中包括第二内核配置信息。其中,内核配置信息,指内核通过操作系统调用或者输入输出控制接口提供给用户空间,以控制内核管理的设备的配置信息或者以控制内核的功能的配置信息。
客户操作系统的功能模块分为非同步功能模块和同步功能模块。非同步功能模块的运行不依赖于主操作系统中对应的功能模块,同步功能模块的运行依赖于主操作系统中对应的功能模块。例如,客户操作系统的显示功能模块为同步功能模块,其执行依赖于主操作系统的显示功能模块。
主操作系统的功能模块也分为非同步功能模块和同步功能模块。非同步功能模块不被其他客户操作系统中对应的功能模块所依赖,同步功能模块被其他客户操作系统中对应的功能模块所依赖。例如,主操作系统的显示功能模块为同步功能模块,其被客户操作系统的显示功能模块所依赖。
客户操作系统中的非同步功能模块会通过用户空间中的对应服务访问客户操作系统内核中的内核配置信息,对客户操作系统内核中的内核配置信息中该非同步功能模块所涉及的信息进行读取、修改等操作。同时,还会通过用户空间中的对应服务访问主操作系统内核中的内核配置信息,对主操作系统内核中的内核配置信息中该同步功能模块所涉及的信息进行读取、修改等操作。
若前台运行的主操作系统的同步功能模块在对主操作系统内核中的内核配置信息操作后,客户操作系统由后台切换到前台运行,此时,主操作系统内核中的内核配置信息由于主操作系统中同步功能模块的修改发生变化,但客户操作系统内核中的内核配置信息却未改变,使得客户操作系统内核中的内核配置信息与主操作系统内核中的内核配置信息不同步。
发明内容
本申请实施例提供了一种内核配置信息的管理方法、装置和电子设备,主要用以实现客户前台操作系统的内核配置信息与主操作系统内核中的内核配置信息的同步。
第一方面,本申请实施例提供了一种内核配置信息的管理方法,所述方法包括:
在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;
在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
第二方面,本申请实施例提供了一种内核配置信息的管理装置,所述装置包括:
第一同步模块,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;
第二同步模块,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
第三方面,本申请实施例提供了一种电子设备,电子设备包括:
存储器,一个或多个处理器;存储器与处理器通过通信总线相连;处理器被配置为执行存储器中的指令;存储介质中存储有用于执行上述第一方面所述方法中各个步骤的指令。
第四方面,本申请实施例提供了一种与电子设备结合使用的计算机程序产品,计算机程序产品包括内嵌于计算机可读的存储介质中的计算机程序,计算机程序包括用于使电子设备执行上述第一方面所述方法中的各个步骤的指令。
有益效果如下:
本申请实施例中在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统,实现客户前台操作系统的内核配置信息与主操作系统内核中的内核配置信息的同步。
下面将参照附图描述本申请的具体实施例,其中:
图1为本申请实施例中的一种嵌入式系统的结构示意图;
图2为本申请实施例中的一种内核配置信息的管理方法的流程示意图;
图3为本申请实施例中的另一种内核配置信息的管理方法的流程示意图;
图4为本申请实施例中的一种内核配置信息的管理装置的结构示意图;
图5为本申请实施例中的一种电子设备的结构示意图。
为了使本申请的技术方案及优点更加清楚明白,以下结合附图对本申请的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本申请的一部分实施例,而不是所有实施例的穷举。并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以互相结合。
现有技术中,若前台运行的主操作系统的同步功能模块在对主操作系统内核中的内核配置信息操作后,客户操作系统由后台切换到前台运行,此时,主操作系统内核中的内核配置信息由于主操作系统中同步功能模块的修改发生变化,但客户操作系统内核中的内核配置信息却未改变,使得客户操作系统内核中的内核配置信息与主操作系统内核中的内核配置信息不同步
基于此,本申请提供了一种内核配置信息的管理方法,在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统,实现客户前台操作系统的内核配置信息与主操作系统内核中的内核配置信息的同步。
本申请提供的一种内核配置信息的管理方法,用于图1所示的嵌入式系统中的客户操作系统中。嵌入式系统包括一个主操作系统和至少一个由虚拟器提供运行环境,且运行于客户虚拟机中的客户操作系统。每个客户操作系统的内核中包括内核配置信息,主操作系统的内核中也包括内核配置信息。为了便于说明,本实施例将客户操作系统的内核中包括的内核配置信息命名为第一内核配置信息,将主操作系统的内核中包括的内核配置信息命名为第二内核配置信息。
各操作系统中均集成一个系统切换模块,该系统切换模块记录所在操
作系统的当前系统状态,若当前系统状态从后台状态变为前台状态时,触发所在操作系统的同步功能模块上报事件给用户空间。用户空间中同步功能模块对应的服务通过接收上报的事件更新所在客户操作系统的第一内核配置信息的内容。
对于同步功能模块,其由两部分组成,一是该同步功能模块在客户操作系统中的前端,一是该同步功能模块在主操作系统中的后端。后端通过主操作系统提供的同步功能模块接口访问或设置第二内核配置信息。当客户操作系统在前台运行时,后端程序能够正常的操作主操作系统提供的接口。当客户操作系统在后台运行时,后端程序不允许操作主操作系统提供的接口。
本申请提供的内核配置信息的管理方法所在的嵌入式系统初始化时,执行流程如图2所示。
201,主操作系统启动后,将主操作系统包括的系统切换模块中的当前系统状态设置为前台状态,在主操作系统包括的系统切换模块中为主操作系统中同步功能模块注册回调函数。
其中,同步功能模块被任一客户操作系统的功能模块所依赖,例如主操作系统的显示功能模块为同步功能模块,其被客户操作系统的显示功能模块所依赖。
回调函数应具有以下功能:读取内核配置信息中同步功能模块的对应的内容,以事件的形式将该内容上报给主操作系统的用户空间。
例如,主操作系统读取第二内核配置信息,根据这些信息启动其用户空间中的各个服务。将主操作系统包括的系统切换模块中的当前系统状态更改为前台状态。同时,在主操作系统包括的系统切换模块中为主操作系统的所有同步功能模块注册回调函数。
202,任一客户操作系统启动后,将任一客户操作系统包括的系统切换
模块中的当前系统状态更改为后台状态,在任一客户操作系统包括的系统切换模块中为任一客户操作系统中同步功能模块注册回调函数。
其中,同步功能模块依赖于主操作系统中的功能模块,例如,客户操作系统的显示功能模块为同步功能模块,其运行需要依赖主操作系统的显示功能模块。
初始化后,本申请提供的内核配置信息的管理方法的执行流程如图3所示。
301,在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中。
由于系统切换模块记录所在操作系统的当前系统状态。操作系统由前台切换到后台运行时,操作系统包括的系统切换模块中的当前系统状态会更改为后台状态。因此可以根据客户操作系统包括的系统切换模块中的记录内容监测客户操作系统是否由前台切换到后台运行。
若监测到客户操作系统由前台切换到后台运行,即前台操作系统发生切换,此时,将客户操作系统的内核中的第一内核配置信息同步到主操作系统的内核中的第二内核配置信息中,使得第一内核配置信息与第二内核配置信息相同。
302,在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
以客户操作系统C由后台切换到前台运行为例,将主操作系统内核中的内核配置信息同步到客户操作系统的过程可以通过如下2个子步骤实现。
步骤1,客户操作系统C获取第二内核配置信息。
具体的,任一操作系统通过系统切换模块中的回调函数通知同步功能
模块从第二内核配置信息中获取同步功能模块涉及的信息。
步骤2,将第一内核配置信息与第二内核配置信息同步。
具体的,通过对应的功能模块在用户空间中的服务,将第一内核配置信息中同步功能模块涉及的信息与第二内核配置信息中同步功能模块涉及的信息同步。
例如,客户操作系统C通过其包括的系统切换模块中的回调函数通知客户操作系统C的同步功能模块C获取第二内核配置对应的信息。同步功能模块C通过前端与主操作系统中的后端通信,使后端通过主操作系统提供的同步功能模块C接口读取第二内核配置信息中同步功能模块涉及的信息。当第二内核配置信息中同步功能模块涉及的信息与客户操作系统C中第一内核配置信息中同步功能模块涉及的信息不同时,通过系统切换模块2触发同步功能模块C上报事件给用户空间中的对应服务,通知同步功能模块C对应的内核配置信息变化,将将第一内核配置信息中同步功能模块涉及的信息与第二内核配置信息中同步功能模块涉及的信息同步,完成内核配置信息的同步过程。
执行步骤301和步骤302后,在任一操作系统中,在监测到该操作系统切换到前台运行时,还会根据内核中的内核信息更新系统服务中的内核信息。
其中,任一操作系统可以为主操作系统,也可以为客户操作系统。
另外,系统服务用于为应用提供内核配置信息。
例如,在客户操作系统C将主操作系统内核中的内核配置信息同步到客户操作系统C后,还会将系统服务中的内核信息与客户操作系统C的第二内核配置信息进行同步。
另外,若在客户操作系统对应的虚拟器中,仅在监测到客户操作系统处于前台运行时,对主操作系统提供的应用程序接口进行操作。
其中,应用程序接口可用于更改主操作系统内核中的内核信息。
例如,客户操作系统C中应用程序运行时,可以通过应用程序接口更改主操作系统内核中的内核信息。
本申请实施例中在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统,实现客户前台操作系统的内核配置信息与主操作系统内核中的内核配置信息的同步。
基于同一发明构思,本实施例提供了一种内核配置信息的管理装置,该内核配置信息的管理装置解决问题的原理与图3所示的方法相似,因此该内核配置信息的管理装置的实施可以参见图3所示的方法的实施,重复之处不再赘述。
参见图4,该内核配置信息的管理装置包括:
第一同步模块401,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;
第二同步模块402,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
可选地,该装置还包括:
更新模块,用于在任一操作系统中,在监测到该操作系统切换到前台运行时,根据内核中的内核信息更新系统服务中的内核信息;系统服务用于为应用提供内核配置信息。
可选地,该装置还包括:
处理模块,用于在客户操作系统对应的虚拟器中,仅在监测到客户操作系统处于前台运行时,对主操作系统提供的应用程序接口进行操作;其中,应用程序接口可用于更改主操作系统内核中的内核信息。
有益效果:
本申请实施例中在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统,实现客户前台操作系统的内核配置信息与主操作系统内核中的内核配置信息的同步。
再一方面,本申请实施例还提供了一种电子设备,参见图5,电子设备包括:
存储器501,一个或多个处理器502;存储器与处理器通过通信总线相连;处理器被配置为执行存储器中的指令;所述存储介质中存储有用于执行上述的任一项所述的内核配置信息的管理方法中各个步骤的指令。
再一方面,本申请实施例还提供了一种与电子设备结合使用的计算机程序产品,所述计算机程序产品包括内嵌于计算机可读的存储介质中的计算机程序,所述计算机程序包括用于使所述电子设备执行上述的任一项所述的内核配置信息的管理方法中各个步骤的指令。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不
限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
Claims (8)
- 一种内核配置信息的管理方法,其特征在于,所述方法包括:在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:在任一操作系统中,在监测到该操作系统切换到前台运行时,根据内核中的内核信息更新系统服务中的内核信息;所述系统服务用于为应用提供内核配置信息。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:在客户操作系统对应的虚拟器中,仅在监测到客户操作系统处于前台运行时,对主操作系统提供的应用程序接口进行操作;其中,应用程序接口可用于更改主操作系统内核中的内核信息。
- 一种内核配置信息的管理装置,其特征在于,所述装置包括:第一同步模块,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由前台切换到后台运行时,将客户操作系统的内核中的内核配置信息同步到主操作系统的内核中;第二同步模块,用于在客户操作系统对应的虚拟器中,在监测到客户操作系统由后台切换到前台运行时,将主操作系统内核中的内核配置信息同步到客户操作系统。
- 根据权利要求4所述的装置,其特征在于,所述装置还包括:更新模块,用于在任一操作系统中,在监测到该操作系统切换到前台运行时,根据内核中的内核信息更新系统服务中的内核信息;所述系统服 务用于为应用提供内核配置信息。
- 根据权利要求4所述的装置,其特征在于,所述装置还包括:处理模块,用于在客户操作系统对应的虚拟器中,仅在监测到客户操作系统处于前台运行时,对主操作系统提供的应用程序接口进行操作;其中,应用程序接口可用于更改主操作系统内核中的内核信息。
- 一种电子设备,其特征在于,电子设备包括:存储器,一个或多个处理器;存储器与处理器通过通信总线相连;处理器被配置为执行存储器中的指令;存储介质中存储有用于执行权利要求1至3任一项方法中各个步骤的指令。
- 一种与电子设备结合使用的计算机程序产品,计算机程序产品包括内嵌于计算机可读的存储介质中的计算机程序,计算机程序包括用于使电子设备执行权利要求1至3中任一方法中的各个步骤的指令。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201680002962.8A CN106796531A (zh) | 2016-12-27 | 2016-12-27 | 内核配置信息的管理方法、装置和电子设备 |
PCT/CN2016/112484 WO2018119707A1 (zh) | 2016-12-27 | 2016-12-27 | 内核配置信息的管理方法、装置和电子设备 |
US16/427,332 US11200099B2 (en) | 2016-12-27 | 2019-05-30 | Kernel configuration information management method and device, and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/112484 WO2018119707A1 (zh) | 2016-12-27 | 2016-12-27 | 内核配置信息的管理方法、装置和电子设备 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/427,332 Continuation US11200099B2 (en) | 2016-12-27 | 2019-05-30 | Kernel configuration information management method and device, and electronic apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018119707A1 true WO2018119707A1 (zh) | 2018-07-05 |
Family
ID=58952273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/112484 WO2018119707A1 (zh) | 2016-12-27 | 2016-12-27 | 内核配置信息的管理方法、装置和电子设备 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11200099B2 (zh) |
CN (1) | CN106796531A (zh) |
WO (1) | WO2018119707A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019119315A1 (zh) * | 2017-12-20 | 2019-06-27 | 深圳前海达闼云端智能科技有限公司 | 基于多操作系统的输入处理方法、装置及电子设备 |
CN111813595A (zh) * | 2020-05-20 | 2020-10-23 | 北京元心科技有限公司 | 操作系统修复方法、系统及相应设备、存储介质 |
CN113094111B (zh) * | 2021-04-16 | 2024-01-09 | 三星(中国)半导体有限公司 | 设备以及设备的启动方法 |
CN112860267B (zh) * | 2021-04-23 | 2021-07-30 | 武汉深之度科技有限公司 | 一种内核裁剪方法及计算设备 |
CN114879987A (zh) * | 2022-04-12 | 2022-08-09 | 统信软件技术有限公司 | 一种内核升级和使用方法、计算设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477510A (zh) * | 2008-01-02 | 2009-07-08 | 联想(北京)有限公司 | 在多操作系统中共享显示卡的方法和计算机系统 |
CN101996090A (zh) * | 2009-08-28 | 2011-03-30 | 联想(北京)有限公司 | 一种计算机及虚拟机下重置设备的方法 |
US20140325202A1 (en) * | 2010-03-25 | 2014-10-30 | Microsoft Corporation | Intelligent boot device selection and recovery |
WO2016134601A1 (en) * | 2015-02-24 | 2016-09-01 | Huawei Technologies Co., Ltd. | Multi-operating system device, notification device and methods thereof |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI393114B (zh) * | 2007-09-05 | 2013-04-11 | Htc Corp | 在作業系統切換時逐步調整螢幕亮度的方法 |
US8694821B2 (en) * | 2010-12-03 | 2014-04-08 | International Business Machines Corporation | Generation of standby images of applications |
CN105183558B (zh) * | 2015-08-26 | 2018-11-16 | 北京元心科技有限公司 | 智能终端及其容器系统的管理方法 |
CN106095593B (zh) * | 2016-05-31 | 2019-04-16 | Oppo广东移动通信有限公司 | 一种前、后景应用程序行为同步方法及装置 |
CN107807843B (zh) * | 2017-10-26 | 2019-05-24 | 北京百度网讯科技有限公司 | 虚拟机中的i/o请求处理方法、设备及计算机可读介质 |
-
2016
- 2016-12-27 WO PCT/CN2016/112484 patent/WO2018119707A1/zh active Application Filing
- 2016-12-27 CN CN201680002962.8A patent/CN106796531A/zh active Pending
-
2019
- 2019-05-30 US US16/427,332 patent/US11200099B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477510A (zh) * | 2008-01-02 | 2009-07-08 | 联想(北京)有限公司 | 在多操作系统中共享显示卡的方法和计算机系统 |
CN101996090A (zh) * | 2009-08-28 | 2011-03-30 | 联想(北京)有限公司 | 一种计算机及虚拟机下重置设备的方法 |
US20140325202A1 (en) * | 2010-03-25 | 2014-10-30 | Microsoft Corporation | Intelligent boot device selection and recovery |
WO2016134601A1 (en) * | 2015-02-24 | 2016-09-01 | Huawei Technologies Co., Ltd. | Multi-operating system device, notification device and methods thereof |
Also Published As
Publication number | Publication date |
---|---|
CN106796531A (zh) | 2017-05-31 |
US20190286496A1 (en) | 2019-09-19 |
US11200099B2 (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018119707A1 (zh) | 内核配置信息的管理方法、装置和电子设备 | |
US9727429B1 (en) | Method and system for immediate recovery of replicated virtual machines | |
US20200401434A1 (en) | Precision time protocol in a virtualized environment | |
RU2700188C2 (ru) | Представление вычислительной среды на множественных устройствах | |
TW201510742A (zh) | 分散式作業系統 | |
WO2016095495A1 (zh) | 一种voi系统和vdi系统的融合使用方法及系统 | |
US11860849B2 (en) | Watermark-based techniques for change-data-capture | |
US11354044B2 (en) | Identifying an availability of a system | |
WO2016106756A1 (zh) | 一种容灾方法、系统和装置 | |
AU2015316450A1 (en) | Method for updating data table of KeyValue database and apparatus for updating table data | |
CN110581885A (zh) | 确定设备同步方法、装置、设备及存储介质 | |
US20200089512A1 (en) | Method and Apparatus for Invoking Input Method, Server, and Terminal | |
CN115858101B (zh) | 容器资源视图隔离的方法、装置以及电子设备 | |
CN106131020B (zh) | 一种防火墙虚拟化的模块以及管理方法 | |
CN110247801A (zh) | 一种对集群宿主机的监控系统及方法 | |
CN113157046A (zh) | 一种服务器bmc时间管理方法、装置及系统 | |
CN106775846A (zh) | 用于物理服务器的在线迁移的方法及装置 | |
JP7512427B2 (ja) | クラウドワークフロー入出力のためのプロトコル特性をシグナリングする方法 | |
US10649793B2 (en) | Application synchronization method and device | |
US11748141B2 (en) | Providing virtual devices direct access to clock times in memory locations managed by a hypervisor | |
WO2014183686A1 (zh) | 一种智能终端及虚拟存储卡与真实存储卡同步的方法与装置 | |
JP2015014929A (ja) | マスタサーバ、情報同期方法、および、情報同期プログラム | |
US9026618B2 (en) | System and method for expanding PC-based software capabilities | |
CN106933586B (zh) | 一种实现系统管理控制器版本同步的系统及方法 | |
US20200396285A1 (en) | Cell phone synchronization server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16925775 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.10.2019) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16925775 Country of ref document: EP Kind code of ref document: A1 |