Context switch for CPU bound processes

From: root (
Date: Sat May 27 2000 - 06:13:51 EST

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

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
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:17 EST