Abstract:
A method for sharing peripheral devices in dual operating systems for an electronic device having at least one peripheral device is provided. The method includes: receiving a setting value for the peripheral device under the first operating system from a user; activating a second operating system; transmitting the setting value to the second operating system; and switching from the first operating system to the second operating system, wherein the second operating system sets the peripheral device with the setting value and enables the electronic device to operate under the second operating system

Description:
CROSS REFERENCE TO RELATED APPILCATIONS 
       [0001]    The application claims the benefit of U.S. Provisional Application 61/602569, filed on Feb. 23, 2012 and claims priority under 35 U.S.C. § 119(a) on Patent Application No(s). 101134871, filed in Taiwan, Republic of China on Sept. 24, 2012, the entire contents of which are hereby incorporated by reference. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to dual operating system architectures, and in particular, relates to techniques for sharing peripheral devices in dual operating systems. 
         [0004]    2. Description of the Related Art 
         [0005]    Portable electronic devices, such as notebook computers and smartphones, have become indispensable for modern day humans. 
         [0006]    Conventionally, the operating system of the electronic devices which is mostly used is the Microsoft Windows operating system (OS). Nowadays, however, the Android OS, which is based on a Linux operating system, is also popularly used. The two operating systems perform differently with different operations. In order to take advantage of both of the operating systems, some designs integrate the two operating systems into a single one electronic device. In some designs, the electronic device has only one CPU that processes instructions for dual operating systems, while in some other designs, separate CPUs are respectively in charge of one of the operating systems Generally, in a dual operating system architecture, only one of the operating systems will be in operation while the other will stay in a sleep state at the same time. In the manner, the dual operating systems can share resources with each other and unnecessary conflicts may be prevented. 
         [0007]    However, when switching between the operating systems, the peripheral devices are unable to maintain a consistent setting since one operating system does not know the system settings of the other operating system. For example, the display brightness and the speaker volume may suddenly change when switching between the operating systems. Thus, users must frequently adjust system settings, which is inconvenient for users. 
       BRIEF SUMMARY OF THE INVENTION 
       [0008]    The present invention provides a method for sharing peripheral devices in dual operating systems for an electronic device having at least one peripheral device, comprising: receiving a setting value for the peripheral device under the first operating system from a user; activating a second operating system; transmitting the setting value to the second operating system; switching from the first operating system to the second operating system, wherein the second operating system sets the peripheral device with the setting value and enables the electronic device to operate under the second operating system. 
         [0009]    The present invention further provides an electronic device, installed with a first operating system and a second operating system, and having at least one peripheral device, comprising: a first synchronization manager, operating under the first operating system, transmitting a setting value of the peripheral device to the second operating system when activating the second operating system under the first operating system; a second synchronization manager, operating under the second operating system, receiving and storing the setting value from the first synchronization manager; and a controller, coupled to the first synchronization manager, the second synchronization manager and the at least one peripheral device, setting the peripheral device according to the setting value stored in the second operating system after the first operating system has been switched to the second operating system. 
         [0010]    A detailed description is given in the following embodiments with reference to the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein: 
           [0012]      FIG. 1  is a schematic diagram of an electronic device which operates dual operating systems according to an embodiment of the present invention. 
           [0013]      FIG. 2  is a flow chart of the method for sharing peripheral devices in a dual operating system according to an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0014]    The following description is of the best-contemplated mode of carrying out the invention. The description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims. 
         [0015]    To prevent dual input of system settings of peripheral devices required in the prior art, the present invention provides a new dual operating system architecture, and a method for sharing peripheral devices for the dual operating systems. 
       Dual Operating System Architecture 
       [0016]      FIG. 1  is a schematic diagram of an electronic device which operates dual operating systems according to an embodiment of the present invention. The electronic device  100  of the present invention can be a notebook computer or a smart phone, which comprises: a first operating system  110 , a second operating system  120 , a controller  130  and a peripheral device  140 . For example, the first operating system  110  can be a Windows operating system, and the second operating system  120  can be an Android operating system. However, the present invention is not limited to the example, and can be applied to various operating systems. The controller  130  of the present invention, for example, is an independent embedded (EC), which is coupled to the two operating systems  110  and  120  and the peripheral device  140 , and can be used to control the peripheral device  140  according to commands issued from the two operating systems  110  and  120 . The peripheral device  140  of the present invention comprises various input/output devices such as keyboards, mice, touchpads, trackballs, trackpoints, displays, speakers, headsets, and cameras, etc. (not shown in  FIG. 1 ). The peripheral device  140  can be used to perform various specific functions. It should be noted that the two operating systems  110  and  120  can share the peripheral device  140  via the independent controller  130 . 
         [0017]    In a preferred embodiment, there is first synchronization manager  112  running under a the first operating system  110 , and a second synchronization manager  122  running under the second operating system  120 . The synchronization managers  112  and  122  can be used to coordinate the switching and data synchronization between the operating systems  110  and  120 . In the embodiment, the synchronization managers  112  and  122  are not only coupled to the controller  130 , but also coupled to each other via a transmission interface  150 . For example, The transmission interface  150  is a universal serial bus (USB) interface. With the USB interface  150 , the operating systems  110  and  120  can exchange information more directly, and the probability of conflict between the two operating systems can thus be reduced. The USB interface is merely for illustration, and the present invention should not be limited thereto. 
         [0018]    The electronic device  110  with the dual operating system architecture described above can be used to perform the method of the present invention to share a peripheral device in a dual operating systems. Each step of the method of the present invention will be described in accordance with  FIGS. 1-2  in the following. 
       Method for Sharing Peripheral Devices In a Dual Operating System 
       [0019]      FIG. 2  is a flow chart of the method for sharing peripheral devices in a dual operating system according to an embodiment of the present invention. Please refer to  FIGS. 1 and 2 . The method  200  of the present invention can be performed in the electronic device  100  described above, and comprises and can be divided into three processes: process  200 A, which is performed by the first synchronization manager  112  under the first operating system  110 ; process  200 B, which is performed by the second synchronization manager  122  under the second operating system  120 ; and process  200 C, which is performed by the controller  130 . For illustration, the processes  200 A,  200 B and  200 C are respectively shown in different blocks in  FIG. 2 . Note that although the following embodiments merely describe the process where the first operating system is switched to the second operating system, the process where the second operating system is switched to the first operating system can be performed in the same manner and thus will not be further discussed. 
         [0020]    The process  200 A of the first operating system  110  comprises: in step S 202 , receiving a setting value for the peripheral device  140  under the first operating system  110  from a user. For example, the setting value of the peripheral device can be a brightness value of a display, volume value of a speaker, sensitivity and correction value of a touchpad, or login setting value (user&#39;s account and password) of a network equipment such as a wireless access point (AP). Then, in step S 203 , when the first operating system  110  receives the command from the user to switch operating systems (for example, when the user presses designated keys on the keyboard or clicks a designated object on a display interface), the controller  130  activates (awakes) the second operating system  120 . Then, in step S 204 , the first operating system  110  transmits the setting value to the second operating system  120  through the transmission interface  150 . In step S 206 , the first operating system  110  is switched to the second operating system  120 . Finally, in step S 207 , the first operating system  110  enters the standby mode or the sleep mode. Note that step S 204  (i.e., transmitting the setting value) has to be performed before step S 206  (i.e., switching between the operating systems) to make sure that the second operating system  120  has known how the user changed the setting of the peripheral device  140  before the first operating system  110  enters the standby mode or a sleep mode. 
         [0021]    The process  200 B of the second operating system  120  comprises step S 208  and steps S 210 , where step S 208  is subsequently performed after step S 204  of the process  200 A, and step S 210  is subsequently performed after step S 206  of the process  200 A. In step S 208 , the second operating system  120  stores the setting value after receiving the setting value issued from the first operating system  110 . In an embodiment, the setting value can be stored as a setting value file when, for example, the peripheral device is a touchpad, trackpoints or the like. In step S 210 , the second operating system  120  obtains a control right to peripheral device  140  from the controller  130  (for example, due to a notification message from the first operating system  110 ), and completes the switching between the operating systems. 
         [0022]    The controller  130  can perform the process  200 C including step S 212  or step S 214 . The controller  130  in step S 212  operates under the first operating system  110 , while in step S 214  operates under the second operating system  120 . Step S 212  is performed subsequently after step S 202 . Meanwhile, the controller  130 , which is still under the control of the first operating system  110 , adjusts the setting value of the peripheral device  140  according to the setting value that the user provides to the peripheral device  140 . Step S 214  is subsequently performed after step S 210 . Meanwhile, the control right of the controller  130  is transferred from the first operating system  110  to the second operating system  120 , and the controller  130  sets the peripheral device according to the setting value  140  or setting value file stored in the second operating system  120  in step S 208 . In other words, the setting value can be kept the same as originally stored in the first operating system  110 , and synchronization of the setting values can thus be achieved. 
         [0023]    With the present invention, the display brightness, speaker volume, and other system settings of the peripheral device will not be changed due to the switching of the operating systems, and a consistent operating environment will help to improve user experience for the dual operating system architecture. 
         [0024]    While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.