10 ms·
Why not have some way to register small "background" programs as essentially cron jobs? It could limit the time it's allowed to run to, say, 30 seconds, and kil
by tlrobinson 18y ago
Why not have some way to register small "background" programs as essentially cron jobs? It could limit the time it's allowed to run to, say, 30 seconds, and kill the process after. I think this would be long enough for most background tasks, like updating your location, polling a server, etc.
- zhyder 18y agoShouldn't it be even simpler than that? Why can't the OS control context switching at a fine grain with a policy like: 10% of time for all background apps, and 90% for either the foreground app or for the sleep state. At worst a background app won't get as many CPU cycles as it'd like, which I think is a better compromise than the 2 extremes of no background apps and background apps that can suck all the performance+power.
- xenophanes 18y agoi think the first comment is focussed on preventing battery power draining, and the second focussed on preventing background apps from slowing down foreground apps. both separate and valid concerns. and the suggested solutions are compatible.
- tlrobinson 18y agoSo the phone can go into a deep power saving sleep mode most of the time, and occasionally come out of sleep every few minutes.