Hey folks, I'm trying to understand the schedule() code. I've got most of it down, but a couple parts having to do with task_struct->activated and task_struct->array are confusing me. What does activated stand for, and what does array point to? At first guess it would seem like array is the priority array that the task is on, but then this code makes no sense: if (!rt_task(next) && next->activated > 0) { unsigned long long delta = now - next->timestamp; if (next->activated == 1) delta = delta * (ON_RUNQUEUE_WEIGHT * 128 / 100) / 128; array = next->array; dequeue_task(next, array); recalc_task_prio(next, next->timestamp + delta); enqueue_task(next, array); } why have array = next->array when we _just_ got next off an array we already had the pointer to? Also, it seems like this is the code where RR/FIFO scheduling is implemented. I say this only because this is the only code past the point when a task is selected where something is conditional on rt_task(next). OK, but what does next->activated do here (and why are tasks with next->activated <= 0 treated as realtime?) OR am I wrong about this being the RR/FIFO code and if so, where is it? Please help, I'm fairly lost :( Thanks in advance, Athul Acharya -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/