Re: Task Switching in Linux

Rick Hohensee (humbubba@smarty.smart.net)
Mon, 11 Jun 2001 22:02:53 -0400 (EDT)


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/

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