Scheduler: seleccionar un proceso sched.c::schedule() /* Seleccionar el proceso con la mayor prioridad de ejecución. */ c = -1000, next = idle_task; for_each_runnable_task(p) { int weight = goodness(p, prev, this_cpu); if (weight > c) c = weight, next = p; } /* Todos sin timeslice? Recalcular. */ if (!c) { for_each_task(p) p->counter = (p->counter / 2) + NICE_TO_TICKS(p->nice); }