Messages in this thread | | | Date | Tue, 9 Feb 1999 22:00:14 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: Real Time scheduler? |
| |
On Mon, 8 Feb 1999, Peter Steiner wrote:
>To: linux-kernel@vger.rutgers.edu >Subject: Re: Real Time scheduler? >In-Reply-To: <Pine.LNX.4.03.9902081557070.28564-100000@mirkwood.dummy.home> > >>I am (or rather, will be once 2.2 stabilizes) working >>on the exact opposite: SCHED_IDLE processes which only >>run when the system's got nothing else to do. > >I already have something like that. It's a modification of how niceness
There was the SCHED_IDLE patch from Ingo too.
>the processor, e.g. when there's a process running at nice=0 then no >proces with nice=11 or higher will get the cpu. On the other hand, if
As I just pointed out for the SCHED_IDLE patch: doing that, you open a window to deadlocking on semaphores.
To fix this properly (as pointed out by Pavel) you must be more clever and see _where_ the process got rescheduled.
> >- if (p->policy != SCHED_OTHER || p->counter > current->counter + 3) { >+ if (p->policy != SCHED_OTHER || >+ p->counter+(p->priority<<2)>=current->counter+(current->priority<<2)) {
I just did something like that some time ago (probably Rik remeber).
I only changed `p->counter > current->counter + 3' to:
`p->counter + p->priority > current->counter + 3 + p->priority'
This make sense to me since we may want to reschedule the current task if the wokenup one has very higer priority. But it's not a critical thing in real-life (where all processes are used to run at the same priority), it's just a thought.
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |