[go: up one dir, main page]

CN104156270A - Method and system for single machine running multiple operating systems at the same time - Google Patents

Method and system for single machine running multiple operating systems at the same time Download PDF

Info

Publication number
CN104156270A
CN104156270A CN201410363942.6A CN201410363942A CN104156270A CN 104156270 A CN104156270 A CN 104156270A CN 201410363942 A CN201410363942 A CN 201410363942A CN 104156270 A CN104156270 A CN 104156270A
Authority
CN
China
Prior art keywords
operating system
disk
occupied
operating systems
certain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410363942.6A
Other languages
Chinese (zh)
Other versions
CN104156270B (en
Inventor
安凌靖
刘成平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410363942.6A priority Critical patent/CN104156270B/en
Publication of CN104156270A publication Critical patent/CN104156270A/en
Application granted granted Critical
Publication of CN104156270B publication Critical patent/CN104156270B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明公开了一种单机同时运行多操作系统的方法及系统,该方法包括:将多个操作系统中的每个系统对应安装在单机的一个或多个磁盘上,并为每个操作系统生成其所占磁盘的磁盘引导分区以及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;单机的服务器根据所述磁盘引导分区启动全部或选择启动某个操作系统所占的磁盘,以启动全部或选择启动某个操作系统。本发明充分利用服务器资源,在单台物理机下安装多操作系统,各个操作系统被独立引导启动或者被同时引导启动,各自运行互不干扰,提高了资源的利用率,且稳定性高,而且隶属于某个系统的硬件出现问题后,只影响一个操作系统,不会造成所有操作系统崩溃,提高了系统容错率和单机的工作性能。

The invention discloses a method and system for running multiple operating systems on a single machine at the same time. The method includes: correspondingly installing each system in the multiple operating systems on one or more disks of the single machine, and generating A list of disk boot partitions occupied by the disk and pointers to disk boot partitions occupied by other operating systems; a stand-alone server starts all or selects a disk occupied by a certain operating system according to the disk boot partition to start all Or choose to start an operating system. The present invention makes full use of server resources, installs multiple operating systems under a single physical machine, each operating system is independently booted or started simultaneously, each operation does not interfere with each other, improves the utilization rate of resources, and has high stability, and When the hardware belonging to a certain system has a problem, only one operating system is affected, and all operating systems will not crash, which improves the system fault tolerance and stand-alone work performance.

Description

一种单机同时运行多操作系统的方法及系统A method and system for simultaneously running multiple operating systems on a single computer

技术领域technical field

本发明涉及计算机领域,具体涉及一种单机同时运行多操作系统的方法及系统。The invention relates to the field of computers, in particular to a method and system for running multiple operating systems simultaneously on a single machine.

背景技术Background technique

随着计算机技术以及集成电路技术的飞速发展,高性能的服务器越来越成为经济社会发展的需要,也越来越普及。而在使用高性能服务器时,往往存在以下问题:(1)目前,一台单服务器上仅运行一个操作系统,对于高性能服务器的使用往往不会达到很好的资源利用率,造成资源浪费;(2)根据所需服务功能不同,往往需要各种不同操作系统,而采购多台服务器造成巨大的成本压力。当前为了提高资源利用率,往往是在服务器上运行多台虚拟机,每台虚拟机上相当于运行一个操作系统,但是虚拟机往往存在性能低、不稳定、硬件支持不佳等缺陷,尤其是如果虚拟机作为服务器使用时,如果所在物理机出现问题或者重启,则所有虚拟机将关闭,导致所有服务器关机,对工作造成很大不便。With the rapid development of computer technology and integrated circuit technology, high-performance servers have increasingly become the needs of economic and social development and are becoming more and more popular. When using high-performance servers, there are often the following problems: (1) At present, only one operating system is run on a single server, and the use of high-performance servers often does not achieve good resource utilization, resulting in waste of resources; (2) Depending on the required service functions, various operating systems are often required, and the purchase of multiple servers causes huge cost pressure. At present, in order to improve resource utilization, it is often to run multiple virtual machines on the server. Each virtual machine is equivalent to running an operating system. However, virtual machines often have defects such as low performance, instability, and poor hardware support. If a virtual machine is used as a server, if the physical machine has a problem or is restarted, all virtual machines will be shut down, causing all servers to shut down, which will cause great inconvenience to work.

发明内容Contents of the invention

本发明需要解决的技术问题是提供一种单机同时运行多操作系统的方法及系统,以提高服务器的资源利用率、稳定性和系统性能。The technical problem to be solved by the present invention is to provide a method and system for running multiple operating systems simultaneously on a single machine, so as to improve resource utilization, stability and system performance of the server.

为了解决上述技术问题,本发明提供了一种单机同时运行多操作系统方法,包括:In order to solve the above-mentioned technical problems, the present invention provides a method for running multiple operating systems simultaneously on a single machine, including:

将多个操作系统中的每个系统对应安装在单机的一个或多个磁盘上,并为每个操作系统生成其所占磁盘的磁盘引导分区以及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;Install each system of multiple operating systems on one or more disks of a single machine, and generate the disk boot partition of the disk occupied by each operating system and the disk boot partition of the disk occupied by other operating systems list of pointers;

所述单机的服务器根据所述磁盘引导分区启动全部或选择启动某个操作系统所占的磁盘,以启动全部或选择启动某个操作系统。The stand-alone server starts all or selects to start the disk occupied by a certain operating system according to the boot partition of the disk, so as to start all or select to start a certain operating system.

进一步地,所述服务器根据所述磁盘引导分区选择启动某个操作系统所占的磁盘,以启动某个操作系统,包括:Further, the server selects to start a disk occupied by a certain operating system according to the disk boot partition, so as to start a certain operating system, including:

所述服务器运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,以启动所述某个操作系统。The server runs the boot loader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, so as to start the certain operating system.

进一步地,所述服务器根据所述磁盘引导分区启动全部操作系统所占的磁盘,以启动全部操作系统,包括:Further, the server starts the disk occupied by all operating systems according to the disk boot partition, so as to start all operating systems, including:

所述服务器启动全部磁盘,以启动全部操作系统;或者,The server boots all disks to boot all operating systems; or,

所述服务器运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,再根据所述某个操作系统的指针列表中记录的其他操作系统所占磁盘的磁盘引导分区,启动其他操作系统所占磁盘,以启动其他操作系统。The server runs the boot loader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and then according to the other operating systems recorded in the pointer list of the certain operating system The disk boot partition occupied by the disk, which is used to start the disk occupied by other operating systems to start other operating systems.

进一步地,在所述服务器启动全部或选择启动某个操作系统之后,所述方法还包括:Further, after the server starts all or selects to start a certain operating system, the method further includes:

将物理资源分配给各个启动的操作系统,各个启动的操作系统占用为其分配的物理资源各自独立运行。The physical resources are allocated to each started operating system, and each started operating system occupies the allocated physical resources to run independently.

进一步地,所述方法还包括:Further, the method also includes:

所述服务器的主板固件对正在运行的各个操作系统占用物理资源的情况进行监控,如果某一操作系统占用的物理资源大于预设的阈值,则将该某一操作系统的部分任务分给其他启动的操作系统,其他启动的操作系统将所述部分任务处理完成后,将处理结果返回给该某一操作系统。The motherboard firmware of the server monitors the physical resources occupied by each running operating system. If the physical resources occupied by a certain operating system are greater than a preset threshold, some tasks of the certain operating system are assigned to other startups. operating system, and other started operating systems return the processing result to the certain operating system after completing the processing of the part of the tasks.

为了解决上述技术问题,本发明还提供了一种单机同时运行多操作系统的系统,包括:In order to solve the above-mentioned technical problems, the present invention also provides a system for simultaneously running multiple operating systems on a single machine, including:

多操作系统安装模块,用于将多个操作系统中的每个系统对应安装在单机的一个或多个磁盘上,并为每个操作系统生成其所占磁盘的磁盘引导分区以及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;The multi-operating system installation module is used to install each system of multiple operating systems on one or more disks of a single machine, and generate the disk boot partition of the disk occupied by each operating system and point to other operating systems A list of pointers to the disk boot partitions that occupy the disk;

多操作系统启动引导模块,用于根据所述磁盘引导分区启动全部或选择启动某个操作系统所占的磁盘,以启动全部或选择启动某个操作系统。The multi-operating system booting module is used to start all or select to start the disk occupied by a certain operating system according to the boot partition of the disk, so as to start all or select to start a certain operating system.

进一步地,所述多操作系统启动引导模块,用于根据所述磁盘引导分区选择启动某个操作系统所占的磁盘,以启动某个操作系统,包括:Further, the multi-operating system booting module is configured to select a disk occupied by starting a certain operating system according to the disk boot partition to start a certain operating system, including:

运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,以启动所述某个操作系统。The boot loader running the disk boot partition of the disk occupied by the certain operating system starts the disk occupied by the certain operating system, so as to start the certain operating system.

进一步地,所述多操作系统启动引导模块,用于根据所述磁盘引导分区启动全部操作系统所占的磁盘,以启动全部操作系统,包括:Further, the multi-operating system booting module is configured to start the disks occupied by all operating systems according to the disk boot partition, so as to start all operating systems, including:

启动全部磁盘,以启动全部操作系统;或者,Boot all disks to start all operating systems; or,

运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,再根据所述某个操作系统的指针列表中记录的其他操作系统所占磁盘的磁盘引导分区,启动其他操作系统所占磁盘,以启动其他操作系统。Running the bootloader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and then according to the disks occupied by other operating systems recorded in the pointer list of the certain operating system The boot partition of the boot disk is used to start the disk occupied by other operating systems to start other operating systems.

进一步地,还包括:Further, it also includes:

物理资源分配模块,用于将物理资源分配给各个启动的操作系统,各个启动的操作系统占用为其分配的物理资源各自独立运行。The physical resource allocation module is configured to allocate physical resources to each activated operating system, and each activated operating system occupies the allocated physical resources to run independently.

进一步地,还包括:Further, it also includes:

主板固件,用于对正在运行的各个操作系统占用物理资源的情况进行监控,如果某一操作系统占用的物理资源大于预设的阈值,则将该某一操作系统的部分任务分给其他启动的操作系统;The motherboard firmware is used to monitor the physical resources occupied by each running operating system. If the physical resources occupied by a certain operating system are greater than the preset threshold, some tasks of the certain operating system will be assigned to other started operating system;

其他启动的操作系统,用于在接收到该某一操作系统的所述部分任务后,将所述部分任务处理完成后,将处理结果返回给该某一操作系统。The other activated operating systems are configured to return the processing result to the certain operating system after receiving the partial tasks from the certain operating system and completing the processing of the partial tasks.

与现有技术相比,本发明实施例提供的单机同时运行多操作系统的方法及系统,充分利用服务器资源,在单台物理机下安装多操作系统,各个操作系统可以被独立引导启动也可以被同时引导启动,各自运行互不干扰,提高了资源的利用率,且稳定性高,而且隶属于某个系统的硬件出现问题后,只影响一个操作系统,不会造成所有操作系统崩溃,所以提高了系统容错率,提高了单机的工作性能;Compared with the prior art, the method and system for running multiple operating systems on a single machine at the same time provided by the embodiments of the present invention make full use of server resources and install multiple operating systems on a single physical machine, and each operating system can be independently booted or started. It is booted and started at the same time, each running without interfering with each other, which improves the utilization rate of resources, and has high stability, and when the hardware belonging to a certain system has a problem, it only affects one operating system and will not cause all operating systems to crash, so Improve the system fault tolerance rate and improve the working performance of the stand-alone machine;

在本发明另一个实施例中,将CPU、内存、网卡等物理资源进行划分,分配给各个操作系统,使各操作系统可以独自占用,并行运行,进一步实现了高资源利用率、高稳定性、高性能的目的;In another embodiment of the present invention, physical resources such as CPU, memory, and network card are divided and allocated to each operating system, so that each operating system can be occupied independently and run in parallel, further realizing high resource utilization, high stability, the purpose of high performance;

同时,在本发明另一个实施例中,根据不同操作系统的性能压力,在某一操作系统繁忙时将部分任务分往其他操作系统协助处理,进一步提高了资源利用率和系统性能。At the same time, in another embodiment of the present invention, according to the performance pressure of different operating systems, when a certain operating system is busy, some tasks are allocated to other operating systems for assistance, which further improves resource utilization and system performance.

附图说明Description of drawings

图1是实施例中单机同时运行多操作系统的方法流程图;Fig. 1 is the flow chart of the method for running multiple operating systems simultaneously on a single machine in an embodiment;

图2是实施例中单机同时运行多操作系统的系统结构图;Fig. 2 is a system structural diagram of a single machine running multiple operating systems simultaneously in an embodiment;

图3是一个应用示例中单台服务器安装的操作系统的分布示意图)。Figure 3 is a schematic diagram of the distribution of operating systems installed on a single server in an application example).

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

实施例:Example:

如图1所示,本实施例提供了一种单机同时运行多操作系统方法,包括以下步骤:As shown in Figure 1, this embodiment provides a method for running multiple operating systems on a single machine at the same time, including the following steps:

S101:将多个操作系统中的每个系统对应安装在单机的一个或多个磁盘上,并为每个操作系统生成其所占磁盘的磁盘引导分区(Master Boot Record,简称MBR)以及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;S101: Install each of the multiple operating systems on one or more disks of a single machine, and generate a disk boot partition (Master Boot Record, MBR) for each operating system and point to other A list of pointers to the disk boot partitions of the disk occupied by the operating system;

单机就是指一台物理机,所述磁盘引导分区MBR是硬盘上的一块区域,其中包括有引导装载程序bootloader,运行引导装载程序便可以引导启动相应的磁盘。指针列表是独立在MBR之外的一块区域,它指向其他操作系统的MBR。A stand-alone machine refers to a physical machine. The disk boot partition MBR is an area on the hard disk, which includes a boot loader, and the corresponding disk can be booted by running the boot loader. The pointer list is an area independent of the MBR, which points to the MBR of other operating systems.

S102:所述单机的服务器根据所述磁盘引导分区启动全部或选择启动某个操作系统所占的磁盘,以启动全部或选择启动某个操作系统。S102: The stand-alone server starts all or selects to start a disk occupied by a certain operating system according to the boot partition of the disk, so as to start all or select to start a certain operating system.

