Skip to contentSkip to conversation

Task Switching in Linux

DISCUSSION Rick Hohensee 1 participant 1 message Jun 12, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Jaswinder Singh

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/