Re: Task Switching in Linux

Rick Hohensee
2001-06-12T01:54:43Z

Jaswinder Singh wrote:
>
> In Linux , If we assume that there are only 2 tasks A and B and both are
> equal , this is correct or not :-
>
> TASK A -> schedule -> switch_to -> TASK B -> schedule -> switch_to ->
> schedule -> switch_to -> TASK A.
>

If you mean "->" as "specifically calls" then that looks like cooperative
multi-tasking, which is what kernel threads AND the Linux userland
scheduler do. If an in-kernel thread doesn't call schedule, it keeps the
CPU. See the H3rL stuff in ftp://linux01.gwdg.de/pub/cLIeNUX/interim

Rick Hohensee
:; cLIeNUX /dev/tty11 21:00:45 /
:;d -d */
Cintpos/ boot/ device/ incoming/ owner/ temp/
Debian/ command/ floppy/ log/ source/
Linux/ configure/ guest/ lost+found/ subroutine/
NetBSD/ dev/ help/ mounts/ suite/