其中,服务器根据用户在BIOS中的设置选择启动哪个磁盘,当启动该磁盘后就会启动占用该磁盘的操作系统了,服务器也可以启动单机所有的磁盘,这样就启动了安装在服务器上的全部操作系统。Among them, the server selects which disk to start according to the settings of the user in the BIOS. When the disk is started, the operating system that occupies the disk will be started. operating system.

其中,所述服务器根据所述磁盘引导分区选择启动某个操作系统所占的磁盘,以启动某个操作系统,包括:Wherein, the server selects to start a disk occupied by a certain operating system according to the disk boot partition, so as to start a certain operating system, including:

所述服务器运行据所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,以启动所述某个操作系统。The server starts the disk occupied by the certain operating system according to the boot loader of the disk boot partition of the disk occupied by the certain operating system, so as to start the certain operating system.

其中,所述服务器根据所述磁盘引导分区启动全部操作系统所占的磁盘,以启动全部操作系统,包括:Wherein, the server starts the disk occupied by all operating systems according to the disk boot partition, so as to start all operating systems, including:

所述服务器启动全部磁盘,以启动全部操作系统;或者,The server boots all disks to boot all operating systems; or,

所述服务器运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,再根据所述某个操作系统的指针列表中记录的其他操作系统所占磁盘的磁盘引导分区,启动其他操作系统所占磁盘,以启动其他操作系统。The server runs the boot loader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and then according to the other operating systems recorded in the pointer list of the certain operating system The disk boot partition occupied by the disk, which is used to start the disk occupied by other operating systems to start other operating systems.

在所述服务器启动全部或选择启动某个操作系统之后,所述方法还包括:After the server starts all or selects to start a certain operating system, the method further includes:

S103:将物理资源分配给各个启动的操作系统,各个启动的操作系统占用为其分配的物理资源各自独立地运行。S103: Allocate physical resources to each activated operating system, and each activated operating system occupies the allocated physical resources to run independently.

物理资源包括CPU、内存、网卡等等。物理资源是根据事先设置好的分配比例进行分配的,比如,安装有Windows和Linux两个操作系统,预先配置的比例是,Windows占用总物理资源的1/3,而Linux占用总物理资源的2/3。Physical resources include CPU, memory, network card, and so on. Physical resources are allocated according to the allocation ratio set in advance. For example, two operating systems, Windows and Linux, are installed. The pre-configured ratio is that Windows occupies 1/3 of the total physical resources, while Linux occupies 2% of the total physical resources. /3.

优选地,所述方法还包括:所述服务器的主板固件对正在运行的各个操作系统占用物理资源的情况进行监控,如果某一操作系统占用的物理资源大于预设的阈值,则将该某一操作系统的部分任务分给其他启动的操作系统,其他启动的操作系统将所述部分任务处理完成后,将处理结果返回给该某一操作系统。主板固件为运行在主板上的一个程序,由它提供这里所述的功能。Preferably, the method further includes: the motherboard firmware of the server monitors the physical resources occupied by each running operating system, and if the physical resources occupied by a certain operating system is greater than a preset threshold, the Some tasks of the operating system are distributed to other activated operating systems, and after the other activated operating systems complete the processing of the partial tasks, they return the processing result to the certain operating system. Motherboard firmware is the program running on the motherboard that provides the functions described herein.

本实施例根据不同操作系统的性能压力,在某一操作系统繁忙时将部分任务分往其他操作系统协助处理,进一步提高了资源利用率和系统性能。以占用CPU为例,当占用CPU90%以上,说明该操作系统繁忙,则可以将该操作系统的部分任务分给其他不繁忙的操作系统,例如,占用CPU50%以下的任意一个或者多个操作系统,也可以是其他操作系统中最闲的操作系统,即当前运行业务时占用物理资源最少的操作系统。In this embodiment, according to the performance pressure of different operating systems, when a certain operating system is busy, some tasks are allocated to other operating systems for assistance in processing, thereby further improving resource utilization and system performance. Taking the CPU as an example, when the CPU is occupied above 90%, it means that the operating system is busy, and some tasks of the operating system can be assigned to other operating systems that are not busy, for example, any one or more operating systems occupying less than 50% of the CPU , or it can be the most idle operating system among other operating systems, that is, the operating system that currently occupies the least physical resources when running services.

如图2所示,本实施例提供了一种单机同时运行多操作系统的系统,包括:As shown in Figure 2, this embodiment provides a system for running multiple operating systems on a single machine at the same time, including:

