Context switch for CPU bound processes

From: root (p.losi@lombardiacom.it)
Date: Sat May 27 2000 - 07:13:51 EDT

  • Next message: Davide Libenzi: "Re: Context switch for CPU bound processes"

    Hello everyone,
            I'm studying kernel sources and I didn't succeed
    in finding an answer to the following question.

    Suppose we have 2 processes contending for CPU.
    Both processes execute a busy loop in userland (no syscalls).
    How does the kernel preempt the executing process
    in favour of the other one. If I'm not wrong do_timer doesn't
    do this: it cannot call schedule() because of the interrupt
    context...

    It would be very nice from you if you could give some pointer
    to the code where this issue is coped with within the sources
    of 2.0 2.2 and 2.3 versions.

            Thank you very much
                    Paolo Losi

    p.s. please cc the answers directly to my e-mail address since
    I'm not subscribed to the list.

    -
    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 : Sat May 27 2000 - 07:16:46 EDT