1. Technical Field
Embodiments of the present disclosure relates to an electronic device and a method for upgrading an operating system of the electronic device.
2. Description of related art
Generally, an operating system of an electronic device (e.g., a computer) needs to be upgraded from time to time. However, the upgrading operation may affect normal use of the electronic device by the user. For example, the user may need to end an application software when the upgrading operation is performed, which is inconvenient. Therefore, an improved method for upgrading the operating system is desired.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word module, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The upgrading system 10 is used to upgrade an operating system of the electronic device 1. In this embodiment, the upgrading system 10 detects whether the operating system needs to be upgraded. Once the operating system is determined to be upgraded, the upgrading system 10 sends an informing message to inform the BIOS 20
The BIOS 20 sets an upgrading flag of the electronic device 1 when the informing message is received. If the electronic device 1 enters a sleep mode, the BIOS 20 activates the timer 30 to calculate a time period of the electronic device 1 entering the sleep mode when the upgrading flag is set.
The BIOS 20 further wakens the electronic device 1 from the sleep mode when the time period is greater than a predetermined value, and sends a wakening message to the upgrading system 10 that the electronic device 1 is wakened from the sleep mode. Then the upgrading system 10 upgrades the operating system when the wakening message is received.
In this embodiment, the upgrading system 10 may include a detecting module 11, a sending module 12, a receiving module 13, an upgrading module 14, and a controlling module 15. The modules 11-15 include computerized codes in the form of one or more programs that may be stored in the storage device 40. The computerized codes include instructions that are executed by the at least one processor 50.
In step S1, the detecting module 11 detects whether the operating system of the electronic device 1 needs to be upgraded.
In one embodiment, the detecting module 11 determines that the operating system needs to be upgraded, when an automatic upgrade management program (e.g., a wuauclt.exe) is included in a list of active processes of a task manager of the electronic device 1. The automatic upgrade management program downloads patches for the operating system from Internet, and installs the patches to upgrade the operating system automatically.
In step S2, the sending module 12 sends an informing message to inform the BIOS 20 that the operating system is determined to be upgraded.
In one embodiment, the sending module 12 inactivates the automatic upgrade management program (e.g., the wuauclt.exe) before sending the informing message to the BIOS 20, to prevent the automatic upgrade management program from upgrading the operating system.
In step S3, the BIOS 20 sets an upgrading flag for the electronic device 1 when the informing message is received. If the electronic device 1 is in a sleep mode, the BIOS 20 activates the timer 30 to calculate a time period of the electronic device 1 is in the sleep mode after the upgrading flag has been set.
For example, if a user needs to leave away for one hour, the user may control the electronic device 1 to enter the sleep mode manually. Then, the BIOS 20 activates the timer 30 to calculate the time period when the upgrading flag has been set.
In step S4, the BIOS 20 wakens the electronic device 1 from the sleep mode when the time period is greater than a predetermined value (e.g., 5 minutes). The BIOS 20 further sends a wakening message to the upgrading system 10 that the electronic device 1 is wakened from the sleep mode.
In one embodiment, the BIOS 20 further inactivates a display and a fan of the electronic device 1, to save power for the electronic device 1, when the electronic device 1 is wakened from the sleep mode. In this embodiment, the BIOS 20 inactivates the display by setting a brightness value of the display equal to zero, and inactivates the fan by setting a value of Pulse Width Modulation (PWM) of the fan equal to zero.
In step S5, the receiving module 13 receives the wakening message from the BIOS 20.
In step S6, the upgrading module 14 upgrades the operating system when the wakening message is received. As mentioned above, the automatic upgrade management program upgrades the operating system automatically. In one embodiment, the upgrading module 14 upgrades the operating system by activating the automatic upgrade management program (e.g., the wuauclt.exe), to perform upgrading operation for the operating system.
In step S7, the controlling module 15 controls the electronic device 1 to enter the sleep mode after the operating system is upgraded.
Although embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2013105064912 | Oct 2013 | CN | national |