多操作系统安装模块,用于将多个操作系统中的每个系统对应安装在单机的一个或多个磁盘上,并为每个操作系统生成其所占磁盘的磁盘引导分区以及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;The multi-operating system installation module is used to install each system of multiple operating systems on one or more disks of a single machine, and generate the disk boot partition of the disk occupied by each operating system and point to other operating systems A list of pointers to the disk boot partitions that occupy the disk;

多操作系统启动引导模块,用于根据所述磁盘引导分区启动全部或选择启动某个操作系统所占的磁盘,以启动全部或选择启动某个操作系统。The multi-operating system booting module is used to start all or select to start the disk occupied by a certain operating system according to the boot partition of the disk, so as to start all or select to start a certain operating system.

其中,所述多操作系统启动引导模块,用于根据所述磁盘引导分区选择启动某个操作系统所占的磁盘,以启动某个操作系统,包括:Wherein, the multi-operating system booting module is used to select a disk occupied by starting a certain operating system according to the disk boot partition to start a certain operating system, including:

运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,以启动所述某个操作系统。The boot loader running the disk boot partition of the disk occupied by the certain operating system starts the disk occupied by the certain operating system, so as to start the certain operating system.

其中,所述多操作系统启动引导模块,用于根据所述磁盘引导分区启动全部操作系统所占的磁盘,以启动全部操作系统,包括:Wherein, the multi-operating system booting module is used to start the disk occupied by all operating systems according to the disk boot partition, so as to start all operating systems, including:

启动全部磁盘,以启动全部操作系统;或者,Boot all disks to start all operating systems; or,

运行所述某个操作系统所占磁盘的磁盘引导分区的引导装载程序启动所述某个操作系统所占的磁盘,再根据所述某个操作系统的指针列表中记录的其他操作系统所占磁盘的磁盘引导分区,启动其他操作系统所占磁盘,以启动其他操作系统。Running the bootloader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and then according to the disks occupied by other operating systems recorded in the pointer list of the certain operating system The boot partition of the boot disk is used to start the disk occupied by other operating systems to start other operating systems.

作为一种优选的方式,本实施例中的系统还包括:As a preferred manner, the system in this embodiment also includes:

物理资源分配模块,用于将物理资源分配给各个启动的操作系统,各个启动的操作系统占用为其分配的物理资源各自独立地运行。The physical resource allocation module is configured to allocate physical resources to each activated operating system, and each activated operating system occupies the allocated physical resources to run independently.

作为一种优选的方式,本实施例中的系统还包括:As a preferred manner, the system in this embodiment also includes:

主板固件,用于对正在运行的各个操作系统占用物理资源的情况进行监控,如果某一操作系统占用的物理资源大于预设的阈值,则将该某一操作系统的部分任务分给其他启动的操作系统;The motherboard firmware is used to monitor the physical resources occupied by each running operating system. If the physical resources occupied by a certain operating system are greater than the preset threshold, some tasks of the certain operating system will be assigned to other started operating system;

主板固件为运行在主板上的一个程序,由它提供这里所述的功能;Mainboard firmware is a program running on the mainboard that provides the functions described herein;

其他启动的操作系统,用于在接收到该某一操作系统的部分任务后,将所述部分任务处理完成后,将处理结果返回给该某一操作系统。The other activated operating systems are used to return the processing results to the certain operating system after receiving the partial tasks of the certain operating system and completing the processing of the partial tasks.

在一个应用示例中,以物理机具有4个磁盘A、B、C、D,安装Windows、Linux与Mac OS苹果操作系统这3个操作系统为例,本应用示例的服务器中,In an application example, take the physical machine with four disks A, B, C, and D as an example, and install the three operating systems of Windows, Linux, and Mac OS as an example. In the server of this application example,

多操作系统安装模块,用于在单机的不同磁盘上,独立安装上述操作系统,并为每个操作系统生成其所占磁盘的磁盘引导分区及指向其他操作系统所占磁盘的磁盘引导分区的指针列表;磁盘引导分区中包含有引导装载程序,以便多操作系统启动引导模块可以从任意磁盘启动,从而启动全部或选择要引导启动的操作系统。The multi-operating system installation module is used to independently install the above-mentioned operating systems on different disks of a single machine, and generate the disk boot partition of the disk occupied by each operating system and the pointer to the disk boot partition of the disk occupied by other operating systems list; the disk boot partition contains a boot loader, so that the multi-operating system boot module can start from any disk, so as to start all or select the operating system to be booted.

例如,在磁盘A、B上安装Windows操作系统,在磁盘C上安装Linux操作系统,在磁盘D上安装Mac OS苹果操作系统;图3给出了单台服务器安装的操作系统的分布示意图,为每个操作系统所占的磁盘生成磁盘引导分区MBR,指令列表指向其他两个操作系统所占磁盘的磁盘引导分区。指针列表是独立的一块区域,存放了各个操作系统的MBR的地址,方便启动各个操作系统。For example, install the Windows operating system on disks A and B, install the Linux operating system on disk C, and install the Mac OS Apple operating system on disk D; Figure 3 shows the distribution diagram of the operating system installed on a single server, as The disk occupied by each operating system generates a disk boot partition MBR, and the command list points to the disk boot partitions of the disks occupied by the other two operating systems. The pointer list is an independent area, which stores the addresses of the MBRs of each operating system, and is convenient for starting each operating system.

多操作系统启动引导模块,用于同时启动3个操作系统,或者选择仅启动其中1个或2个操作系统。The multi-OS boot module is used to start 3 operating systems at the same time, or choose to start only 1 or 2 of them.

例如,可以通过启动全部磁盘来启动全部操作系统,或者,选择仅启动磁盘A、B来启动Windows系统,然后再根据Windows操作系统所占的磁盘指向其他两个操作系统的MBR的指针,启动磁盘C和磁盘D,来启动其他两个操作系统。For example, you can start all operating systems by starting all disks, or choose to start only disks A and B to start the Windows system, and then start the disks according to the pointers of the disks occupied by the Windows operating system to the MBRs of the other two operating systems. C and Disk D, to boot the other two operating systems.

物理资源分配模块,用于将物理资源分配给各个启动的操作系统,各个启动的操作系统独立地占用为其分配的物理资源运行其上的任务。The physical resource allocation module is configured to allocate physical resources to each activated operating system, and each activated operating system independently occupies the allocated physical resources to run tasks on it.

例如,预先设置将物理资源平均分配给启动的操作系统,如果,目前3个操作系统均在运行,则每个操作系统各自占用1/3的CPU、内存、网卡等物理资源,如果只有2个操作系统在运行,则各自占用物理资源的一半,各物理资源一旦划分完成,将由所属操作系统独占,保证系统运行安全性。For example, it is pre-set to allocate physical resources equally to the starting operating systems. If all three operating systems are running at present, each operating system occupies 1/3 of the physical resources such as CPU, memory, and network card. If there are only two When the operating system is running, each occupies half of the physical resources. Once the division of physical resources is completed, it will be exclusively occupied by the operating system to ensure the security of the system operation.

从上述实施例可以看出,相对于现有技术,上述实施例中提供的单机同时运行多操作系统的方法及系统,充分利用服务器资源,在单台物理机下安装多操作系统,各个操作系统可以被独立引导启动也可以被同时引导启动,各自运行互不干扰,提高了资源的利用率,且稳定性高,而且隶属于某个系统的硬件出现问题后,只影响一个操作系统,不会造成所有操作系统崩溃,所以提高了系统的容错率,提高了单机的工作性能;It can be seen from the above embodiments that, compared with the prior art, the method and system for running multiple operating systems on a single machine at the same time provided in the above embodiments make full use of server resources and install multiple operating systems on a single physical machine. It can be booted and started independently or at the same time. Each operation does not interfere with each other, which improves the utilization rate of resources and has high stability. Moreover, if a problem occurs in the hardware belonging to a certain system, only one operating system will be affected. Cause all operating systems to crash, so the fault tolerance rate of the system is improved, and the work performance of the stand-alone machine is improved;

在本发明另一个实施例中,将CPU、内存、网卡等物理资源进行划分,分配给各个操作系统,使各操作系统可以独自占用,并行运行,进一步实现了高资源利用率、高稳定性、高性能的目的;In another embodiment of the present invention, physical resources such as CPU, memory, and network card are divided and allocated to each operating system, so that each operating system can be occupied independently and run in parallel, further realizing high resource utilization, high stability, the purpose of high performance;

同时,在本发明另一个实施例中,根据不同操作系统的性能压力,在某一操作系统繁忙时将部分任务分往其他操作系统协助处理,进一步提高了资源利用率和系统性能。At the same time, in another embodiment of the present invention, according to the performance pressure of different operating systems, when a certain operating system is busy, some tasks are allocated to other operating systems for assistance, which further improves resource utilization and system performance.

本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明不限制于任何特定形式的硬件和软件的结合。Those skilled in the art can understand that all or part of the steps in the above method can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, and the like. Optionally, all or part of the steps in the foregoing embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, or may be implemented in the form of software function modules. The present invention is not limited to any specific combination of hardware and software.

以上所述仅为本发明的优选实施例而已,并非用于限定本发明的保护范围。根据本发明的发明内容,还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. According to the content of the present invention, there can also be other various embodiments. Those skilled in the art can make various corresponding changes and deformations according to the present invention without departing from the spirit and essence of the present invention. Within the spirit and principles of the present invention, any modifications, equivalent replacements, improvements, etc., shall be included within the protection scope of the present invention.

