Re: What is the optimum time for task switching?

From: Johan Kullstam (kullstam@ne.mediaone.net)
Date: Mon May 01 2000 - 19:09:30 EST


Val Henson <vhenson@esscom.com> writes:

> I'm under the impression that Mark is talking about context-switch time
> and not about time between switching tasks. Mark, care to clarify?

the cost of switching context is non-zero and it is overhead, i.e.,
not productive. each switch incurs a fixed cost. thus you want to
switch as little possible. note, that when the context switch time is
a small fraction of the total, say under 1%, then it doesn't pay to
reduce it (since you can only reap what it burns and that's under 1%).

> -VAL
>
> On 30 Apr 2000, Johan Kullstam wrote:
>
> > Mark Zealey <kernel@itsolve.co.uk> writes:
> >
> > > I am interested in what the optimum time on an i386+ is for task
> > > switching. I would imagine that it would be quite long, as it must take
> > > lots of cycles to save all the reg's and load the new ones.
> >
> > from a cycle efficiency standpoint, optimum would be to stay
> > infinitely long with each task and only switch when the task was
> > complete or waiting for input. however, user interaction demands
> > switching once in a while to preserve the illusion of multi-tasking.
> >
> > --
> > J o h a n K u l l s t a m
> > [kullstam@ne.mediaone.net]
> > Don't Fear the Penguin!
> >
> > -
> > 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/
> >
>
>
> -
> 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/

-- 
J o h a n  K u l l s t a m
[kullstam@ne.mediaone.net]
Don't Fear the Penguin!

- 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/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:09 EST