tickless cron

Denis Vlasenko vda.linux at googlemail.com
Tue Sep 26 12:39:13 UTC 2006


On Monday 25 September 2006 21:41, Rob Landley wrote:
> On Sunday 24 September 2006 5:52 pm, Denis Vlasenko wrote:
> > Periodic check every minute really isn't a load worth optimizing out.
> 
> On a cell phone it sure is.  Their standby power budget is about 5 miliwatts.  
> A device with a week of standby and three hours of talk time really doesn't 
> want to power up to "doing something" mode unless it gets the wake-on-lan 
> call-coming-in bat-signal, or unless you open the display to get its 
> attention.  Waking up once a minute even for a few miliseconds, round the 
> clock including 4 am, will chop a couple _days_ off the standby time.

Run time per day:
10 milliseconds * 1440 minutes = 14400 milliseconds = 14.4 seconds.
In a week, that amounts to one minute of run time.

OTOH, powerup/sleep cycles may drain extra power by themself, so
it maybe can drain significantly more than that.

OTOH#2, who says that we can't check every 15 minutes?

I think than cron have to act semi-sensibly when someone sets system time:
if we have one task which should be run at 06:00, we shouldn't sleep
for 24 hours in between in one giant nanosleep(). If someone will
adjust system time +5 minutes, we will miss next run - even if it was
still many hours ahead at a moment of system time adjustment!

Is there a way to have event/signal from kernel on system time changes?
--
vda



More information about the busybox mailing list