Claims (10)

1. A method for simultaneously operating multiple operating systems by a single machine comprises the following steps:
correspondingly installing each system in a plurality of operating systems on one or more disks of a single machine, and generating a disk boot partition occupying the disk and a pointer list pointing to the disk boot partitions occupying the disks by other operating systems for each operating system;
and the server of the single machine starts all or selects to start the disk occupied by a certain operating system according to the disk guide partition so as to start all or select to start the certain operating system.
2. The method of claim 1, wherein:
the server selects a disk occupied by a certain operating system to be started according to the disk boot partition so as to start the certain operating system, and the method comprises the following steps:
and the server runs a boot loader of a disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system so as to start the certain operating system.
3. The method of claim 1, wherein:
the server starts the disks occupied by all the operating systems according to the disk boot partition so as to start all the operating systems, and the method comprises the following steps:
the server starts all the disks to start all the operating systems; or,
and the server runs a boot loader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and then starts the disks occupied by other operating systems according to the disk boot partition of the disk occupied by other operating systems recorded in the pointer list of the certain operating system so as to start other operating systems.
4. A method as claimed in claim 1, 2 or 3, characterized by:
after the server starts all or selects to start a certain operating system, the method further comprises:
and allocating the physical resources to each started operating system, wherein each started operating system occupies the allocated physical resources to operate independently.
5. The method of claim 4, wherein: the method further comprises the following steps:
the method comprises the steps that a mainboard firmware of a server monitors the condition that each operating system in operation occupies physical resources, if the physical resources occupied by one operating system are larger than a preset threshold value, part of tasks of the operating system are distributed to other started operating systems, and after the other started operating systems process the part of tasks, processing results are returned to the operating system.
6. A system for a single machine to run multiple operating systems simultaneously, comprising:
the multi-operating system installation module is used for correspondingly installing each system in the operating systems on one or more disks of the single machine and generating a disk boot partition occupying the disk and a pointer list pointing to the disk boot partition occupying the disk by other operating systems for each operating system;
and the multi-operating-system starting and guiding module is used for starting all or selecting to start the disk occupied by a certain operating system according to the disk guiding partition so as to start all or select to start the certain operating system.
7. The system of claim 6, wherein:
the multi-operating system boot module is configured to select a disk occupied by a certain operating system to be booted according to the disk boot partition, so as to boot the certain operating system, and includes:
and running a boot loader of a disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system so as to start the certain operating system.
8. The system of claim 6, wherein:
the multi-operating system boot module is configured to boot the disks occupied by all the operating systems according to the disk boot partition, so as to boot all the operating systems, and includes:
starting all the disks to start all the operating systems; or,
and operating a boot loader of the disk boot partition of the disk occupied by the certain operating system to start the disk occupied by the certain operating system, and starting the disk occupied by other operating systems according to the disk boot partition of the disk occupied by other operating systems recorded in the pointer list of the certain operating system so as to start other operating systems.
9. The system of claim 6, 7 or 8, wherein: further comprising:
and the physical resource allocation module is used for allocating the physical resources to each started operating system, and each started operating system occupies the allocated physical resources and operates independently.
10. The system of claim 9, wherein: further comprising:
the mainboard firmware is used for monitoring the condition that each operating system which is running occupies physical resources, and if the physical resources occupied by a certain operating system are larger than a preset threshold value, part of tasks of the certain operating system are distributed to other started operating systems;
and the other started operating systems are used for returning the processing result to the certain operating system after the partial tasks of the certain operating system are processed and completed.
CN201410363942.6A 2014-07-28 2014-07-28 A kind of unit runs the method and system of multiple operating system simultaneously Active CN104156270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410363942.6A CN104156270B (en) 2014-07-28 2014-07-28 A kind of unit runs the method and system of multiple operating system simultaneously

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410363942.6A CN104156270B (en) 2014-07-28 2014-07-28 A kind of unit runs the method and system of multiple operating system simultaneously

Publications (2)

Publication Number Publication Date
CN104156270A true CN104156270A (en) 2014-11-19
CN104156270B CN104156270B (en) 2018-02-06

Family

ID=51881775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410363942.6A Active CN104156270B (en) 2014-07-28 2014-07-28 A kind of unit runs the method and system of multiple operating system simultaneously

Country Status (1)

