The scheduler With the task structure just described Where init and job and separate Where we rely on an ELF section ... the scheduler is trivial while (1) { for (best = t = task_first; t < task_last; t++) if (time_before(t->nextrun, best->nextrun) best = t; while (time_before(jiffies, best->nexrun) ; best->job(best->arg, best); /* maybe use retval */ best->nextrun += best->period; /* BUG! */ } And we can expand on this over time But please remember to keep it simple, or you loose