Method for power saving in mobile devices by optimizing wakelocks
A method for conserving device and/or network resources is provided herein. The method includes detecting a wakelock operating on a mobile device and determining a consumption of one of a power or radio usage attributed to the detected wakelock. The method further includes determining a criticality related to user experience for the detected wakelock and releasing the detected wakelock based on the determined consumption and criticality. Related systems and mobile devices are also disclosed.
1. A method comprising:
detecting a wakelock acquisition request on a mobile device;
determining whether to acquire a wakelock in response to the wakelock acquisition request, wherein a wakelock optimizer identifies patterns and periodicity in one or more wakelocks and performs one or more queries to determine patterns of the one or more wakelocks;
determining whether the wakelock matches a pattern known to be caused by a targeted wakelock, wherein a targeted wakelock is a wakelock that is considered unnecessary or potentially unnecessary based on pre-determined criteria; and
identifying and removing an unnecessary wakelock that is indifferent to an end user experience.
2. The method of claim 1 , wherein the wakelock optimizer uses caching algorithms to identify the patterns and periodicity in the one or more wakelocks.
3. The method of claim 1 , wherein the wakelock is set by an application.
4. The method of claim 3 , wherein the wakelock is configured to trigger a processor wakelock.
5. The method of claim 1 , wherein the wakelock optimizer monitors processor activities.
6. The method of claim 5 , wherein the wakelock optimizer triggers a lower processor frequency.
7. The method of claim 5 , wherein the wakelock optimizer shuts down one or more processor cores.
8. The method of claim 5 , wherein the wakelock optimizer terminates an application.
9. The method of claim 8 , wherein the wakelock optimizer terminates the application based on a processor usage threshold while the mobile device is not actively used by the user.
10. The method of claim 8 , wherein the wakelock optimizer restarts the application after at least one of a delay and an external event.
11. A mobile device comprising:
a memory; and
a processor configured for:
detecting a wakelock acquisition request on a mobile device;
determining whether to acquire a wakelock in response to the acquisition request, wherein a wakelock optimizer identifies patterns and periodicity in one or more wakelocks and performs one or more queries to determine patterns of the one or more wakelocks;
determining whether the wakelock matches a pattern known to be caused by a targeted wakelock, wherein a targeted wakelock is a wakelock that is considered unnecessary or potentially unnecessary based on pre-determined criteria; and
identifying and removing an unnecessary wakelock that is indifferent to an end user experience.
12. The mobile device of claim 11 , wherein the wakelock optimizer uses caching algorithms to identify the patterns and periodicity in the one or more wakelocks.
13. The mobile device of claim 11 , wherein the wakelock is set by an application.
14. The mobile device of claim 13 , wherein the wakelock is configured to trigger a processor wakelock.
15. The mobile device of claim 11 , wherein the wakelock optimizer monitors processor activities.
16. The mobile device of claim 15 , wherein the wakelock optimizer triggers a lower processor frequency.
17. The mobile device of claim 15 , wherein the wakelock optimizer shuts down one or more processor cores.
18. The mobile device of claim 15 , wherein the wakelock optimizer terminates an application.
19. The mobile device of claim 18 , wherein the wakelock optimizer terminates the application based on a processor usage threshold while the mobile device is not actively used by the user.
20. The mobile device of claim 18 , wherein the wakelock optimizer restarts the application after at least one of a delay and an external event.