Country Link
CN (1) CN104156270B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516762A (en) * 2015-01-16 2015-04-15 浪潮电子信息产业股份有限公司 Installation method for coexistence of multiple server operating systems
CN104657218A (en) * 2015-02-10 2015-05-27 西安酷派软件科技有限公司 Multi-operation system operation method and device and terminal
CN106557690A (en) * 2016-11-29 2017-04-05 北京元心科技有限公司 Method and apparatus for managing multi-container system
CN107168837A (en) * 2017-05-15 2017-09-15 郑州云海信息技术有限公司 A kind of automatic switchover OS method of testing and test system
CN107256171A (en) * 2017-06-19 2017-10-17 郑州云海信息技术有限公司 A kind of multisystem based on BIOS is installed and switching method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128495A1 (en) * 2002-12-31 2004-07-01 Hensley John Alan Method of booting a computer operating system to run from a normally unsupported system device
CN1791862A (en) * 2003-04-09 2006-06-21 扎鲁纳股份有限公司 Operating systems
CN101872304A (en) * 2010-06-10 2010-10-27 复旦大学 Method for Improving Scalability of Many-Core Applications Based on Clustered Operating System Technology
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method
CN103186732A (en) * 2011-12-29 2013-07-03 中国长城计算机深圳股份有限公司 User identity authentication method and system of one-machine multi-hard disk multi-operating system
CN103810109A (en) * 2012-11-15 2014-05-21 华为技术有限公司 Memory allocation method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128495A1 (en) * 2002-12-31 2004-07-01 Hensley John Alan Method of booting a computer operating system to run from a normally unsupported system device
CN1791862A (en) * 2003-04-09 2006-06-21 扎鲁纳股份有限公司 Operating systems
CN101872304A (en) * 2010-06-10 2010-10-27 复旦大学 Method for Improving Scalability of Many-Core Applications Based on Clustered Operating System Technology
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method
CN103186732A (en) * 2011-12-29 2013-07-03 中国长城计算机深圳股份有限公司 User identity authentication method and system of one-machine multi-hard disk multi-operating system
CN103810109A (en) * 2012-11-15 2014-05-21 华为技术有限公司 Memory allocation method, device and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516762A (en) * 2015-01-16 2015-04-15 浪潮电子信息产业股份有限公司 Installation method for coexistence of multiple server operating systems
CN104657218A (en) * 2015-02-10 2015-05-27 西安酷派软件科技有限公司 Multi-operation system operation method and device and terminal
CN106557690A (en) * 2016-11-29 2017-04-05 北京元心科技有限公司 Method and apparatus for managing multi-container system
CN106557690B (en) * 2016-11-29 2019-10-22 北京元心科技有限公司 Method and apparatus for managing multi-container system
CN107168837A (en) * 2017-05-15 2017-09-15 郑州云海信息技术有限公司 A kind of automatic switchover OS method of testing and test system
CN107256171A (en) * 2017-06-19 2017-10-17 郑州云海信息技术有限公司 A kind of multisystem based on BIOS is installed and switching method and system

Also Published As

Publication number Publication date
CN104156270B (en) 2018-02-06

Similar Documents

Publication Publication Date Title
US8762999B2 (en) Guest-initiated resource allocation request based on comparison of host hardware information and projected workload requirement
CN103210379B (en) Server system, management method and equipment
EP2798491B1 (en) Method and device for managing hardware errors in a multi-core environment
US9223623B2 (en) Dynamic service resource control
US7971203B2 (en) Method, apparatus and system for dynamically reassigning a physical device from one virtual machine to another
US8661448B2 (en) Logical partition load manager and balancer
JP6458146B2 (en) Computer and memory area management method
US10474484B2 (en) Offline management of virtualization software installed on a host computer
US20060184938A1 (en) Method, apparatus and system for dynamically reassigning memory from one virtual machine to another
EP3195128B1 (en) Memory management in virtualized environment
US20130219391A1 (en) Server and method for deploying virtual machines in network cluster
US20120317331A1 (en) Using cooperative greedy ballooning to reduce second level paging activity
CN104156270B (en) A kind of unit runs the method and system of multiple operating system simultaneously
US20160378564A1 (en) Virtual resource scheduling for containers without migration
US9176787B2 (en) Preserving, from resource management adjustment, portions of an overcommitted resource managed by a hypervisor
US9454778B2 (en) Automating capacity upgrade on demand
KR102219122B1 (en) Technologies for operating system transitions in multiple-operating-system environments
US9639486B2 (en) Method of controlling virtualization software on a multicore processor
CN103701881B (en) Virtual hotplug system for supporting input/output (I/O) function dynamic distribution and working method thereof
US10318460B2 (en) UMA-aware root bus selection
CN110750336A (en) OpenStack virtual machine memory hot-expanding method
US9201662B2 (en) System and method for pre-operating system memory map management to minimize operating system failures
US10789082B2 (en) Execution of multiple operating systems without rebooting
CN109002347B (en) Virtual machine memory allocation method, device and system
CN114995951B (en) Bare metal resource management method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant