1. Field of the Disclosure
The embodiments herein relate generally to power saving in a modem System on Chip (SoC), and more particularly, to a system and method for machine learning to predict Central Processing Unit (CPU) idle pattern for power saving in a modem SoC.
2. Description of the Related Art
An SoC is an Integrated Circuit (IC), typically used in embedded devices, that integrates all components of a computer or other electronic system into a single chip. In electronic and embedded devices, reducing power consumption can be a difficult task, as a microcontroller/microprocessor of the embedded device must stay alert in order to execute processes and provide output to a user as soon as possible. Various improvements are being developed in order to reduce power consumption in embedded devices without affecting the performance of the devices.
The present disclosure has been made to address the above-mentioned problems and disadvantages, and to provide at least the advantages described below.
An aspect of the present disclosure provides a method of providing power management in a system employing a Central Processing Unit (CPU) and an operating system. The method includes monitoring idle times of the CPU; predicting an idle pattern based on the monitored idle times; and determining a selective sleep of a peripheral device based on the predicted CPU idle pattern.
Another aspect of the present disclosure provides an apparatus for performing power management in a system employing a Central Processing Unit (CPU) and an operating system. The apparatus includes the CPU, and a monitoring unit adapted for monitoring idle times of the CPU; a predictor adapted for predicting a idle pattern of the CPU based on the monitored idle times; and a controller adapted for determining a selective sleep of a peripheral device based on the predicted CPU idle pattern.
The above and other objects, features, and advantages of the present disclosure will be more apparent from the following description, taken in conjunction with the accompanying drawings, in which:
Hereinafter, embodiments of the present disclosure are described in detail with reference to the accompanying drawings. However, the present disclosure is not limited to the described embodiments. In the following description, the same or similar reference numerals are used to indicate the same or similar components in the accompanying drawings. Detailed descriptions of known functions and configurations may be omitted in order to avoid obscuring the subject matter of the present disclosure.
In an embedded microprocessor/microcontroller-based device, one way of reducing power consumption is to turn off external components in the system and gate clocks to peripheral units based on system operations. These power-saving procedures can be triggered and implemented when a CPU of the device is in an idle state.
Referring to a method 100b of
If the CPU determines that none of the peripheral units and sub systems is busy in step 105, then, in step 107, the CPU stores current states of the peripheral units and sub systems and powers the peripheral units and sub systems down, in step 107a. Once the peripheral units and sub systems are powered-down, the CPU enters the WFI state in step 107b, in which the CPU will be in an idle state and no process will be under execution. If the CPU receives any process for execution in step 111, an interrupt signal will be received and the CPU will be powered up and the states of all of the peripheral units and sub systems will be restored for execution, in step 107c. Upon restoration and powering up of the peripheral units and subsystems, the CPU initiates an interrupt service routine to handle process execution, in step 113. A schematic graph 100a of
The sleep mode as described with reference to
A CPU idle period in a system can have a pattern designated for a particular scenario. For example, for a given scenario, a CPU idle period can follow a particular pattern regularly after execution of a particular interrupt or a task. The length of a CPU idle period can vary each time the CPU idle pattern occurs, but the CPU idle period can be predicted to a certain extent. However, statically predicting CPU idle period based on a protocol, design, or architecture may not be feasible. A CPU idle period must be predicted during run-time, as the CPU idle period can vary based on the actual implementation. For example, consider the 3rd Generation Partnership Project (3GPP) specified Long-Term Evolution (LTE) Discontinuous Reception (DRX) which is a process of turning-off a Radio Frequency (RF) receiver when the modem is not expected to receive any data for a pre-determined period. The DRX cycle is configured to allow modem to enter a sleep state and wake up periodically to read control channel information of a Physical Downlink Control CHannel (PDCCH).
Even though the DRX cycle is periodic, as per the 3GPP specification, the CPU ON time, and thus idle time, may vary due following conditions:
A: Due to hardware transient response and processing offload:
Referring to
B: During PDCCH reception:
Referring to
C: Short DRX Cycles are configured:
Referring to
Therefore, there is a need for an effective method and system for machine learning prediction of CPU Idle patterns for power saving in a modem SoC.
The various embodiments herein disclose a method and system for providing power management in a computing system by predicting a CPU idle pattern for power saving in a modem SOC.
The specification may refer to “an”, “one” or “some” embodiment(s) in several locations. This does not necessarily imply that each such reference is to the same embodiment(s), or that the corresponding feature only applies to a single embodiment. Single features of different embodiments may also be combined to provide other embodiments.
As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless expressly stated otherwise. It will be further understood that the terms “includes”, “comprises”, “including” and/or “comprising” when used in this specification, specify the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or more other features integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term “and/or” includes any and all combinations and arrangements of one or more of the associated listed items.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms, such as those defined in commonly used dictionaries, have a meaning that is consistent with their meaning in the context of the relevant art, unless expressly so defined herein.
With an objective of achieving improved power saving in a modem SoC during a CPU idle period, the present disclosure describes prediction of a CPU idle pattern and applying selective sleep during the CPU idle period.
According to the
(a) monitoring CPU idle during run-time to understand a behavioral pattern of the CPU idle time, in step 602;
(b) predicting and deciding behavioral pattern of the CPU idle period, in step 604; and
(c) applying the predicted results to the system in such a way that selective sleep shall be enabled during that time, in step 606, thereby increasing power saving efficiency of the system.
At step 602, the CPU idle period is monitored during a run-time of the system in order to understand the behavioral pattern of the CPU idle period, during which execution of processes and entrance of the CPU into the idle period is observed. Along with observing process execution, the duration of CPU idle period after performance of a specific type of process is also observed, which can identify and can used to infer that the CPU can enter into idle state for a particular period of time after executing the specific type of process. For example, the CPU can take n1 seconds to execute a process A and can be in idle state for m1 seconds after executing the process A. Similarly for executing the process B, the CPU can take n2 seconds for execution and can be in idle state for m2 seconds after executing the process B. After observing the execution pattern, the system assumes that whenever process A or another process similar to the process A is executed, the CPU idle period after execution of the process will be m1 seconds.
According to an embodiment of the present disclosure, the monitoring of the CPU idle period of the system can be performed in terms of a fixed span of time. According to another embodiment of the present disclosure, the monitoring of the CPU idle period of the system can be based on a frame sync rate.
At step 604, a CPU behavioral pattern is identified, and a CPU idle pattern for a particular scenario, which indicates how the CPU behaves during and after execution of particular type of process, is determined. The behavioral pattern of the CPU can be recorded and the decision to apply selective sleep mode can be performed based on the records. The decision to apply selective sleep mode can be taken in two different ways: (1) prediction over time and (2) prediction over an event fingerprint, which are described herein with reference to
At step 606, based on the obtained decision, the calculated results are applied to the system. The obtained results indicate which CPU idle time period is suitable for applying a selective sleep mode to the system, such that power saving efficiency of the system increases. According to the obtained decision, selective sleep mode is applied to the system only during the particular CPU idle time period, and selected peripherals and sub systems are sent into sleep mode. Other peripherals and sub systems can be in active mode while the CPU is in idle state. Different peripherals and sub systems can be in sleep mode based on the CPU idle period, behavioral pattern observed, process under execution, etc., but embodiments of the present disclosure are not limited thereto. As the selected peripherals and sub systems are in sleep mode during CPU idle period, power consumption of the system is reduced, thereby increasing the power saving efficiency.
Referring to method 700b of
In
In a manner similar to performing monitoring for a long CPU idle state every 20 micro seconds, a long CPU idle can be monitored every 40 micro seconds or 60 micro seconds. Based on the observations obtained every 20 micro seconds, during a second period 753, a long CPU idle period can be predicted and the idle time period for applying a selective sleep mode for selected peripherals and sub systems can be calculated. Once the long CPU idle period is predicted, the selective sleep mode can be applied during every upcoming 20 micro second time period, such as at time points 756a and 756b. Even during applying selective sleep mode to each upcoming 20 micro second time period, monitoring and predicting of the long CPU idle can be performed, as the behavior and CPU idle pattern can vary based on different circumstances, such as an incoming process execution request by a user, or receipt of any other emergency process for execution.
In
These interrupts or tasks can be marked in the prediction table. During a second period 853, the calculated and observed pattern can be applied to the tasks after certain interval, such that, in the future, whenever the system enters a CPU idle state after the marked task or interrupt, a power saving selective sleep mode can be triggered. The marked interrupt or task can be a single event or an event fingerprint where a sequential execution of particular events resulted in a longer CPU idle state. Even during application of the selective sleep mode to the marked interrupts or tasks during the CPU idle state, monitoring and predicting the long CPU idle can also be performed, as the behavior and CPU idle pattern can vary based on different circumstances, such as an incoming process execution request by a user, or receipt of any other emergency process for execution.
According to the present disclosure, prediction of a CPU idle state may fail for certain scenarios where the execution process changes rapidly in time and the frequency of repetitive execution patterns are diminished. These scenarios may be occasional and exist for a limited time. During this phenomenon, prediction might be incorrect resulting in triggering selective sleep even for a short CPU idle state. As discussed earlier, enabling selective sleep during a short CPU idle state may consume a little more power than usual. The additional power consumption caused by such prediction failures can be overcome by updating the prediction table based on current execution patterns.
The present disclosure uses a negative feedback mechanism for the prediction process, and any change in the system execution pattern observed by the monitor task will automatically update prediction table, which, in turn, corrects the hypothesis. Therefore, the prediction table update is self-regulated and recovers from any prediction failures.
Although certain examples have been used in the above-described embodiments; it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope thereof. Further, the various devices, modules, and the like described herein may be enabled and operated using hardware circuitry, for example, complementary metal oxide semiconductor based logic circuitry, firmware, software and/or any combination of hardware, firmware, and/or software embodied in a machine readable medium. For example, the various electrical structure and methods may be embodied using transistors, logic gates, and electrical circuits, such as application specific integrated circuit.
While the present disclosure includes reference to certain embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2015-0021124 | Feb 2015 | KR | national |
10-2015-0038425 | Mar 2015 | KR | national |
This application claims priority under 35 U.S.C. §119(e) to a U.S. Provisional Application filed on Apr. 3, 2014 and assigned Ser. No. 61/974,748, and under 35 U.S.C. 119(a) to a Korean Patent Application filed in the Korean Intellectual Property Office on Feb. 11, 2015 and assigned serial No. 10-2015-0021124 and to a Korean Patent Application filed in the Korean Intellectual Property Office on Mar. 19, 2015 and assigned serial No. 10-2015-0038425, the entire contents of each of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61974748 | Apr 2014 | US |