Messages in this thread | | | Date | Tue, 19 Aug 2003 01:43:54 +1000 | From | Nick Piggin <> | Subject | Re: [PATCH] O16int for interactivity |
| |
Timothy Miller wrote:
> > > Con Kolivas wrote: > >>> >>> A hardware timer interrupt happens at timeslice granularity. If the >>> interrupt occurs, but the timeslice is not expired, then NORMALLY, the >>> ISR would just return right back to the running task, but sometimes, it >>> might decided to end the timeslice early and run some other task. >>> >>> Right? >> >> >> >> No, the timeslice granularity is a hard cut off where a task gets >> rescheduled and put at the back of the queue again. If there is no >> other task of equal or better priority it will just start again. > > > > Hmmm... I'm still having trouble making sense of this. > > So, it seems that you're saying that all tasks, regardless of > timeslice length, are interrupted every 10ms (at 100hz).
Interrupted - in that scheduler_tick is run, yes. They don't get switched.
> If another task exists at a higher priority, then it gets run at > that point.
Well loosely, yes. Actually, it happens if the task exists and is "running", and has timeslice left. That only happens in scheduler_tick when the current task has finished its timeslice and the priority arrays are about to be switched. The required conditions for preemption can also occur when a task is being woken up, (after sleeping or newly forked).
> However, if there is more than one task at a given priority level, > then they will not round-robin until the current task has used up all > of its timeslice (some integer multiple of 10ms).
Thats right. Although I think Con or Ingo recently changed this in mm
> > > Am I finally correct, or do I still have it wrong? :) >
Sounds right to me.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |