CN102789397B - Multi-operating system switching method in computer system - Google Patents
Multi-operating system switching method in computer system Download PDFInfo
- Publication number
- CN102789397B CN102789397B CN201110138307.4A CN201110138307A CN102789397B CN 102789397 B CN102789397 B CN 102789397B CN 201110138307 A CN201110138307 A CN 201110138307A CN 102789397 B CN102789397 B CN 102789397B
- Authority
- CN
- China
- Prior art keywords
- operating system
- computer system
- mentioned
- data
- operating
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000005192 partition Methods 0.000 claims description 15
- 230000007613 environmental effect Effects 0.000 claims description 14
- 238000011084 recovery Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域 technical field
本发明是有关于一种电脑系统,且特别是有关于一种电脑系统中的多操作系统切换方法。The present invention relates to a computer system, and in particular to a method for switching multiple operating systems in the computer system.
背景技术 Background technique
一般来说,电脑系统中可以存在多个操作系统。于电脑系统开机后,电脑系统可以选单方式显示多个操作系统供使用者进行选择。当使用者选定特定操作系统后,电脑系统即加载上述特定操作系统。而于特定操作系统加载完成后,电脑系统即可在上述特定操作系统的环境下执行相关的应用程序。Generally speaking, multiple operating systems may exist in a computer system. After the computer system is turned on, the computer system can display multiple operating systems in the form of a menu for the user to choose. After the user selects a specific operating system, the computer system loads the specific operating system. After the loading of the specific operating system is completed, the computer system can execute related application programs in the environment of the specific operating system.
由于使用者需要在开机时决定加载的操作系统。一旦选择之后,若使用者欲进入另一操作系统时,则必须关闭电脑系统并且重新启动来选择另一操作系统。换句话说,除了关机重选择操作系统外,已知电脑系统并无法达成操作系统互相切换的方式。并且,操作系统切换过程的等待时间也会过长。Because the user needs to decide the operating system to load when booting. Once selected, if the user wants to enter another operating system, the computer system must be shut down and restarted to select another operating system. In other words, except for shutting down and re-selecting the operating system, the known computer system cannot achieve a method of switching between operating systems. Moreover, the waiting time of the operating system switching process will be too long.
发明内容 Contents of the invention
本发明提出一种电脑系统中的多操作系统的切换方法,包括下列步骤:于第一操作系统下,触发系统管理中断使得上述电脑系统进入系统管理模式,并将电脑系统的控制权由第一操作系统转至基本输入输出系统;备份第一操作系统的第一环境参数;判断电脑系统是否具有第二环境参数;以及当不具有第二环境参数时,正常启动第二操作系统;当具有第二环境参数时,根据第二环境参数,启动第二操作系统。The present invention proposes a method for switching multiple operating systems in a computer system, which includes the following steps: under the first operating system, triggering a system management interruption so that the above-mentioned computer system enters the system management mode, and transfers the control right of the computer system from the first operating system The operating system is transferred to the basic input and output system; the first environmental parameter of the first operating system is backed up; whether the computer system has the second environmental parameter is judged; and when there is no second environmental parameter, the second operating system is started normally; In case of the second environment parameter, the second operating system is started according to the second environment parameter.
本发明提出一种具多操作系统的电脑系统,包括:中央处理器;控制芯片组,连接至中央处理器;内存,连接至控制芯片组;硬盘,连接至控制芯片组;以及基本输入输出系统,连接至控制芯片组;其中,电脑系统于第一操作系统下,触发系统管理中断,中央处理器使得电脑系统进入系统管理模式,并备份第一操作系统的第一环境参数到内存,并利用基本输入输出系统启动第二操作系统。The present invention proposes a computer system with multiple operating systems, including: a central processing unit; a control chip set connected to the central processing unit; a memory connected to the control chip set; a hard disk connected to the control chip set; and a basic input and output system , connected to the control chipset; wherein, the computer system under the first operating system triggers a system management interrupt, and the central processing unit makes the computer system enter the system management mode, and backs up the first environment parameters of the first operating system to the memory, and utilizes The BIOS starts the second operating system.
综上所述,本发明在进行操作系统切换时不需将电脑系统还原至开机时的初始状态,也不需进入睡眠模式,因此可以节省操作系统之间切换的时间。To sum up, the present invention does not need to restore the computer system to the initial state when it is turned on, and does not need to enter the sleep mode when switching between operating systems, thus saving time for switching between operating systems.
为了对本发明之上述及其他方面有更佳的了解,下文特举较佳实施例,并配合所附图式,作详细说明如下。In order to have a better understanding of the above-mentioned and other aspects of the present invention, preferred embodiments are given below and described in detail in conjunction with the accompanying drawings.
附图说明 Description of drawings
图1所示为本发明一实施例的电脑系统。FIG. 1 shows a computer system according to an embodiment of the present invention.
图2所示为本发明一实施例之操作系统的切换方法流程图。FIG. 2 is a flowchart of an operating system switching method according to an embodiment of the present invention.
具体实施方式 Detailed ways
本发明使用中央处理器(CPU)的系统管理模式(system managementmode,简称SMM),其可用来操控(handle)内存或者芯片组的错误,或者电源管理运作(power management operation)。而在进入系统管理模式时,电脑系统的控制权会由操作系统转移至基本输入输出系统(basic input outputsystem,简称BIOS)。The present invention uses a system management mode (SMM) of a central processing unit (CPU), which can be used to handle memory or chipset errors, or power management operations. When entering the system management mode, the control right of the computer system will be transferred from the operating system to the basic input output system (BIOS for short).
换句话说,电脑系统在进入系统管理模式时,电脑系统会先暂存中央处理器的背景数据(CPU context),当控制权转移至基本输入输出系统后,此时我们需要备份暂存的背景数据(CPU context)以及操作系统储存于内存中的数据。而中央处理器的背景数据以及操作系统储存于内存中的数据可统称为环境参数。In other words, when the computer system enters the system management mode, the computer system will temporarily store the background data of the central processing unit (CPU context). When the control is transferred to the basic input and output system, we need to back up the temporary background data. Data (CPU context) and data stored in memory by the operating system. The background data of the central processing unit and the data stored in the memory by the operating system can be collectively referred to as environmental parameters.
由于电脑系统进入系统管理模式的时间非常的短暂,使用者几乎无法察觉,加上在不用重新启动或睡眠恢复状况下,因此可节省因使用重新启动、或是睡眠恢复等方式来切换时,操作系统中的应用程序、驱动程序、服务等等所需执行对应的时间,因此,本发明即利用系统管理模式来达成本发明快速地切换操作系统的目的。Since the time for the computer system to enter the system management mode is very short, the user can hardly notice it. In addition, it does not need to restart or sleep recovery, so it can save the operation when switching by restarting or sleep recovery. Application programs, driver programs, services, etc. in the system need to be executed for a corresponding amount of time. Therefore, the present invention uses the system management mode to achieve the purpose of quickly switching the operating system of the present invention.
请参照图1,其所示为本发明一实施例的电脑系统。电脑系统100包括:中央处理器110、控制芯片组120、内存130、硬盘140、基本输入输出系统(BIOS)150。其中,控制芯片组120中包括:北桥芯片122、与南桥芯片126。其中,中央处理器110利用前端总线(front side bus)连接至北桥芯片122,北桥芯片122利用内存总线(memory bus)连接至内存130。南桥芯片126利用私有总线连接至北桥芯片122,并连接至硬盘140与基本输入输出系统(BIOS)150。Please refer to FIG. 1 , which shows a computer system according to an embodiment of the present invention. The computer system 100 includes: a central processing unit 110 , a control chipset 120 , a memory 130 , a hard disk 140 , and a basic input output system (BIOS) 150 . Wherein, the control chipset 120 includes: a north bridge chip 122 and a south bridge chip 126 . Wherein, the CPU 110 is connected to the north bridge chip 122 through a front side bus, and the north bridge chip 122 is connected to the memory 130 through a memory bus. The south bridge chip 126 is connected to the north bridge chip 122 through a private bus, and connected to the hard disk 140 and the basic input output system (BIOS) 150 .
根据本发明的实施例,硬盘140中至少分割为第一分割区145以及第二分割区148,第一分割区145中储存第一操作系统,第二分割区148中储存第二操作系统。再者,基本输入输出系统150可在开机过程将内存130至少区分为第一储存区135与第二储存区138。According to an embodiment of the present invention, the hard disk 140 is at least divided into a first partition 145 and a second partition 148 , the first partition 145 stores a first operating system, and the second partition 148 stores a second operating system. Furthermore, the BIOS 150 can at least divide the memory 130 into the first storage area 135 and the second storage area 138 during the booting process.
当电脑系统100加载第一操作系统时,基本输入输出系统(BIOS)150会由硬盘140的第一分割区145来启动(boot)第一操作系统,并且于第一操作系统的环境时,第一操作系统的所有数据皆暂存在内存130的第一储存区135。同理,当电脑系统100加载第二操作系统时,基本输入输出系统(BIOS)150会由硬盘140的第二分割区148来启动(boot)第二操作系统,并且于第二操作系统的环境时,第二操作系统的所有数据皆暂存在内存130的第二储存区138。When the computer system 100 loads the first operating system, the basic input output system (BIOS) 150 will start (boot) the first operating system from the first partition 145 of the hard disk 140, and in the environment of the first operating system, the second All data of an operating system are temporarily stored in the first storage area 135 of the memory 130 . Similarly, when the computer system 100 loads the second operating system, the basic input output system (BIOS) 150 will start (boot) the second operating system from the second partition 148 of the hard disk 140, and in the environment of the second operating system At this time, all data of the second operating system are temporarily stored in the second storage area 138 of the memory 130 .
根据本发明的实施例,于第一操作系统以及第二操作系统中皆安装切换驱动模块(swap driver),当用户欲进行操作系统切换时,利用硬件按键或者软件程序方式来让切换驱动程序发出高级配置和电源管理接口(advancedconfiguration and power interface,简称ACPI)呼叫,产生触发系统管理中断(system management interrupt,简称SMI)。此时,电脑系统的控制权会由操作系统转移至基本输入输出系统(BIOS)150,并且由基本输入输出系统(BIOS)150即可进行操作系统切换的动作。According to an embodiment of the present invention, a switching driver module (swap driver) is installed in both the first operating system and the second operating system. When the user wants to switch the operating system, the switching driver is issued by using a hardware button or a software program. The advanced configuration and power interface (ACPI) call generates a trigger system management interrupt (SMI). At this time, the control right of the computer system will be transferred from the operating system to the BIOS 150 , and the BIOS 150 can switch the operating system.
举例来说,当使用者欲由第一操作系统切换至第二操作系统时,即可利用上述方法控制切换驱动程序发出高级配置和电源管理接口(ACPI)呼叫,并且触发系统管理中断(SMI)。当系统管理中断(SMI)被触发时,中央处理器110立刻进入系统管理模式(SMM),此时备份在第一操作系统下的第一环境参数,亦即中央处理器的背景数据(CPU context)会被暂存在内存130中,而第一操作系统中的数据会备份在第一储存区135。之后,记录上述第一操作系统的第一断点。于上述动作完成后,基本输入输出系统(BIOS)150即可以加载第二操作系统。For example, when the user wants to switch from the first operating system to the second operating system, the above method can be used to control the switching driver to issue an Advanced Configuration and Power Management Interface (ACPI) call and trigger a System Management Interrupt (SMI) . When the system management interrupt (SMI) was triggered, the central processing unit 110 entered the system management mode (SMM) at once, and at this moment, the first environmental parameters under the first operating system were backed up, i.e. the background data (CPU context) of the central processing unit ) will be temporarily stored in the memory 130, and the data in the first operating system will be backed up in the first storage area 135. Afterwards, record the first breakpoint of the above-mentioned first operating system. After the above actions are completed, the basic input output system (BIOS) 150 can load the second operating system.
如果此电脑系统从未加载第二操作系统,也就是内存130中并无第二操作系统的第二环境参数时,基本输入输出系统(BIOS)150会进行正常启动(boot)程序来加载第二操作系统。亦即,由硬盘140的第二分割区148来启动(boot)第二操作系统,并且于第二操作系统的环境时,第二操作系统的所有数据皆暂存在内存130的第二储存区138。If this computer system has never loaded the second operating system, that is, when there is no second environment parameter of the second operating system in the internal memory 130, the basic input output system (BIOS) 150 will carry out a normal startup (boot) program to load the second operating system. operating system. That is, the second operating system is started (boot) by the second partition 148 of the hard disk 140, and in the environment of the second operating system, all data of the second operating system are temporarily stored in the second storage area 138 of the internal memory 130 .
反之,如果电脑系统曾经加载过第二操作系统,则内存130中备份了第二操作系统的第二环境参数,基本输入输出系统(BIOS)150会还原先前备份于内存130中第二操作系统环境下第二环境参数,亦即将中央处理器的背景数据(CPU context)还原(restore)至中央处理器110,并且还原第二储存区138中第二操作系统的数据。之后,即可回到第二操作系统当初的第二断点再次回到第二操作系统的环境。On the contrary, if the computer system once loaded the second operating system, the second operating system environment parameters of the second operating system are backed up in the internal memory 130, and the basic input output system (BIOS) 150 will restore the second operating system environment previously backed up in the internal memory 130 Lowering the second environment parameters means restoring the background data (CPU context) of the central processing unit (CPU context) to the central processing unit 110, and restoring the data of the second operating system in the second storage area 138. After that, you can return to the original second breakpoint of the second operating system and return to the environment of the second operating system again.
请参照图2,其所示为本发明一实施例操作系统的切换方法流程图。当电脑系统处在第一操作系统环境(步骤S502)时,使用者欲切换至第二操作系统环境。此时,控制切换驱动程序触发系统管理中断(SMI)并进入系统管理模式(SMM),且控制权转移至基本输入输出系统(BIOS)(步骤S504)。接着,备份第一操作系统下的第一环境参数且记录第一断点(步骤S506)。也就是说,先备份中央处理器的第一背景数据以及内存中的第一数据。Please refer to FIG. 2 , which is a flow chart of an operating system switching method according to an embodiment of the present invention. When the computer system is in the first operating system environment (step S502), the user wants to switch to the second operating system environment. At this time, the control switching driver triggers a system management interrupt (SMI) and enters a system management mode (SMM), and the control right is transferred to the basic input output system (BIOS) (step S504 ). Next, back up the first environment parameters under the first operating system and record the first breakpoint (step S506). That is to say, the first background data of the central processing unit and the first data in the memory are backed up first.
之后,判断电脑系统是否曾经启动第二操作系统(步骤S508)。亦即,判断电脑系统中是否备份第二操作系统的第二环境参数。Afterwards, it is determined whether the computer system has started the second operating system (step S508). That is, it is determined whether the second environment parameter of the second operating system is backed up in the computer system.
当电脑系统未曾启动第二操作系统时,则基本输入输出系统(BIOS)150会利用硬盘来启动(boot)第二操作系统(步骤S510)。最终,进入第二操作系统环境(步骤S514)。When the computer system has not started the second operating system, the basic input output system (BIOS) 150 uses the hard disk to start (boot) the second operating system (step S510 ). Finally, enter the second operating system environment (step S514).
反之,当电脑系统曾经启动第二操作系统时,则基本输入输出系统(BIOS)150会还原先前备份于内存130中的第二环境掺数,并且由第二断点进入第二操作系统(步骤S512)。也就是说,将在第二操作系统环境下的中央处理器的第二背景数据(CPU context)还原(restore)至中央处理器110,并且还原内存中的第二数据,并且由第二断点进入第二操作系统,最终进入第二操作系统环境(步骤S514)。On the contrary, when the computer system once started the second operating system, the basic input output system (BIOS) 150 will restore the second environment data previously backed up in the internal memory 130, and enter the second operating system by the second breakpoint (step S512). That is to say, the second background data (CPU context) of the central processing unit under the second operating system environment is restored (restore) to the central processing unit 110, and the second data in the memory is restored, and the second breakpoint Enter the second operating system, and finally enter the second operating system environment (step S514).
根据本发明的实施例,当操作系统进行切换时,由第一操作系统环境(步骤S502)经过步骤S512切换至第二操作系统环境(步骤S514),几乎不需要花费任何等待时间。亦即,使用者不需要等待时间即可以完成操作系统之间的切换。当然,由第二操作系统切换至第一操作系统的方法流程与图2也完全相同,因此不再赘述。According to the embodiment of the present invention, when the operating system is switched, switching from the first operating system environment (step S502) to the second operating system environment (step S514) through step S512 hardly takes any waiting time. That is, the user can complete the switching between operating systems without waiting time. Of course, the flow of the method for switching from the second operating system to the first operating system is exactly the same as that in FIG. 2 , so details are not repeated here.
本发明的优点是提出一种电脑系统中的多操作系统切换方法。本发明不需要在第一操作系统下进入睡眠模式即可进行操作系统的切换,而使用者也可以感觉到操作系统快速地进行的切换,几乎不需要任何等待时间。The advantage of the invention is to provide a method for switching multiple operating systems in a computer system. The present invention can switch the operating system without entering the sleep mode under the first operating system, and the user can also feel the fast switching of the operating system without any waiting time.
本发明的另一优点是提出一种电脑系统中的多操作系统切换方法。本发明在进行操作系统切换时不需将电脑系统还原至开机时的初始状态,因此可以节省操作系统之间切换的时间。Another advantage of the present invention is to provide a method for switching between multiple operating systems in a computer system. The invention does not need to restore the computer system to the initial state when the operating system is switched, so the time for switching between operating systems can be saved.
综上所述,虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明。任何熟习此技艺者,在不脱离本发明的精神和范围内,当可作各种更动与润饰,因此本发明的保护范围当视权利要求书所界定者为准。To sum up, although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Anyone skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be defined by the claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110138307.4A CN102789397B (en) | 2011-05-18 | 2011-05-18 | Multi-operating system switching method in computer system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110138307.4A CN102789397B (en) | 2011-05-18 | 2011-05-18 | Multi-operating system switching method in computer system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102789397A CN102789397A (en) | 2012-11-21 |
CN102789397B true CN102789397B (en) | 2015-04-15 |
Family
ID=47154804
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110138307.4A Active CN102789397B (en) | 2011-05-18 | 2011-05-18 | Multi-operating system switching method in computer system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102789397B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9342243B2 (en) | 2012-11-28 | 2016-05-17 | Lenovo (Beijing) Co., Ltd. | Method and electronic apparatus for implementing multi-operating system |
CN103853664B (en) * | 2012-11-28 | 2017-06-27 | 联想(北京)有限公司 | A kind of method and electronic equipment for realizing multiple operating system |
CN111221677B (en) * | 2018-11-27 | 2023-06-09 | 环达电脑(上海)有限公司 | Error detection backup method and server |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1402124A (en) * | 2001-08-22 | 2003-03-12 | 英业达股份有限公司 | Method and system for starting multiple personal digital assistant operating systems through menu |
CN1658185A (en) * | 2004-02-18 | 2005-08-24 | 国际商业机器公司 | Computer system with mutual independence symbiont multiple eperation system and its switching method |
CN1955934A (en) * | 2005-10-25 | 2007-05-02 | 神基科技股份有限公司 | Method for quickly switching different operating systems in a computer device with multiple operating systems |
CN101149690A (en) * | 2006-09-22 | 2008-03-26 | 三星电子株式会社 | Computer system and method including devices directing stand-alone system management operations |
CN102043670A (en) * | 2009-10-22 | 2011-05-04 | 系微股份有限公司 | How to switch between different operating systems on a computer |
-
2011
- 2011-05-18 CN CN201110138307.4A patent/CN102789397B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1402124A (en) * | 2001-08-22 | 2003-03-12 | 英业达股份有限公司 | Method and system for starting multiple personal digital assistant operating systems through menu |
CN1658185A (en) * | 2004-02-18 | 2005-08-24 | 国际商业机器公司 | Computer system with mutual independence symbiont multiple eperation system and its switching method |
CN1955934A (en) * | 2005-10-25 | 2007-05-02 | 神基科技股份有限公司 | Method for quickly switching different operating systems in a computer device with multiple operating systems |
CN101149690A (en) * | 2006-09-22 | 2008-03-26 | 三星电子株式会社 | Computer system and method including devices directing stand-alone system management operations |
CN102043670A (en) * | 2009-10-22 | 2011-05-04 | 系微股份有限公司 | How to switch between different operating systems on a computer |
Also Published As
Publication number | Publication date |
---|---|
CN102789397A (en) | 2012-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8874889B2 (en) | Method of switching between multiple operating systems of computer system | |
EP2189901B1 (en) | Method and system to enable fast platform restart | |
JP6530774B2 (en) | Hardware failure recovery system | |
CN104220985B (en) | Use the user's space method and apparatus that synchronously enhancing dormancy and recovery are handled | |
US8146093B2 (en) | Computer multiple operation system switching method | |
US9152205B2 (en) | Mechanism for facilitating faster suspend/resume operations in computing systems | |
US7962736B1 (en) | Interactive pre-OS firmware update with repeated disabling of interrupts | |
KR101696490B1 (en) | Partial rebooting recovery apparatus and method | |
JP3777136B2 (en) | Computer device, data dead copy method, program, and computer device operating method | |
JP6152493B2 (en) | Techniques for operating system transitions in a multi-operating system environment | |
CN104503788A (en) | Setting method capable of shortening starting time of Android operating system | |
US20190004818A1 (en) | Method of UEFI Shell for Supporting Power Saving Mode and Computer System thereof | |
WO2012163275A1 (en) | Control method, control device and computer system | |
CN103729211A (en) | Operating system recovery method and device and terminal equipment | |
TWI546661B (en) | Resuming a system using state information | |
CN104778081A (en) | Method for switching operating system and electronic device | |
US11704198B2 (en) | Method and apparatus for providing recovery from a computing device boot up error | |
CN102789397B (en) | Multi-operating system switching method in computer system | |
KR20130068630A (en) | Method for initializing embedded device and apparatus thereof | |
US7849300B2 (en) | Method for changing booting sources of a computer system and a related backup/restore method thereof | |
CN102043670A (en) | How to switch between different operating systems on a computer | |
CN105824650A (en) | Computer system, adaptive sleep control module and control method thereof | |
CN100394392C (en) | Automatic starting control method and system for computer program recovery mode | |
US10592329B2 (en) | Method and electronic device for continuing executing procedure being aborted from physical address where error occurs | |
TWI524274B (en) | Quickly switch the operating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |